我想將文件的位置作爲超鏈接寫入eclipse控制檯。當你點擊它時,它應該在eclipse中打開文件。目前,我正在做這樣的事情(但是鏈接顯示不出來)如何從插件編寫超鏈接到eclipse控制檯
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);
我可能不應該在0傳遞的偏移,文件長度參數等
讚賞任何幫助。