Bug 543434

Summary: [navigation] Support relative file paths in URL hyperlink
Product: [Eclipse Project] Platform Reporter: Peter Lustig <peterlustig1983>
Component: TextAssignee: Platform-Text-Inbox <platform-text-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert, Ed.Merks
Version: 4.8   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

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.