Package org.eclipse.swt.widgets

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


    final IWorkbenchPage activePage = workbench.getActiveWorkbenchWindow().getActivePage();
    if (activePage != null) {
      final Display display = getShell().getDisplay();
      if (display != null) {
        display.asyncExec(new Runnable() {
          public void run() {
            try {
              IDE.openEditor(activePage, resource, true);
            } catch (PartInitException e) {
              Activator.logException(e);
View Full Code Here


    final IWorkbenchPage activePage = workbench.getActiveWorkbenchWindow().getActivePage();
    if (activePage != null) {
      final Display display = getShell().getDisplay();
      if (display != null) {
        display.asyncExec(new Runnable() {
          public void run() {
            try {
              IDE.openEditor(activePage, resource, true);
            } catch (PartInitException e) {
              Activator.logException(e);
View Full Code Here

    final IWorkbenchPage activePage = workbench.getActiveWorkbenchWindow().getActivePage();
    if (activePage != null) {
      final Display display = getShell().getDisplay();
      if (display != null) {
        display.asyncExec(new Runnable() {
          public void run() {
            try {
              IDE.openEditor(activePage, resource, true);
            } catch (PartInitException e) {
              Activator.logException(e);
View Full Code Here

    final IWorkbenchPage activePage = workbench.getActiveWorkbenchWindow().getActivePage();
    if (activePage != null) {
      final Display display = getShell().getDisplay();
      if (display != null) {
        display.asyncExec(new Runnable() {
          public void run() {
            try {
              IDE.openEditor(activePage, resource, true);
            } catch (PartInitException e) {
              Activator.logException(e);
View Full Code Here

    final IWorkbenchPage activePage = workbench.getActiveWorkbenchWindow().getActivePage();
    if (activePage != null) {
      final Display display = getShell().getDisplay();
      if (display != null) {
        display.asyncExec(new Runnable() {
          public void run() {
            try {
              IDE.openEditor(activePage, resource, true);
            } catch (PartInitException e) {
              Activator.logException(e);
View Full Code Here

  private void postOnDisplayQue(Runnable runnable) {
    IWorkbench workbench = PlatformUI.getWorkbench();
    IWorkbenchWindow[] windows = workbench.getWorkbenchWindows();
    if (windows != null && windows.length > 0) {
      Display display = windows[0].getShell().getDisplay();
      display.asyncExec(runnable);
    } else {
      runnable.run();
    }
  }
View Full Code Here

      shouldClose = true;
    }
    else {
      if (getEditorPart() != null) {
        Display display = getSite().getShell().getDisplay();
        display.asyncExec(new Runnable() {

          public void run() {
            getSite().getPage().closeEditor(getEditorPart(), save);
          }
        });
View Full Code Here

      shouldClose = true;
    }
    else {
      if (getEditorPart() != null) {
        Display display = getSite().getShell().getDisplay();
        display.asyncExec(new Runnable() {

          public void run() {
            getSite().getPage().closeEditor(getEditorPart(), save);
          }
        });
View Full Code Here

            for (int i = 0; i < structuredDocumentRegions.length; i++) {
              regionCount += structuredDocumentRegions[i].getNumberOfRegions();
            }
            NumberFormat formatter = NumberFormat.getIntegerInstance();
            final String regioncount = "Count: " + formatter.format(structuredDocumentRegions.length) + " document regions containing " + formatter.format(regionCount) + " text regions representing " + formatter.format(length) + " characters";//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
            display.asyncExec(new Runnable() {
              public void run() {
                if (!counts.isDisposed()) {
                  counts.setText(regioncount);
                  counts.setEnabled(true);
                }
View Full Code Here

    // check if 'okToUse'
    if (textWidget != null && !textWidget.isDisposed()) {
      display = textWidget.getDisplay();
      if ((display != null) && (!display.isDisposed())) {
        display.asyncExec(new Runnable() {
          public void run() {
            if (textWidget != null && !textWidget.isDisposed()) {
              fireCaretEvent(new CaretEvent(textWidget, textWidget.getCaretOffset()));
            }
          }
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.