Structure window for JavaScript unusable (?)

When editing JavaScript, I am finding the Structure window unusable. It doesn't make the structure of the file come out and seems to be polluted with lots of things that are not really defined in the file I am editing, but merely used there. I marked this post as a question, because it might very well be the case of me not using this feature correctly.

Let me take an example; consider this code:

MyClass = function() {};

MyClass.prototype = {
    myMethod: function() {
        var a = bar();
        var b = a.b;
        b.c = 42;
    }
};

What matters here is that we define a class MyClass with method myMethod. But the structure window shows:
Structure.png
The problem is with the a/b/c. Those are just used there, not defined in this file. In a real piece of JavaScript, there many more variables / objects used than defined, and the Structure view doesn't seem to make the difference between the two. This totally polutes that window, and it seems to me that it makes it unusable.

Am I missing something?

Alex

2 comments

This is bug, please, submit YourTrack ticket

On 29.04.2010 5:36, Alessandro Vernet wrote:

When editing JavaScript, I am finding the Structure window unusable. It doesn't make the structure of the file come out and seems to be polluted with lots of things that are not really defined in the file I am editing, but merely used there. I marked this post as a question, because it might very well be the case of me not using this feature correctly.

>

Let me take an example; consider this code:

>

MyClass = function() {};

>

MyClass.prototype = {
     myMethod: function() {
         var a = bar();
         var b = a.b;
         b.c = 42;
     }
};

>

What matters here is that we define a class MyClass with method myMethod. But the structure window shows:
  Image:Structure.png
The problem is with the a/b/c. Those are just used there, not defined in this file. In a real piece of JavaScript, there many more variables / objects used than defined, and the Structure view doesn't seem to make the difference between the two. This totally polutes that window, and it seems to me that it makes it unusable.

>

Am I missing something?

>

Alex

>

---
Original message URL: http://www.jetbrains.net/devnet/message/5262064#5262064



--
Best regards,
   Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Maxim,

Thanks for the ultra-fast response. I created a "bug" for this in YouTrack:

http://youtrack.jetbrains.net/issue/IDEA-54525

Alex

0

Please sign in to leave a comment.