Package org.eclipse.core.runtime

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


  private void setJavaNature(IProgressMonitor monitor) throws CoreException {
    SubMonitor sub = SubMonitor.convert(monitor, 4);
    sub.beginTask("Adding Java nature.", 4);
   
    IProjectDescription description = theProject.getDescription();
    sub.worked(1);
   
    description.setNatureIds(new String[] { JavaCore.NATURE_ID });
    sub.worked(1);
   
    theProject.setDescription(description, sub.newChild(2));
View Full Code Here


   
    IProjectDescription description = theProject.getDescription();
    sub.worked(1);
   
    description.setNatureIds(new String[] { JavaCore.NATURE_ID });
    sub.worked(1);
   
    theProject.setDescription(description, sub.newChild(2));
  }

  private void addSystemLibraries(IProgressMonitor monitor) throws JavaModelException {
View Full Code Here

        }
        changeRangeStart= startThread.fDifference.leftStart;
        changeRangeEnd= startThread.fDifference.leftEnd();
 
        startThread.next();
        monitor.worked(1);
        //
        // check for overlapping changes with other thread
        // merge overlapping changes with this range
        //
        DifferencesIterator other= startThread.other(myIter, yourIter);
View Full Code Here

        //
        DifferencesIterator other= startThread.other(myIter, yourIter);
        while (other.fDifference != null && other.fDifference.leftStart < changeRangeEnd) {
          int newMax= other.fDifference.leftEnd();
          other.next();
          monitor.worked(1);
          if (newMax > changeRangeEnd) {
            changeRangeEnd= newMax;
            other= other.other(myIter, yourIter);
          }
        }
View Full Code Here

    for (Entry<GitSynchronizeData, Collection<String>> entry : updateRequests
        .entrySet()) {
      Collection<String> paths = entry.getValue();
      GitSyncCache partialCache = getAllData(entry.getKey(), paths);
      cache.merge(partialCache, new HashSet<String>(paths));
      m.worked(1);
    }

    m.done();
  }
View Full Code Here

    }
    long start = System.currentTimeMillis();
    subMonitor.setTaskName("Write fingerprints: 0%");
    subMonitor.subTask("Global...");
    printComponent(/*performanceResults, */"global_fp");
    subMonitor.worked(100);
    if (subMonitor.isCanceled()) throw new OperationCanceledException();
    String[] components = this.performanceResults.getComponents();
    int length = components.length;
    int step = 1000 / length;
    int progress = 0;
View Full Code Here

    for (int i=0; i<length; i++) {
      int percentage = (int) ((progress / ((double) length)) * 100);
      subMonitor.setTaskName("Write fingerprints: "+percentage+"%");
      subMonitor.subTask(components[i]+"...");
      printComponent(/*performanceResults, */components[i]);
      subMonitor.worked(step);
      if (subMonitor.isCanceled()) throw new OperationCanceledException();
      progress++;
    }
    if (this.printStream != null) {
      String duration = Util.timeString(System.currentTimeMillis()-start);
View Full Code Here

        }
        changeRangeStart = startThread.fDifference.fLeftStart;
        changeRangeEnd = startThread.fDifference.leftEnd();

        startThread.next();
        monitor.worked(1);
        //
        // check for overlapping changes with other thread
        // merge overlapping changes with this range
        //
        DifferencesIterator other = startThread.other(myIter, yourIter);
View Full Code Here

        DifferencesIterator other = startThread.other(myIter, yourIter);
        while (other.fDifference != null
            && other.fDifference.fLeftStart <= changeRangeEnd) {
          int newMax = other.fDifference.leftEnd();
          other.next();
          monitor.worked(1);
          if (newMax >= changeRangeEnd) {
            changeRangeEnd = newMax;
            other = other.other(myIter, yourIter);
          }
        }
View Full Code Here

            ConfigurationParser cp = new ConfigurationParser(p,
                    warnings);
            Configuration config = cp
                    .parseConfiguration(configurationFile);

            subMonitor.worked(50);
            monitor.subTask("Generating Files from Database Tables");
           
            MyBatisGenerator generator = new MyBatisGenerator(config, new EclipseShellCallback(),
                    warnings);
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.