IEditorInput editorInput = editor.getEditorInput();
if (editor instanceof ITextEditor) {
ITextEditor textEditor = (ITextEditor) editor;
IDocument document = textEditor.getDocumentProvider().getDocument(editorInput);
IRegion lineInformation = document.getLineInformation(lineNumber);
textEditor.selectAndReveal(lineInformation.getOffset(), 0);
}
}
catch (Exception e) {
log.debug(e.getMessage());
}