Eclipe PDE: Jump to line X and highlight it

Posted by autobiographer on Stack Overflow See other posts from Stack Overflow or by autobiographer
Published on 2010-05-20T12:58:35Z Indexed on 2010/05/20 13:00 UTC
Read the original article Hit count: 348

Filed under:
|

A qustion about Eclipse PDE development: I write a small plugin for Eclipse and have the following * an org.eclipse.ui.texteditor.ITextEditor * a line number

How can I automatically jump to that line and mark it? It's a pity that the API seems only to support offsets within the document but no line numbers.

The best would be: ITextEditor editor = (ITextEditor)IDE.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(), file, true ); editor.goto(line); editor.markLine(line);

It this possible in some way? I did not find a solution

© Stack Overflow or respective owner

Related posts about eclipse-pde

Related posts about eclipse-api