I would like to write the location of a file to the eclipse console as a hyperlink. When you click on it it should open the file in eclipse. I'm currently doing something like this (but the link doesn't show up)
console = new MessageConsole("myconsole", null);
console.activate();
ConsolePlugin.getDefault().getConsoleManager().addConsoles(new IConsole[]{ console });
IPath path = Path.fromOSString(filePath);
IFile file = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(path);
FileLink fileLink = new FileLink(file, null, 0, 0, 0);
console.addHyperlink(fileLink, 0, 0);
I should probably not pass in 0 for the offset, filelength parameters etc.
Any help appreciated.