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

Bug 476250

Summary: Script resolver can fail to match paths that only differ in extension
Product: [ECD] Orion Reporter: Michael Rennie <Michael_Rennie>
Component: JS ToolsAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 10.0   
Target Milestone: 10.0   
Hardware: All   
OS: All   
Whiteboard:

Description Michael Rennie CLA 2015-08-31 13:12:41 EDT
While working on bug 472638 I was using the following snippet:

/* eslint-env amd */define(['./files/require_dep1'], function(rd1) {rd1.});

Activating assist after rd1.^ was not returning proposals (but it should have been)

The problem is that we resolve the relative path, but the path we compare it against does not have an extension, causing us to peel off too many segments while comparing paths via lastIndexOf('.').
Comment 1 Michael Rennie CLA 2015-08-31 13:21:35 EDT
The problem was related to '.' appearing elsewhere in the path *not* for the extension.

Fix + tests:

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