Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.SubProgressMonitor.worked()


                    } catch (CoreException e) {
                        recordError(e); // log error
                        return false;
                    }
                }
                subMonitor.worked(1);
                if (subMonitor.isCanceled()) {
                    throw new OperationCanceledException();
                }
            }
        } catch (CoreException e) {
View Full Code Here


      SubProgressMonitor subMonitor = null;
      try {
        if (monitor != null) {
          subMonitor = new SubProgressMonitor(monitor, 50); // 50% of the time is spent in initializing containers and variables
          subMonitor.beginTask("", 100); //$NON-NLS-1$
          subMonitor.worked(5); // give feedback to the user that something is happening
          manager.batchContainerInitializationsProgress.initializeAfterLoadMonitor.set(subMonitor);
        }
        if (manager.forceBatchInitializations(true/*initAfterLoad*/)) { // if no other thread has started the batch container initializations
          manager.getClasspathContainer(Path.EMPTY, null); // force the batch initialization
        } else { // else wait for the batch initialization to finish
View Full Code Here

          manager.getClasspathContainer(Path.EMPTY, null); // force the batch initialization
        } else { // else wait for the batch initialization to finish
          while (manager.batchContainerInitializations == JavaModelManager.BATCH_INITIALIZATION_IN_PROGRESS) {
            if (subMonitor != null) {
              subMonitor.subTask(manager.batchContainerInitializationsProgress.subTaskName);
              subMonitor.worked(manager.batchContainerInitializationsProgress.getWorked());
            }
            synchronized(manager) {
              try {
                manager.wait(100);
              } catch (InterruptedException e) {
View Full Code Here

            if (subRepo != null)
              ProjectUtil.refreshValidProjects(
                  ProjectUtil.getValidOpenProjects(subRepo),
                  new SubProgressMonitor(refreshMonitor, 1));
            else
              refreshMonitor.worked(1);
          }
          refreshMonitor.done();
        } catch (GitAPIException e) {
          throw new TeamException(e.getLocalizedMessage(),
              e.getCause());
View Full Code Here

            SubProgressMonitor spm = new SubProgressMonitor(monitor, 1);
            spm.beginTask("Getting relationship definitions...", fields.length);
            for (Field element : fields) {
                if (spm != null) {
                    spm.worked(1);
                }
                spm.subTask("Getting " + element.getLabel() + " definition...");
                TreeItem thisChild =
                        createTreeItemChild(childFields, element.getLabel(), true, 0, false, childFieldType);
                thisChild.setData(FQN, fieldPrefix + "." + element.getName());
View Full Code Here

            + "'");
       
        if (config instanceof IReloadableBeansConfig) {
          ((IReloadableBeansConfig) config).reload();
          config.getBeans();
          subMonitor.worked(1);
        }
      }
      subMonitor.done();
    }
  }
View Full Code Here

        }

        // call close on callback to execute any required resource cleanup in template
        callback.destroy();

        subMonitor.worked(1);
        if (subMonitor.isCanceled()) {
          throw new OperationCanceledException();
        }
      }
    }
View Full Code Here

            IValidationRule rule = ruleDefinition.getRule();
            if (rule.supports(element, context)) {
              context.setCurrentRuleDefinition(ruleDefinition);
              rule.validate(element, context, monitor);
            }
            subMonitor.worked(1);
          }
        }
        finally {
          subMonitor.done();
        }
View Full Code Here

    try {
      IFile scriptFile = getScript(conf);
      IProgressMonitor subMonitor = new SubProgressMonitor(monitor, 5);
      checkCancelled(subMonitor);
      subMonitor.beginTask("Starting Spring Script: "+scriptFile.getName(), 5);
      subMonitor.worked(1);
      checkCancelled(subMonitor);
      subMonitor.subTask("Configuring launch parameters...");
 
      IVMRunner runner;
      IVMInstall vm = verifyVMInstall(conf);
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.