예제 #1
0
  /**
   * @param monitor the progress monitor to use for reporting progress to the user. It is the
   *     caller's responsibility to call done() on the given monitor. Accepts null, indicating that
   *     no progress should be reported and that the operation cannot be cancelled.
   */
  protected void fullBuild(final IProgressMonitor monitor, boolean isRecoveryBuild)
      throws CoreException {
    SubMonitor progress = SubMonitor.convert(monitor, 10);

    IProject project = getProject();
    ToBeBuilt toBeBuilt =
        isRecoveryBuild
            ? toBeBuiltComputer.updateProjectNewResourcesOnly(project, progress.newChild(2))
            : toBeBuiltComputer.updateProject(project, progress.newChild(2));
    doBuild(toBeBuilt, progress.newChild(8), isRecoveryBuild ? BuildType.RECOVERY : BuildType.FULL);
  }
예제 #2
0
 /**
  * @param monitor the progress monitor to use for reporting progress to the user. It is the
  *     <em>implementors</em> responsibility to call done() on the given monitor. Accepts null,
  *     indicating that no progress should be reported and that the operation cannot be cancelled.
  */
 @Override
 protected void clean(IProgressMonitor monitor) throws CoreException {
   SubMonitor progress = SubMonitor.convert(monitor, 10);
   try {
     ToBeBuilt toBeBuilt = toBeBuiltComputer.removeProject(getProject(), progress.newChild(2));
     if (monitor.isCanceled()) {
       throw new OperationCanceledException();
     }
     doClean(toBeBuilt, progress.newChild(8));
   } finally {
     if (monitor != null) monitor.done();
   }
 }