Well, it turns out that the code I wrote is good, with the exception of two minor changes, it should actually be
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, -1, -1, -1);
console.addHyperlink(fileLink, 10, 5);
I was a little surprised that it was necessary to provide for an offset (10), which is calculated from the beginning of the console output. Why do you even want to calculate it yourself, but this is another discussion.