Bug 543434 - [navigation] Support relative file paths in URL hyperlink
Summary: [navigation] Support relative file paths in URL hyperlink
Status: ASSIGNED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.8   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-14 18:02 EST by Peter Lustig CLA
Modified: 2019-01-15 05:45 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Lustig CLA 2019-01-14 18:02:15 EST
The "ctrl+click" feature allows me to write URIs into many files (e.g. plain text) and then I can open the URIs by hovering over them with the mouse, pushing ctrl and clicking.

This works fine in my eclipse e.g. for
http://www.example.com
file://c:\foo.txt (I'm on windows)

But, what I actually want to do is, I want to reference a file in the same directory as the file that contains the reference, or another relative path link.

So I have e.g.

c:
+MyWorkspace
+source.txt
+dest.txt

And I want to write "something" into source.txt that will allow me to navigate to dest.txt. That "something" should be relative, so if I put both files into some revision control and get them out on another machine, links should still work.

I would like Eclipse to resolve the given path against the containing document.

Some discussion of this has already happened here:
https://www.eclipse.org/forums/index.php?t=msg&th=1097013&goto=1801075&#msg_1801075
Comment 1 Ed Merks CLA 2019-01-15 01:17:36 EST
One thought I had is that providing support for file:<relative-path> would be rather ugly because it's questionable whether that's a sensible/meaningful URI. But perhaps support for ./<relative-path> would be more sensible to try to support, because it limits the applicability to strings that start with ./ and in terms of a URI  ., ./., ././. all mean the same thing, i.e., a reference to the resource itself, and from there it can be extended with any relative path, including another reference to the resource itself.