Package org.eclipse.ui

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


        getShell().getDisplay().asyncExec(new Runnable() {
            public void run() {
                IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
                        .getActivePage();
                try {
                    page.openEditor(new IvyFileEditorInput(file), IvyModuleDescriptorEditor.ID,
                        true);
                    // IDE.openEditor(page, file, IvyEditor.ID, true);
                } catch (PartInitException e) {
                    // this should not happen
                    IvyPlugin.logError("The editor could not be opened", e);
View Full Code Here


          try {
            ZooKeeperClient client = ZooKeeperManager.INSTANCE.getClient(zkn.getServer());
            byte[] open = client.open(zkn);
            IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
            IEditorDescriptor defaultEditor = PlatformUI.getWorkbench().getEditorRegistry().getDefaultEditor(zkn.getNodeName());
            activePage.openEditor(new ZooKeeperNodeEditorInput(zkn, open), defaultEditor == null ? "org.eclipse.ui.DefaultTextEditor"
                : defaultEditor.getId(), true);
          } catch (CoreException e) {
            logger.error(e.getMessage(), e);
          } catch (IOException e) {
            logger.error(e.getMessage(), e);
View Full Code Here

      } catch (CoreException e) {
        RutaAddonsPlugin.error(e);
      }
    }
    try {
      page.openEditor(new FileEditorInput(file), "org.apache.uima.caseditor.editor");
      page.showView(TruePositiveView.ID);
      page.showView(FalsePositiveView.ID);
      page.showView(FalseNegativeView.ID);
    } catch (PartInitException e) {
      RutaAddonsPlugin.error(e);
View Full Code Here

            IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
                    .getActivePage();
            if (file != null) {
                try {
                    String editorId = "org.apache.ivyde.editors.IvyEditor";
                    page.openEditor(new FileEditorInput(file), editorId, true);
                    // only remember the default editor if the open succeeds
                    IDE.setDefaultEditor(file, editorId);
                } catch (PartInitException e) {
                    Shell parent = page.getWorkbenchWindow().getShell();
                    String title = "Problems Opening Editor";
View Full Code Here

        getShell().getDisplay().asyncExec(new Runnable() {
            public void run() {
                IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
                        .getActivePage();
                try {
                    page.openEditor(new IvyFileEditorInput(file), IvyEditor.ID, true);
                    // IDE.openEditor(page, file, IvyEditor.ID, true);
                } catch (PartInitException e) {
                    // this should not happen
                    IvyPlugin.log(IStatus.ERROR, "The editor could not be opened", e);
                }
View Full Code Here

    Shell shell = new Shell();
    shell.getDisplay().asyncExec(new Runnable() {
      public void run() {
        IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
        try {
          page.openEditor(new FileEditorInput(ffile), "taeconfigurator.editors.MultiPageEditor"); //$NON-NLS-1$
        } catch (PartInitException e) {
          throw new InternalErrorCDE("unexpected exception");
        }
      }
    });
View Full Code Here

    Shell shell = new Shell();
    shell.getDisplay().asyncExec(new Runnable() {
      public void run() {
        IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
        try {
          page.openEditor(new FileEditorInput(ffile), "org.eclipse.ui.DefaultTextEditor"); //$NON-NLS-1$
        } catch (PartInitException e) {
          throw new InternalErrorCDE("unexpected exception");
        }
      }
    });
View Full Code Here

          window.getShell().getDisplay().asyncExec(new Runnable() {
           
            @Override
            public void run() {
              try {
                final IEditorPart editor = page.openEditor(
                    editorInput, descFinal.getId());
                editor.addPropertyListener(new IPropertyListener() {
                  public void propertyChanged(Object source,
                      int propId) {
                    if (IEditorPart.PROP_DIRTY == propId) {
View Full Code Here

                        public void run() {
                            try {
                                FileEditorInput input = new FileEditorInput((IFile) extFile);

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

            if (buildFile == null)
                return null;

            FileEditorInput input = new FileEditorInput(buildFile);
            IWorkbenchPage page = HandlerUtil.getActiveWorkbenchWindowChecked(event).getActivePage();
            page.openEditor(input, "bndtools.bndWorkspaceConfigEditor", true);
        } catch (PartInitException e) {
            ErrorDialog.openError(HandlerUtil.getActiveWorkbenchWindowChecked(event).getShell(), "Error", "Unable to open editor", e.getStatus());
        } catch (Exception e) {
            logger.logError("Error retrieving bnd configuration file", 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.