Package org.eclipse.ui

Examples of org.eclipse.ui.IWorkbench


   */
  @Override
  public void stop() {
    if (!PlatformUI.isWorkbenchRunning())
      return;
    final IWorkbench workbench = PlatformUI.getWorkbench();
    final Display display = workbench.getDisplay();
    display.syncExec(new Runnable() {
      @Override
      public void run() {
        if (!display.isDisposed())
          workbench.close();
      }
    });
  }
View Full Code Here


   */
  @Override
  public void stop() {
    if (!PlatformUI.isWorkbenchRunning())
      return;
    final IWorkbench workbench = PlatformUI.getWorkbench();
    final Display display = workbench.getDisplay();

    display.syncExec(new Runnable() {
      @Override
      public void run() {
        if (!display.isDisposed())
          workbench.close();
      }
    });
  }
View Full Code Here

     * Adds items action in the correct locations in the menu.
     *
     * @param manager
     */
    public void contribute( IMenuManager manager ) {
        IWorkbench workbench = PlatformUI.getWorkbench();
        IContextService contextService = (IContextService) workbench.getService(IContextService.class);
        Collection<String> active = (Collection<String> )contextService.getActiveContextIds();
       
        MenuManager actionMenu = new MenuManager(name, id);
        final String actionExt = "action.ext";
    actionMenu.add(new GroupMarker(actionExt)); //$NON-NLS-1$
View Full Code Here

   * @see org.eclipse.equinox.app.IApplication#stop()
   */
  public void stop() {
    if (!PlatformUI.isWorkbenchRunning())
      return;
    final IWorkbench workbench = PlatformUI.getWorkbench();
    final Display display = workbench.getDisplay();
    display.syncExec(new Runnable() {
      public void run() {
        if (!display.isDisposed())
          workbench.close();
      }
    });
  }
View Full Code Here

    public boolean performFinish() {
        Display.getDefault().asyncExec(new Runnable(){
            public void run() {
                try {
                    IWorkbench wb = PlatformUI.getWorkbench();
                    IProgressService ps = wb.getProgressService();
                    ps.busyCursorWhile(new IRunnableWithProgress(){

                        public void run( IProgressMonitor pm ) {

                            String geopaparazziFolderPath = mainPage.getGeopaparazziFolderPath();
View Full Code Here

  /* (non-Javadoc)
   * @see org.eclipse.equinox.app.IApplication#stop()
   */
  public void stop() {
    final IWorkbench workbench = PlatformUI.getWorkbench();
    if (workbench == null)
      return;
    final Display display = workbench.getDisplay();
    display.syncExec(new Runnable() {
      public void run() {
        if (!display.isDisposed())
          workbench.close();
      }
    });
  }
View Full Code Here

    /**
     * Registers the object with the platform
     */
    public void startup() {
        ApplicationGIS.setActiveMapTracker(this);
        IWorkbench workbench = PlatformUI.getWorkbench();
        workbench.addWindowListener(this);
        IWorkbenchWindow[] windows = workbench.getWorkbenchWindows();
        for( IWorkbenchWindow workbenchWindow : windows ) {
            windowOpened(workbenchWindow);
        }
    }
View Full Code Here

                // });
                return;
            }
        }

        IWorkbench wb = PlatformUI.getWorkbench();
        final IProgressService ps = wb.getProgressService();
        ps.busyCursorWhile(new IRunnableWithProgress(){
            public void run( IProgressMonitor pm ) {
                try {
                    op.op(Display.getDefault(), selectedLayer, pm);
                } catch (Exception e) {
View Full Code Here

* @author Jody Garnett
*/
public class StartupOperations implements IStartup {

    public void earlyStartup() {
        final IWorkbench workbench = PlatformUI.getWorkbench();
        //workbench.getDisplay().asyncExec(new Runnable() {
        //    public void run() {
        // IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
        // if (window != null) {           
        processOperations( workbench );
View Full Code Here

        if (part == null)
            return null;
        return (IEditorSite) part.getSite();
    }
    private IWorkbenchWindow getWindow() {
        IWorkbench bench=PlatformUI.getWorkbench();
        if( bench==null)
            return null;
        IWorkbenchWindow window = bench.getActiveWorkbenchWindow();
        if( window==null ){
            if( bench.getWorkbenchWindowCount()>0 )
                window=bench.getWorkbenchWindows()[0];
        }
        return window;
    }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.IWorkbench

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.