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

Bug 479682

Summary: Open implementation must follow member expressions with assignments
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    
Version: 10.0   
Target Milestone: 10.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on: 470617    
Bug Blocks:    

Description Curtis Windatt CLA 2015-10-13 15:22:51 EDT
Another case that I found not working:

1. grab the ace editor from its repo (https://github.com/ajaxorg/ace)
2. once cloned, navigate to the ace.js file
3. place the caret in the last EditSession part on the line:
        var EditSession = require("./edit_session").EditSession;
4. run open impl

I would expect it to find the var decl in edit_session.js

Open decl will find the assignment in edit_session.js, looks like we are just missing the final hop to the variable declaration for EditSession
Comment 1 Curtis Windatt CLA 2015-10-13 17:07:29 EDT
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=cf8223f2c99ccfc543caaa4150e509b627c4aa9b

Fix + Tests

If the current node is a member expression with an assignment (a.b=1) we want to follow the assignment.  If it isn't an assignment, we just need to do a typeDef lookup on the member expression and Tern will return the object expression if it exists (a = {b: 1}; a.b;).