Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.OperationCanceledException


        try {
            monitor.beginTask("", 2000);
            projectHandle.create(description, new SubProgressMonitor(monitor,
                    1000));
            if (monitor.isCanceled()) {
                throw new OperationCanceledException();
            }
            projectHandle.open(IResource.BACKGROUND_REFRESH,
                new SubProgressMonitor(monitor, 1000));
        } finally {
            monitor.done();
View Full Code Here


        if (currentProject == null || !currentProject.isAccessible()) {
            return new IProject[0];
        }
        try {
            if (monitor != null && monitor.isCanceled())
                throw new OperationCanceledException();

            if (kind == IncrementalProjectBuilder.FULL_BUILD) {
                fullBuild(monitor);
            } else {
                IResourceDelta delta = getDelta(getProject());
View Full Code Here

        recordProgress(fromPercent + ((progressCompletionCount / (double) progressMaxTypes) * (toPercent - fromPercent)),
            msg.toString());
        // progressPhasePrefix+result.getClassName()+" (from "+nowProcessing.fileName()+")");

        if (progressListener.isCancelledRequested()) {
          throw new AbortCompilation(true, new OperationCanceledException("Weaving cancelled as requested"));
        }
      }
    }
  }
View Full Code Here

  }

  private void worked(int work) {
    if (this.monitor != null) {
      if (this.monitor.isCanceled())
        throw new OperationCanceledException();
      this.monitor.worked(work);
    }
  }
View Full Code Here

* @exception OperationCanceledException if cancelling the operation has been requested
* @see IProgressMonitor#isCanceled
*/
protected void checkCanceled() {
  if (this.progressMonitor != null && this.progressMonitor.isCanceled()) {
    throw new OperationCanceledException();
  }
}
View Full Code Here

          progressListener.setText("compiled: " + result.fileName());
        }
        state.noteResult(result);

        if (progressListener != null && progressListener.isCancelledRequested()) {
          throw new AbortCompilation(true, new OperationCanceledException("Compilation cancelled as requested"));
        }
      }
    };
  }
View Full Code Here

    typeQualifiedName = this.getElementName();
  }
 
  pathBuffer.append(pack.getElementName().replace('.', '/')).append('/').append(typeQualifiedName).append(JavadocConstants.HTML_EXTENSION);
 
  if (monitor != null && monitor.isCanceled()) throw new OperationCanceledException();
  final String contents = getURLContents(String.valueOf(pathBuffer));
  synchronized (projectInfo.javadocCache) {
    projectInfo.javadocCache.put(this, contents);
  }
  return contents;
View Full Code Here

    this.monitor = monitor;
  }

  public CategorizedProblem createProblem(char[] originatingFileName, int problemId, String[] problemArguments, String[] messageArguments, int severity, int startPosition, int endPosition, int lineNumber, int columnNumber) {
    if (this.monitor != null && this.monitor.isCanceled())
      throw new AbortCompilation(true/*silent*/, new OperationCanceledException());
    return super.createProblem(originatingFileName, problemId, problemArguments, messageArguments, severity, startPosition, endPosition, lineNumber, columnNumber);
  }
View Full Code Here

* @param packageBinding
*/
public void accept(IBinaryType binaryType, PackageBinding packageBinding, AccessRestriction accessRestriction) {
  IProgressMonitor progressMonitor = this.builder.hierarchy.progressMonitor;
  if (progressMonitor != null && progressMonitor.isCanceled())
    throw new OperationCanceledException();
 
  BinaryTypeBinding typeBinding = this.lookupEnvironment.createBinaryTypeFrom(binaryType, packageBinding, accessRestriction);
  try {
    this.remember(binaryType, typeBinding);
  } catch (AbortCompilation e) {
View Full Code Here

* @param packageBinding
*/
public void accept(ISourceType[] sourceTypes, PackageBinding packageBinding, AccessRestriction accessRestriction) {
  IProgressMonitor progressMonitor = this.builder.hierarchy.progressMonitor;
  if (progressMonitor != null && progressMonitor.isCanceled())
    throw new OperationCanceledException();
 
  // find most enclosing type first (needed when explicit askForType(...) is done
  // with a member type (e.g. p.A$B))
  ISourceType sourceType = sourceTypes[0];
  while (sourceType.getEnclosingType() != null)
View Full Code Here

TOP

Related Classes of org.eclipse.core.runtime.OperationCanceledException

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.