Package org.eclipse.ui

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


        /* Open Browser Tab in Background */
        if (multipleTabs && openInBackground) {
          IEditorPart previousActiveEditor = page.getActiveEditor();
          page.getWorkbenchWindow().getShell().setRedraw(false);
          try {
            view = (WebBrowserView) page.openEditor(input, WebBrowserView.EDITOR_ID, true);

            if (previousActiveEditor != null)
              page.activate(previousActiveEditor);
          } finally {
            page.getWorkbenchWindow().getShell().setRedraw(true);
View Full Code Here


          }
        }

        /* Open Browser Tab in Front */
        else
          view = (WebBrowserView) page.openEditor(input, WebBrowserView.EDITOR_ID, true);
      }
    } catch (PartInitException e) {
      Activator.getDefault().logError(e.getMessage(), e);
    }

View Full Code Here

                        .getResourceAsStream( "default-server-1.5.5.xml" ) ); //$NON-NLS-1$
                    break;
            }

            IWorkbenchPage page = window.getActivePage();
            page.openEditor( new NonExistingServerConfigurationInput( serverConfiguration ),
                ServerConfigurationEditor.ID );
        }
        catch ( PartInitException e )
        {
            return false;
View Full Code Here

        }
      }

      // set the active page and open the welcome editor
      window.setActivePage(page);
      page.openEditor(new WelcomeEditorInput(
          welcomePerspectiveInfos[index]), WELCOME_EDITOR_ID, true);
    }
    cleanUpEditorArea();
  }
View Full Code Here

      page.activate(editor);
      return;
    }

    try {
      page.openEditor(input, WELCOME_EDITOR_ID);
    } catch (PartInitException e) {
      ErrorDialog
          .openError(
              win.getShell(),
              IDEWorkbenchMessages.Workbench_openEditorErrorDialogTitle,
View Full Code Here

                    try
                    {
                        IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
                        IWorkbenchPage page = window.getActivePage();
                        IEditorPart editor = page.openEditor( input, editorId );
                        IDocumentProvider documentProvider = ( ( LdifEditor ) editor ).getDocumentProvider();
                        if ( documentProvider != null && input != null )
                        {
                            IDocument document = documentProvider.getDocument( input );
                            if ( document != null )
View Full Code Here

        IEditorInput input = new NonExistingLdifEditorInput();
        String editorId = LdifEditor.getId();
        try
        {
            IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
            page.openEditor( input, editorId );
        }
        catch ( PartInitException e )
        {
        }
    }
View Full Code Here

            IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
            FileEditorInput input = new FileEditorInput(file);

            try {
                IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
                page.openEditor(input, "bndtools.bndWorkspaceConfigEditor", true);
            } catch (PartInitException ex) {
                ErrorDialog.openError(getSection().getShell(), "Error", "Unable to open editor", ex.getStatus());
            }
        }
    }
View Full Code Here

      IWorkbenchWindow workbenchWindow = ServerUIPlugin.getInstance().getWorkbench().getActiveWorkbenchWindow();
      IWorkbenchPage page = workbenchWindow.getActivePage();

      try {
        // open server editor
        ServerEditor editor = (ServerEditor) page.openEditor(new ServerEditorInput(server.getId()),
            IServerEditorInput.EDITOR_ID);

        // set applications page to active
        Method method = MultiPageEditorPart.class.getDeclaredMethod("setActivePage", int.class); //$NON-NLS-1$
        method.setAccessible(true);
View Full Code Here

        }
        IServer server = servers[0];
        final String url = node.getURLForBrowser(server)+".html";
    try {
      IEditorInput input = new WebBrowserEditorInput(url);
      page.openEditor(input, "org.apache.sling.ide.eclipse.ui.editors.WebBrowser", true);
    } catch (PartInitException e1) {
      //TODO proper logging
      e1.printStackTrace();
      MessageDialog.openWarning(shell, "Cannot open browser", "Opening caused an exception: "+e1.getMessage());
    }
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.