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

Bug 418949

Summary: Improve the outline view for JavaScript files
Product: [ECD] Orion Reporter: Michael Rennie <Michael_Rennie>
Component: JS ToolsAssignee: Project Inbox <orion.client-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: curtis.windatt.public, mamacdon, simon_kaegi
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 423081    
Bug Blocks:    

Description Michael Rennie CLA 2013-10-08 13:02:59 EDT
As part of the effort to make JavaScript source navigation less painful (see bug 418861), we could provide an outline view so users could quickly click around and see an overall picture of the source. 

We can use JSDoc tags found while parsing to help display / organize the members in the file.
Comment 1 Michael Rennie CLA 2013-10-08 13:05:44 EDT
Not sure, but this might be a dupe of bug 372249.
Comment 2 Mark Macdonald CLA 2013-10-08 13:15:00 EDT
FWIW, Orion ships with a JS outline view already -- it just isn't very good. (To see it, click the button in the left-hand pane of the editor that looks like a bunch of bullets and lines, and select "Flat outline").
Comment 3 Michael Rennie CLA 2013-10-08 13:27:01 EDT
(In reply to Mark Macdonald from comment #2)
> FWIW, Orion ships with a JS outline view already -- it just isn't very good.
> (To see it, click the button in the left-hand pane of the editor that looks
> like a bunch of bullets and lines, and select "Flat outline").

Thanks for the pointer Mark.
Comment 4 Curtis Windatt CLA 2013-10-09 11:47:49 EDT
If we want to use JSDoc tags to add additional information to the outline, we will need to have comments available in the AST.  Comments are available from Esprima but they are placed at the end of the tree, not associated with any other nodes.

http://code.google.com/p/esprima/issues/detail?id=197
Looks like esprima just added (3 days ago) support to associate the comment with a node in the tree.

We can use doctrine to parse the comment content.  For the outline view we would likely only need a few tags, but having the ability to add the parsed tags to the AST for other tooling might be worthwhile.
Comment 5 John Arthorne CLA 2015-05-05 16:20:34 EDT
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see:


https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html