| Summary: | Improve naming of return statements | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Michael Rennie <Michael_Rennie> | ||||
| Component: | JS Tools | Assignee: | Michael Rennie <Michael_Rennie> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | enhancement | ||||||
| Priority: | P3 | CC: | curtis.windatt.public | ||||
| Version: | unspecified | ||||||
| Target Milestone: | 5.0 M2 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 238390 [details] fix This patch fixes the outlining and adds tests. I will push it to gerrit once bug 424149 is merged to avoid gerrit-dependency hell. pushed to Gerrit: https://git.eclipse.org/r/19913 |
Consider the following snippet: function f1() { return { one: null } } function f2() { return function() {} } f1's return is outlined as 'closure {...}' which is not useful, and f2's return is outlined as 'function()' which is better, but should probably have the return part as the selection. In both cases it might make more sense to outline them as 'return {...}' with the 'return' part as the selection ranges.