Package org.eclipse.ui

Examples of org.eclipse.ui.IWorkbenchPage.activate()


    final IEditorInput input = new FileEditorInput(file);
    // try to find an open editor with this input
    IEditorPart part = page.findEditor(input);
    if (part != null) {
      // found one, activate it
      page.activate(part);
    } else {
      // no editor found, open a new one
      final String editorId = getEditorIdForFile(file);
      part = page.openEditor(input, editorId);
    }
View Full Code Here


    final IEditorInput input = new FileEditorInput(file);
    // try to find an open editor with this input
    IEditorPart part = page.findEditor(input);
    if (part != null) {
      // found one, activate it
      page.activate(part);
    } else {
      // no editor found, open a new one
      final String editorId = getEditorIdForFile(file);
      part = page.openEditor(input, editorId);
    }
View Full Code Here

        if (textEditor != null) {
          IDocument document = textEditor.getDocumentProvider().getDocument(editor.getEditorInput());
          try {
            int start = document.getLineOffset(line - 1);
            ((ITextEditor) textEditor).selectAndReveal(start, 0);
            page.activate(editor);
          }
          catch (BadLocationException x) {
            // ignore
          }
        }
View Full Code Here

    if (editor != null) {
    IEditorInput input = editor.getEditorInput();
      if (input instanceof IFileEditorInput) {
        IFile file = ((IFileEditorInput) input).getFile();
        if (targetIFile.equals(file)) {
          page.activate(editor);
        }
      }
    }

    try {
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.