Bug 338336 - [outline] objects in functions not shown in outline view
Summary: [outline] objects in functions not shown in outline view
Status: NEW
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: 3.3   Edit
Hardware: All All
: P3 enhancement with 2 votes (vote)
Target Milestone: Future   Edit
Assignee: Project Inbox CLA
QA Contact: Victor Rubezhny CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-27 09:27 EST by Philippe Marschall CLA
Modified: 2020-05-28 15:43 EDT (History)
5 users (show)

See Also:
thatnitind: review? (vrubezhny)


Attachments
file to reproduce (115 bytes, text/plain)
2011-02-27 09:29 EST, Philippe Marschall CLA
no flags Details
screenshot of the issue (28.13 KB, image/png)
2011-02-27 09:31 EST, Philippe Marschall CLA
no flags Details
Proposed implementation of the enhancement. (933 bytes, patch)
2012-04-22 14:28 EDT, Frank Wagner CLA
no flags Details | Diff
Screenshot of proposed implemenation (19.84 KB, image/png)
2012-04-22 14:30 EDT, Frank Wagner CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Marschall CLA 2011-02-27 09:27:03 EST
Objects an their properties are shown in the outline view only if they are in the global namespace. When they are defined in functions they are not shown in the outline view.
Comment 1 Philippe Marschall CLA 2011-02-27 09:29:56 EST
Created attachment 189892 [details]
file to reproduce

The following file demonstrates the issue.

The object 'outer' is shown in the outline view but the object 'nested' is not shown in the outline view.
Comment 2 Philippe Marschall CLA 2011-02-27 09:31:52 EST
Created attachment 189893 [details]
screenshot of the issue

A screenshot showing how objects on the top level like 'outer' are shown in the outline view but objects in functions like 'nested' are not shown in the outline view.
Comment 3 Frank Wagner CLA 2012-04-22 14:28:02 EDT
Created attachment 214352 [details]
Proposed implementation of the enhancement.

Here is a little patch that allows to have nested object members show up in the outline.
I could not find where to add a test case to cover this new feature. Who can help find?
Comment 4 Frank Wagner CLA 2012-04-22 14:30:01 EDT
Created attachment 214353 [details]
Screenshot of proposed implemenation

Here is how it looks with my patch.
Comment 5 Redsandro CLA 2012-07-09 15:17:20 EDT
Does it work for Object Literal definitions?
They are also completely ignored by the outliner.

objLiteral = {
  foo: function() {
    //
  },
  bar: function(baz) {
    //
  }
};