| Summary: | [es6] Comments attached to incorrect node in 'export' statement | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Michael Rennie <Michael_Rennie> | ||||||
| Component: | JS Tools | Assignee: | Olivier Thomann <Olivier_Thomann> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | curtis.windatt.public, Olivier_Thomann | ||||||
| Version: | 12.0 | ||||||||
| Target Milestone: | 12.0 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Mac OS X | ||||||||
| Whiteboard: | |||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 493463 | ||||||||
| Attachments: |
|
||||||||
I can take a look. Also check that the add JSDoc comment command inserts the comment at the right place. (In reply to Curtis Windatt from comment #2) > Also check that the add JSDoc comment command inserts the comment at the > right place. Where do you want to insert the comment? In front of the export statement? (In reply to Olivier Thomann from comment #3) > (In reply to Curtis Windatt from comment #2) > > Also check that the add JSDoc comment command inserts the comment at the > > right place. > Where do you want to insert the comment? In front of the export statement? Yes, as long as the comment is attached to the right node so hovers work. The end result should match the first example from comment 0. /** * @description Returns a String value */ export function myFunc(){ return MYCONSTANT}; Created attachment 261619 [details]
Proposed patch including regression tests
This patch handles:
- hover
- missing-doc rule
- quickfix
for the export named declaration.
Created attachment 261741 [details]
Proposed patch including updated regression tests
Delivered. The commit was: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=fc98f1f32bd890b2c6429e99fe19cc6305507ca1 Thanks Olivier, this is working well for me. |
Consider the following snippet: /** * @description Returns a String value */ export function myFunc(){ return MYCONSTANT}; You get no hover over the the function name. If you change the snippet slightly to: export /** * @description Returns a String value */ function myFunc(){ return MYCONSTANT}; the hover works fine.