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

Bug 490393

Summary: Open Declaration fails to find readPasswordFile
Product: [ECD] Orion Reporter: Steve Northover <steve_northover>
Component: JS ToolsAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2    
Version: 12.0   
Target Milestone: 12.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Steve Northover CLA 2016-03-24 16:10:03 EDT
1) get org.eclipse.orion.client
2) Drill into /org.eclipse.orion.client/modules/orionode/server.js
3) Line 52 click on readPasswordFile
4) Tools->Open Declaration
5) BUG: Could not find declaration (but it should)

There is only one function in existence with this name.  The require specifies the file where the function can be found.  Other editors easily find this function.
Comment 1 Steve Northover CLA 2016-03-24 16:10:33 EDT
Likely I have something not configured properly?
Comment 2 Steve Northover CLA 2016-03-24 16:38:28 EDT
Ok, the behaivor is random.  I had it fail in beta3 and orion.eclipse.org and work in the electron app.  I have "undeclared member functions" or whatever it is called turned on so if it can't find the function, I should be seeing lint errors.

Help!
Comment 3 Steve Northover CLA 2016-03-24 16:38:32 EDT
Ok, the behaivor is random.  I had it fail in beta3 and orion.eclipse.org and work in the electron app.  I have "undeclared member functions" or whatever it is called turned on so if it can't find the function, I should be seeing lint errors.

Help!
Comment 4 Steve Northover CLA 2016-03-28 10:56:41 EDT
The problem happens because the tern project file stops the navigation from happening.

{
	"plugins": {
		"requirejs": {}
	},
	"ecmaVersion": 5,
	"libs": [
		"ecma5",
		"browser"
	]
}

The temporary fix is to remove the "plugins" section.
Comment 5 Michael Rennie CLA 2016-03-28 11:00:41 EDT
Problem was the .tern-project file for orion.client does not load the nodejs plugin - which means we don't follow the requires to resolve types.

To detect and tell users they should be using a missing plugin will be fixed with bug 485219

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=e81cf08f69527ce191c5c88596e6bd93267e077b