Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Display.asyncExec()


      if (images != null) {
        staleImages.addImagesToDispose(images);
        // Run async to avoid deadlock from dispose
        Display display = Display.getDefault();
        if (display != null) {
          display.asyncExec(new Runnable() {
            public void run() {
              staleImages.disposeStaleImages();
            }
          });
        }
View Full Code Here


                        }
                    }
                }
            };
            if (asynch)
                display.asyncExec(r);
            else
                PlatformGIS.syncInDisplayThread(r);
        }
    }
View Full Code Here

        Display display = Display.getCurrent();
        if (display == null) {
            display = Display.getDefault();
        }
        display.asyncExec(runnable);

    }   
   
   
View Full Code Here

          command.setMap(getContext().getMap());
          command.run(monitor);
        } catch (Exception e) {
          ToolsPlugin.log("Exception thrown while committing", e); //$NON-NLS-1$
          Display display = Display.getDefault();
          display.asyncExec(new Runnable() {
            public void run() {
             
              Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
              String message = Messages.CommitTool_Error_message;
              MessageDialog.openError(parent , Messages.CommitTool_error_shell_title, message);
View Full Code Here

            }
        };
        if (d == null) {
            Display.getDefault().asyncExec(runnable);
        } else {
            d.asyncExec(runnable);
        }

    }
    AtomicReference<SetSelectionListener> inputChangedListener = new AtomicReference<SetSelectionListener>();
View Full Code Here

            tool.setCursorID(cursor_id+""); //$NON-NLS-1$
          }
//            setCursor(Display.getCurrent().getSystemCursor(cursor_id));
        } else {
            final Display display = PlatformUI.getWorkbench().getDisplay();
            display.asyncExec(new Runnable(){

                public void run() {
                  if(tool != null){
                    tool.setCursorID(cursor_id+""); //$NON-NLS-1$
                  }
View Full Code Here

          if(tool != null){
            tool.setCursorID(cursorID);
          }
        } else {
            final Display display = PlatformUI.getWorkbench().getDisplay();
            display.asyncExec(new Runnable(){
                public void run() {
                  if(tool != null){
                    tool.setCursorID(cursorID);
                  }
                }
View Full Code Here

        if( Display.getCurrent()!=null ){
            getContext().getViewportPane().setCursor(cursor);
        }else{
            final Display display = PlatformUI.getWorkbench().getDisplay();
            display.asyncExec(new Runnable(){
   
                public void run() {
                    getContext().getViewportPane().setCursor(cursor);
                }
            });
View Full Code Here

            display = bench.getDisplay();

        if (display == null)
            display = Display.getDefault();

        display.asyncExec(runnable);
    }
    public BasicCommandFactory getBasicCommandFactory() {
        return this.basicCommandFactory;
    }
View Full Code Here

        Display display = PlatformUI.getWorkbench().getDisplay();
        if (display == null)
            display = Display.getDefault();

        display.asyncExec(new Runnable(){
            public void run() {

                IContributionManager bar = mapEditorSite.getActionBars().getStatusLineManager();
                if (bar == null)
                    return;
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.