Programming in Javascript, can't find a quick way of jumping to a function/method

Answered

I hope I've got the right forum here. I am using the IDEA community edition (free) IDE.

I realise this IDE is probably not primarily designed with Javascript programming in mind... nevertheless I'm trying to see whether I can use the same IDE for everything I do, which would be nice.

So the slight difficulty I have at the moment is this: say I have a JS file with maybe 700 lines, which perhaps defines a JS class (not necessarily using the "class" word, but rather like this:

MyClass = function( param ){ // constructor
...
MyClass.prototype.init = async function(){
...

... in the "Project" view one can see the directory structure... so my .js file containing this class can be seen ... but the individual methods/functions comprising this class definition can't been seen.
This makes it difficult to jump to a particular class method for the purposes of editing. I find I'm constantly having to scroll up and down, or search on the method name (if I can remember it).

Is there any way to display, in a left-hand view, a list of the functions/methods defined in a given .js file, using either the community edition or the professional edition?

0
4 comments

You can use the Structure view: https://www.jetbrains.com/help/idea/2020.2/viewing-structure-of-a-source-file.html. However, please note that IDEA Community edition doesn't provide any JavaScript support.

0
Avatar
Permanently deleted user

Thanks... In fact "Structure" view is already open. It just says "No structure" when I have a JS file "on top" in the editing windows.

I can't currently see what happens to this Structure view when I'm looking at a Java file, because the laptop I'm on currently has no such projects.

Is there anything to be done to make IntelliJ somehow analyse and display structure of a JS file in this Structure view?

0

> Is there anything to be done to make IntelliJ somehow analyse and display structure of a JS file in this Structure view?

If it's the community version then it's expected because it doesn't support JavaScript.

0
Avatar
Permanently deleted user

Fair enough... looks like I'll have to use Aptana then, because this is quite an important thing to be able to see... Oh well.

0

Please sign in to leave a comment.