Eclipse: link to file in workspace and open in internal editor

I am porting C ++ code to Java and I have to constantly link from Java source to C ++ source. I would like to be able to hyperlink right there. For example, in the Java source:

/**
 * This is a port of C++ from <a href="../../another/project/src/Source.cpp">here</a>.
 */

      

This hyperlink works but opens in an external web browser. I'd like it to open in Eclipse's internal text editor or something other than a browser! I know it doesn't make sense to open a C ++ file inside Eclipse, but I just want to look at the source with some basic functionality like navigation and search. Opening it in a web browser with odd formatting and no basic tools is not very useful with thousands of lines of C ++ code! Please note that this is not a reference to a Java source in the same project or dependent project, so {@link SomeClass}

not appropriate as the JavaDoc compiler never understood.

I'm looking for any solution that will allow me to cmd / ctrl-click a link and open it in some kind of text editor. Preferably it will be the internal Eclipse editor, but something will do:

  • Is there an Eclipse plugin that already does something like this?
  • Is there a trick to get JavaDoc to trigger an anchor of anything other than the web browser?
  • Is it possible to override URL handling in OSX to open specific URLs with Eclipse?
  • It might be a comment other than JavaDoc, but since Eclipse renders hyperlinks in JavaDoc rollovers, it seems like a place to start

The url itself is not an issue. I happen to check out a C ++ project from Git into an Eclipse workspace, so I am using a relative url here. If I need to use absolute filesystem paths that are very good too.

Solving this will save me from boredom!

+3


source to share





All Articles