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

Bug 520385

Summary: Using a quickfix with a selected linked mode region causes exception
Product: [ECD] Orion Reporter: Michael Rennie <Michael_Rennie>
Component: JS ToolsAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: steve_northover
Version: 15.0   
Target Milestone: 16.0   
Hardware: PC   
OS: Mac OS X   
See Also: https://github.com/eclipse/orion.client/pull/131
Whiteboard:

Description Michael Rennie CLA 2017-07-31 15:40:13 EDT
Steps:

1. open a js file
2. type "if" (minus the quotes) and activate content assist
3. select the if-statement template
4. without making any other changes / selections in the editor, start typing "fred == 10" (minus the quotes)
5. without hitting enter or escape (or any other key for that matter), hover over the linting problem for the '==' and use the quick fix.

At this point you should see a red banner at the bottom that reads:

"TypeError: Cannot read property 'forEach' of undefined"

looks like the problem starts in linkedMode.js, where it is passing along an array of text items, when it should be passing along the single edit belonging to the sorted position.
Comment 1 Eclipse Genie CLA 2017-08-02 09:52:16 EDT
GitHub Pull Request 131 created by [mrennie]
https://github.com/eclipse/orion.client/pull/131
Comment 2 Michael Rennie CLA 2017-08-02 09:54:45 EDT
Merged