Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 338336

Summary: [outline] objects in functions not shown in outline view
Product: [WebTools] JSDT Reporter: Philippe Marschall <philippe.marschall>
Component: GeneralAssignee: Project Inbox <jsdt.javascript-inbox>
Status: NEW --- QA Contact: Victor Rubezhny <vrubezhny>
Severity: enhancement    
Priority: P3 CC: dittofluid, frank.wagner.13, redsandro, thatnitind, vrubezhny
Version: 3.3Flags: thatnitind: review? (vrubezhny)
Target Milestone: Future   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
file to reproduce
none
screenshot of the issue
none
Proposed implementation of the enhancement.
none
Screenshot of proposed implemenation none

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) {
    //
  }
};