Package org.eclipse.ui.progress

Examples of org.eclipse.ui.progress.UIJob


            if (!(obj instanceof IPHPDebugTarget))
              continue;

            if (events[i].getKind() == DebugEvent.TERMINATE) {
              target = (IPHPDebugTarget) obj;
              Job job = new UIJob(
                  PHPDebugUIMessages.PHPDebugUIPlugin_0) { //$NON-NLS-1$
                public IStatus runInUIThread(
                    IProgressMonitor monitor) {
                  update(target);
                  return Status.OK_STATUS;
                }
              };
              job.schedule();
            }
          }
        }
      }
    };
View Full Code Here


    if (!forceAsync && delay == 0 && (widget == null || !widget.isDisposed()) && Display.getCurrent() != null)
      runnable.run();

    /* Otherwise use UI Job */
    else {
      UIJob uiJob = new UIJob("") { //$NON-NLS-1$
        @Override
        public IStatus runInUIThread(IProgressMonitor monitor) {
          if (widget == null || !widget.isDisposed())
            runnable.run();
          return Status.OK_STATUS;
        }
      };

      uiJob.setSystem(true);
      uiJob.setUser(false);
      uiJob.schedule(delay);
    }
  }
View Full Code Here

    /* Remember to dispose later */
    fLastUsedRegion = region;
  }

  private void createAutoCloser() {
    fAutoCloser = new UIJob(PlatformUI.getWorkbench().getDisplay(), "") { //$NON-NLS-1$
      @Override
      public IStatus runInUIThread(IProgressMonitor monitor) {
        if (!fMouseOverNotifier && getShell() != null && !getShell().isDisposed() && !monitor.isCanceled())
          doClose();

View Full Code Here

  private void createJob(ITask.Priority priority) {

    /* Create a UI-Job */
    if (fRunInUIThread) {
      fJob = new UIJob("") { //$NON-NLS-1$
        @Override
        public IStatus runInUIThread(IProgressMonitor monitor) {
          try {
            if (!monitor.isCanceled() && fTask != null)
              return fTask.run(monitor);
View Full Code Here

    /* Only run if not canceld yet */
    if (!monitor.isCanceled())
      synchronizedSafeRunInBackground(monitor);

    /* Schdule UIJob now */
    UIJob uiJob = new UIJob(NAME) {
      @Override
      public IStatus runInUIThread(IProgressMonitor monitor) {

        /* If Control is provided, check disposed State */
        if (fControl != null && fControl.isDisposed())
          return Status.OK_STATUS;

        /* Run UI-Task */
        synchronizedSafeRunInUI(monitor);

        return Status.OK_STATUS;
      }

      /*
       * @see org.eclipse.core.runtime.jobs.Job#belongsTo(java.lang.Object)
       */
      @Override
      public boolean belongsTo(Object family) {
        if (fFamily == null)
          return super.belongsTo(family);

        return fFamily.equals(family);
      }
    };

    uiJob.setSystem(true);
    uiJob.setUser(false);

    /* Only run if not canceld yet */
    if (!monitor.isCanceled())
      uiJob.schedule();

    monitor.done();

    return Status.OK_STATUS;
  }
View Full Code Here

     * Reloading XML data (with cause).
     */
    private class ReloadXMLJob extends PostponableJob {
        public ReloadXMLJob(final String origin)
        {
            super(new UIJob("Browser refresh [" + origin + "]...") {
                public IStatus runInUIThread(IProgressMonitor monitor)
                {
                    logger.debug("Browser refresh [" + origin + "]");
                    return reloadDataXml();
                }
View Full Code Here

    protected boolean shouldCreateToolTip(Event event)
    {
        boolean value = super.shouldCreateToolTip(event);
        if (value && isSynchronizedWithView())
        {
            final Job job = new UIJob("Show attribute info") {
                @Override
                public IStatus runInUIThread(IProgressMonitor monitor)
                {
                    showInView();
                    return Status.OK_STATUS;
                }
            };
            job.setSystem(true);
            job.setPriority(Job.DECORATE);
            job.schedule();

            value = false;
        }
        return value;
    }
View Full Code Here

    case IResource.ROOT:
    case IResource.PROJECT:
      final IProject project = (IProject) source;
      if (isActivitiProject(project)) {
        updateModel(project);
        new UIJob("Update Project Model in CommonViewer") { //$NON-NLS-1$

          @Override
          public IStatus runInUIThread(IProgressMonitor monitor) {
            if (getStructuredViewer() != null && !getStructuredViewer().getControl().isDisposed()) {
              getStructuredViewer().refresh(project);
View Full Code Here

      return true;
    case IResource.FILE:
      final IFile file = (IFile) source;
      if (isDiagramFile(file)) {
        updateModel(file);
        new UIJob("Update Process Model in CommonViewer") { //$NON-NLS-1$

          @Override
          public IStatus runInUIThread(IProgressMonitor monitor) {
            if (getStructuredViewer() != null && !getStructuredViewer().getControl().isDisposed()) {
              getStructuredViewer().refresh(file);
View Full Code Here

    try {
      Map<String, String> allNamespacesMap = getAllNamespacesMap();
      updateNamespacesTableData(allNamespacesMap);
      outputResult();
    } catch (final XPathExpressionException e) {
      new UIJob(bundle.getString("label.namespace.loader")) {
        @Override
        public IStatus runInUIThread(IProgressMonitor monitor) {
          Notification.showToolTip(SWT.BALLOON | SWT.ICON_ERROR, bundle.getString("label.error"), e.getMessage(), component);
          return Status.OK_STATUS;
        }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.progress.UIJob

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.