Examples of asyncExec()


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

      return;
    }
    final Display display = configurer.getWorkbench().getDisplay();
    if (display != null && !display.isDisposed()) {
      try {
        display.asyncExec(new Runnable() {
          public void run() {
            display.timerExec(-1, handler);
            display.removeFilter(SWT.KeyUp, idleListener);
            display.removeFilter(SWT.MouseUp, idleListener);
          }
View Full Code Here

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

        job.addJobChangeListener(new JobChangeAdapter() {
            @Override
            public void done(IJobChangeEvent event) {
                if (job.getResult().isOK()) {
                    final List<ImportPackage> imports = job.getImportResults();
                    display.asyncExec(new Runnable() {
                        public void run() {
                            if (tree != null && !tree.isDisposed())
                                viewer.setInput(imports);
                        }
                    });
View Full Code Here

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

    canvas.addListener(SWT.MouseDown, new Listener() {
      public void handleEvent(Event e) {
        browser.setUrl(getResourceString("Startup"));
      }
    });
    display.asyncExec(new Runnable() {
      public void run() {
        if (canvas.isDisposed())
          return;
        if (busy) {
          index++;
View Full Code Here

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

        final IWorkbench workBench = PerlEditorPlugin.getDefault()
            .getWorkbench();

        Display display = workBench.getDisplay();

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

                IWorkbenchWindow window = workBench.getActiveWorkbenchWindow();
View Full Code Here

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

        };
        Display d = Display.getCurrent();
        if (d == null)
        {
            d = Display.getDefault();
            d.asyncExec(r);
        }
        else
        {
            d.syncExec(r);
        }
View Full Code Here

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

                    r.run();
                }
                else
                {
                    // Not on the UI thread, need to bung over the runnable
                    display.asyncExec(r);
                }
            }
            catch (SWTError e)
            {
                if (e.code == SWT.ERROR_WIDGET_DISPOSED)
View Full Code Here

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

                    r.run();
                }
                else
                {
                    // Not on the UI thread, need to bung over the runnable
                    display.asyncExec(r);
                }
            }
            catch (SWTError e)
            {
                if (e.code == SWT.ERROR_WIDGET_DISPOSED)
View Full Code Here

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

                final Display display = shell.getDisplay();
                if (display.isDisposed()) {
                    return;
                }

                display.asyncExec(new Runnable() {

                    /*
                     * @see java.lang.Runnable#run()
                     */
                    @Override
View Full Code Here

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

    @Override
    public void runtimeRemoved(final IBackend b) {
        ErlLogger.debug("$$ removed backend " + b.getName());
        final IWorkbench workbench = PlatformUI.getWorkbench();
        final Display display = workbench.getDisplay();
        display.asyncExec(new Runnable() {

            @Override
            public void run() {
                // PopupDialog.showBalloon("Backend notification", "Removed "
                // + b.getInfo().getName(), DELAY);
View Full Code Here

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

public final class DisplayUtils {

    public static void asyncExec(final Runnable runnable) {
        final Display display = PlatformUI.getWorkbench().getDisplay();
        if (display != null && !display.isDisposed()) {
            display.asyncExec(runnable);
        }
    }

    public static void syncExec(final Runnable runnable) {
        if (Display.getCurrent() == null) {
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.