Package org.eclipse.ui

Examples of org.eclipse.ui.IWorkbenchWindow


                ErrorDialog.openError(getShell(), "New Blueprint XML File", null, new Status(IStatus.ERROR, Plugin.PLUGIN_ID, 0, "Error updating bnd file", e));
            }
        }

        // Open editor on new file.
        IWorkbenchWindow dw = workbench.getActiveWorkbenchWindow();
        try {
            if (dw != null) {
                IWorkbenchPage page = dw.getActivePage();
                if (page != null) {
                    IDE.openEditor(page, file, true);
                }
            }
        } catch (PartInitException e) {
View Full Code Here


                            throw new InvocationTargetException(e);
                        }
                    }
                };

                IWorkbenchWindow window = ((IFormPage) getManagedForm().getContainer()).getEditorSite().getWorkbenchWindow();
                window.run(false, false, runnable);
                return result;
            } catch (InvocationTargetException e) {
                logger.logError("Error searching for BundleActivator types", e.getTargetException());
                return Collections.emptyList();
            } catch (InterruptedException e) {
View Full Code Here

            public boolean select(String packageName) {
                return !packageName.equals("java") && !packageName.startsWith("java.") && !packageNameSet.contains(packageName);
            }
        };
        IFormPage page = (IFormPage) getManagedForm().getContainer();
        IWorkbenchWindow window = page.getEditorSite().getWorkbenchWindow();

        // Prepare the package lister from the Java project
        IJavaProject javaProject = getJavaProject();
        if (javaProject == null) {
            MessageDialog.openError(getSection().getShell(), "Error", "Cannot add packages: unable to find a Java project associated with the editor input.");
View Full Code Here

    private CallHierarchyViewPart callHierarchyPart;
    private MethodWrapper currentRootMethod;
   
    public CallHierarchyTracker() {
        callModel = new CallModel();
        IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
        addPageListener(window);
        addPartListener(window.getActivePage());
    }
View Full Code Here

    /**
     * Unregister the active IPartListener and IPageListener. Call on plug-in shutdown to enable
     * clean deregistration of all the active listeners.
     */
    public void dispose() {
        IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
        removePageListener(window);
        removePartListener(window.getActivePage());
    }
View Full Code Here

  @Override
  public void earlyStartup() {
    final IWorkbench workbench = PlatformUI.getWorkbench();
    workbench.getDisplay().asyncExec(new Runnable() {
      public void run() {
        IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
        if (window != null) {
          TabKeyHandler.setup(window.getActivePage());
        }
      }
    });
  }
View Full Code Here

  public ResourceBundle getResourceBundle() {
    return resourceBundle;
  }

  public static IWorkbenchWindow getWorkbenchWindow() {
    IWorkbenchWindow window = getDefault().getWorkbench()
        .getActiveWorkbenchWindow();
    if (window == null)
      window = getDefault().getWorkbench().getWorkbenchWindows()[0];
    return window;
  }
View Full Code Here

     *
     * @return the active workbench shell or <code>null</code> if none
     */
    public static Shell getActiveWorkbenchShell()
    {
        IWorkbenchWindow window = getActiveWorkbenchWindow();
        if (window == null)
            window = getDefault().getWorkbench().getWorkbenchWindows()[0];
        if (window != null)
        {
   
            return window.getShell();
        }
        return null;
    }
View Full Code Here

            : "org.epic.debug";
    }

    public static IWorkbenchWindow getWorkbenchWindow()
    {
        IWorkbenchWindow window = getDefault().getWorkbench()
            .getActiveWorkbenchWindow();
        if (window == null)
            window = getDefault().getWorkbench().getWorkbenchWindows()[0];
        return window;
    }
View Full Code Here

    transformer.transform(new DOMSource(document.getDocumentElement()), new StreamResult(writer));
    return writer.toString().replace("\\s+\\n", "\\n");
  }

  public static void cleanUpProjects() throws CoreException {
    IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
    if (window != null) {
      IWorkbenchPage page = window.getActivePage();
      if (page != null) {
        page.closeAllEditors(false);
      }
    }
    deleteAllProjects();
View Full Code Here

TOP

Related Classes of org.eclipse.ui.IWorkbenchWindow

Copyright © 2018 www.massapicom. 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.