| Summary: | Navigation hover can show irrelevant paths to open | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Michael Rennie <Michael_Rennie> |
| Component: | JS Tools | Assignee: | Michael Rennie <Michael_Rennie> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | curtis.windatt.public |
| Version: | 8.0 | ||
| Target Milestone: | 8.0 | ||
| Hardware: | PC | ||
| OS: | Mac OS X | ||
| Whiteboard: | |||
Here are some paths to test with:
/*globals importScripts */
/*eslint-env node */
var s = importScripts('../es6');
s = importScripts('./es6.js');
s = importScripts('es6.js');
s = importScripts('../finding/es6.js');
s = require('../es6');
s = require('./es6');
s = require('es6');
s = require('../finding/es6');
Error computing hover tooltip tooltip.js:376 Cancel: Cancel at Object.internalRegistry.handleServiceError (http://client.orion.eclipse.org:9000/orion/pluginregistry.js:1071:29) The file client is blowing up whenever I try to search for require/importscript. It is working fine for define statements. Unlikely to be related to the patch. Everything in the patch looks good. Fixed in: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=885e2183b451eb115fdfe4a408860a539c7b9825 The changes: 1. make relative paths work as expected in importScripts() and require() call expressions (define() does not allow relative paths) 2. update the CSS hover to use the new function resolveRealtiveFiles from script resolver 3. adds relative file support in the HTML hovers |
Steps: 1. create a file foo.js in a project A 2. create another file foo.js in a project B 3. add another file bar.js in B 4. add the following to bar.js var lib = require('./foo'); 5. hover over './foo' In the hover you should see both foo.js files proposed as nav targets, but we should have only shown the one in B due to the './' We should also update the title of the hover to not include path qualification(s). In the given example the title looks like 'Open file for ./foo', when it should just read 'Open file for foo'