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

Bug 492928

Summary: [tern][tern18] Scope problems after Tern 18
Product: [ECD] Orion Reporter: Curtis Windatt <curtis.windatt.public>
Component: JS ToolsAssignee: Curtis Windatt <curtis.windatt.public>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Michael_Rennie, Olivier_Thomann
Version: 12.0Flags: Michael_Rennie: review+
Olivier_Thomann: review+
Target Milestone: 12.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Curtis Windatt CLA 2016-05-03 15:03:37 EDT
I had to disable a couple of tests due to changes in Tern 18's behaviour.  If we are ok with the new behaviour the tests should be updated.

1) 'browser awareness 9'
Global objects are not returned as property proposals on the window object

2) 'test Object Literal inside'
Property names are not returned as proposals for 'this.' when inside of an object
Comment 1 Curtis Windatt CLA 2016-06-06 14:32:18 EDT
Both of these cases work in the TernJS demo page.  The browser.json defines window as a <top> object.  For (2) the proposals on 'this' suggest that content assist is not aware of the object scope.

I checked that it wasn't a modules plugin like node that was altering the scope.
Comment 2 Curtis Windatt CLA 2016-06-09 14:24:38 EDT
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=0de524839ec66bf471e7e66766ed4ff69cc28b2e
Fixed in master

1) This test now passes, no changes needed.

2) Tern now only falls back on giving all property names if filter is set to true on the completions request.  Mike and I think this is incorrect (same behaviour regardless of filter property), but Marijn disagrees. 
https://github.com/ternjs/tern/issues/790#issuecomment-224375798


Mike and Olivier please review for 12.0
Comment 3 Olivier Thomann CLA 2016-06-09 14:40:49 EDT
+1.
Comment 4 Michael Rennie CLA 2016-06-09 14:42:47 EDT
+1