Package org.eclipse.core.runtime

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


      ObjectId tagId = updateTagObject();
      monitor.worked(1);

      updateRepo(tagId);
      monitor.worked(1);

    } finally {
      monitor.done();
    }
  }
View Full Code Here


          GitTraceLocation.getTrace().trace(
              GitTraceLocation.CORE.getLocation(),
              "disconnect " + p.getName()); //$NON-NLS-1$
        unmarkTeamPrivate(p);
        RepositoryProvider.unmap(p);
        monitor.worked(100);

        p.refreshLocal(IResource.DEPTH_INFINITE,
            new SubProgressMonitor(monitor, 100));
      }
    } finally {
View Full Code Here

      GitCommand<?> command = prepareCommand(repository, paths);

      try {
        command.call();
        monitor.worked(1);
      } catch (GitAPIException e) {
        Activator.logError(e.getMessage(), e);
      } finally {
        findRepositoryMapping(repository).fireRepositoryChanged();
      }
View Full Code Here

            handleException(uri, e, userMessage);
          } catch (Exception e) {
            handleException(uri, e, e.getMessage());
          }

          monitor.worked(WORK_UNITS_PER_TRANSPORT);
        } finally {
          // Dirty trick to get things always working.
          subMonitor.beginTask("", WORK_UNITS_PER_TRANSPORT); //$NON-NLS-1$
          subMonitor.done();
          subMonitor.done();
View Full Code Here

          RepositoryProvider
              .map(project, GitProvider.class.getName());
          autoIgnoreDerivedResources(project, monitor);
          project.refreshLocal(IResource.DEPTH_INFINITE,
              new SubProgressMonitor(monitor, 50));
          monitor.worked(10);
        } else {
          // TODO is this the right location?
          if (GitTraceLocation.CORE.isActive())
            GitTraceLocation.getTrace().trace(
                GitTraceLocation.CORE.getLocation(),
View Full Code Here

          if (GitTraceLocation.CORE.isActive())
            GitTraceLocation.getTrace().trace(
                GitTraceLocation.CORE.getLocation(),
                "Attempted to share project without repository ignored :" //$NON-NLS-1$
                    + project);
          monitor.worked(60);
        }
      }
    } finally {
      monitor.done();
    }
View Full Code Here

    Map<RepositoryMapping, AddCommand> addCommands = new HashMap<RepositoryMapping, AddCommand>();
    try {
      for (IResource obj : rsrcList) {
        addToCommand(obj, addCommands);
        monitor.worked(200);
      }

      for (AddCommand command : addCommands.values()) {
        command.call();
      }
View Full Code Here

    monitor.beginTask(CoreText.AssumeUnchangedOperation_adding,
        rsrcList.size() * 200);
    try {
      for (IResource resource : rsrcList) {
        assumeValid(resource);
        monitor.worked(200);
      }

      for (Map.Entry<Repository, DirCache> e : caches.entrySet()) {
        final Repository db = e.getKey();
        final DirCache editor = e.getValue();
View Full Code Here

    monitor.beginTask(CoreText.UntrackOperation_adding, rsrcList.size() * 200);
    try {
      for (IResource obj : rsrcList) {
        remove(obj);
        monitor.worked(200);
      }

      for (Map.Entry<Repository, DirCacheEditor> e : edits.entrySet()) {
        final Repository db = e.getKey();
        final DirCacheEditor editor = e.getValue();
View Full Code Here

  }

  public void worked(int work) {
    IProgressMonitor monitor = getMonitor();
    if (monitor != null)
      monitor.worked(work);
    synchronized(this) {
      this.worked += work;
    }
  }
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.