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

Bug 506360

Summary: [outline] Provide an AST view (outline?)
Product: [ECD] Orion Reporter: Michael Rennie <Michael_Rennie>
Component: JS ToolsAssignee: Curtis Windatt <curtis.windatt.public>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: curtis.windatt.public
Version: 13.0   
Target Milestone: 13.0   
Hardware: All   
OS: All   
Whiteboard:

Description Michael Rennie CLA 2016-10-21 12:06:13 EDT
There are many, many times I have needed to know what the AST of the current source file looks like. It would be nice if we could provide a view - or perhaps just an outliner - that could show me what it looks like.
Comment 1 Curtis Windatt CLA 2016-10-25 17:34:33 EDT
I've run into this problem before as well.  I have a working example of doing this with a second outliner.  Just need to update the test suite.
Comment 2 Curtis Windatt CLA 2016-10-26 10:19:06 EDT
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=b4c40611ae84c4fa7297d0a54cd7682410e9b87c
Fixed in master

I only added one regression test just to ensure it is working.  The content matches the AST exactly (node type and range).  If we add more content to the outline we will add more tests.
Comment 3 Michael Rennie CLA 2016-10-26 11:15:46 EDT
I pushed a small update that shows all spec'd properties of the nodes and arranges them in their correct ECMA-named locations.

I also added a separate test suite for the outliner that tests the results of the outline for good and broken ASTs.
Comment 4 Michael Rennie CLA 2016-10-26 12:06:16 EDT
I pushed one further update to filter out redundant information that makes searching for certain syntax painful.