Package org.eclipse.ui.editors.text

Examples of org.eclipse.ui.editors.text.TextEditor.selectAndReveal()


      TextEditor textEditor = (TextEditor) editorPart.getAdapter(TextEditor.class);
      if (textEditor != null) {
        try {
          IDocumentProvider dp = textEditor.getDocumentProvider();
          IDocument document = (dp != null) ? dp.getDocument(textEditor.getEditorInput()) : null;
          textEditor.selectAndReveal(document.getLineOffset(line - 1) + column - 1, 0);
        }
        catch (BadLocationException x) {
          // marker refers to invalid text position -> do nothing
        }
      }
View Full Code Here


            IWorkbenchWindow dw = getWorkbench().getActiveWorkbenchWindow();
            if (dw != null) {
                IWorkbenchPage page = dw.getActivePage();
                if (page != null) {
                    TextEditor editor = (TextEditor) IDE.openEditor(page, file, true);
                    editor.selectAndReveal(contents.length(), 0);
                }
            }
        }
        catch (CoreException e) {
            CCWPlugin.logError(e);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.