Package org.eclipse.ui

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


  public static IEditorPart openEditor(IWorkbench workbench, IFile file, String editorID) throws PartInitException {
    IEditorInput editorInput = new FileEditorInput(file);
    IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
    IWorkbenchPage page = window.getActivePage();
    return page.openEditor(editorInput, editorID);
  }
 
  public static IEditorPart openEditor(IWorkbench workbench, IFile file) throws PartInitException {
    IEditorDescriptor desc = PlatformUI.getWorkbench().getEditorRegistry().getDefaultEditor(file.getName());
    if (desc != null) {
View Full Code Here


      private void openInternal(URL url) throws PartInitException {
        WebBrowserInput input = new WebBrowserInput(url.toExternalForm());
        IWorkbenchPage page = OwlUI.getPage();
        if (page != null)
          fBrowserView = page.openEditor(input, WebBrowserView.EDITOR_ID);
      }

      private void openExternal(URL url) {
        BrowserUtils.openLink(url.toExternalForm());
      }
View Full Code Here

          if (page != null) {
            for (int i = 0; i < bookmarksToOpenOnStartup.size() && i < openEditorLimit; i++) {
              try {
                IBookMark bookMarkToOpen = bookmarksToOpenOnStartup.get(i);
                page.openEditor(new FeedViewInput(bookMarkToOpen), FeedView.ID, activateEditor);
              } catch (PartInitException e) {
                Activator.getDefault().getLog().log(e.getStatus());
              }
            }
          }
View Full Code Here

      private void openInternal(URL url) throws PartInitException {
        WebBrowserInput input = new WebBrowserInput(url.toExternalForm());
        IWorkbenchPage page = OwlUI.getPage();
        if (page != null)
          fBrowserView = page.openEditor(input, WebBrowserView.EDITOR_ID);
      }

      private void openExternal(URL url) {
        BrowserUtils.openLink(url.toExternalForm());
      }
View Full Code Here

        /* Open Browser in new Tab */
        WebBrowserInput input = new WebBrowserInput(URIUtils.ABOUT_BLANK);
        IWorkbenchPage page = OwlUI.getPage();
        if (page != null) {
          try {
            WebBrowserView browserView = (WebBrowserView) page.openEditor(input, WebBrowserView.EDITOR_ID, OpenStrategy.activateOnOpen());
            event.browser = browserView.getBrowser().getControl();
          } catch (PartInitException e) {
            Activator.getDefault().getLog().log(e.getStatus());
          }
        }
View Full Code Here

        /* Open Browser in new Tab */
        WebBrowserInput input = new WebBrowserInput(URIUtils.ABOUT_BLANK);
        IWorkbenchPage page = OwlUI.getPage();
        if (page != null) {
          try {
            WebBrowserView browserView = (WebBrowserView) page.openEditor(input, WebBrowserView.EDITOR_ID, OpenStrategy.activateOnOpen());
            event.browser = browserView.getBrowser().getControl();
          } catch (PartInitException e) {
            Activator.getDefault().getLog().log(e.getStatus());
          }
        }
View Full Code Here

      if (obj instanceof IMark) {
        IMark mark = ((IMark) obj);
        try {
          IWorkbenchPage page = OwlUI.getPageAtCursor();
          if (page != null) {
            page.openEditor(new FeedViewInput(mark), FeedView.ID, activateEditor);
            openedEditors++;
          }
        } catch (PartInitException e) {
          Activator.getDefault().getLog().log(e.getStatus());
        }
View Full Code Here

            feedview.setSelection(new StructuredSelection(news));
          }

          /* Otherwise open the Input in a new Editor */
          else
            feedview = (FeedView) page.openEditor(fvInput, FeedView.ID, true);

          openedEditors++;
          lastOpenedEditor = feedview;
        } catch (PartInitException e) {
          Activator.getDefault().getLog().log(e.getStatus());
View Full Code Here

            feedview.setSelection(new StructuredSelection(news));
          }

          /* Otherwise open the Input in a new Editor */
          else
            feedview = (FeedView) page.openEditor(fvInput, FeedView.ID, true);

          openedEditors++;
          lastOpenedEditor = feedview;
        } catch (PartInitException e) {
          Activator.getDefault().getLog().log(e.getStatus());
View Full Code Here

        /* Display selected Feed since its existing already */
        else {
          IWorkbenchPage page = OwlUI.getPage();
          if (page != null) {
            try {
              page.openEditor(new FeedViewInput(existingBookMark), FeedView.ID, OpenStrategy.activateOnOpen());
            } catch (PartInitException e) {
              Activator.getDefault().getLog().log(e.getStatus());
            }
          }
        }
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.