關於Eclipse的PDE發展的一個qustion:我寫一個Eclipse小插件,並具有以下 *的org.eclipse.ui.texteditor.ITextEditor *行號的Eclipe PDE:跳轉到行X和高亮
我怎麼能自動跳轉到那行和標記呢?可惜的是API似乎只支持文檔中的偏移量(請參閱:ITextEditor.selectAndReveal()),但沒有行號。
最好的是 - 雖然這並不工作:
ITextEditor editor = (ITextEditor)IDE.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(), file, true);
editor.goto(line);
editor.markLine(line);
這本可能以某種方式?我沒有找到解決方案