Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.OperationCanceledException


                    return status;
                }

            }
        } catch (CoreException e) {
            throw new OperationCanceledException(e.getMessage());
        }
        return status;
    }
View Full Code Here


        IProject currentProject = getProject();
        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

* @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

* @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

    this.diet = true;
    this.reportReferenceInfo = fullParse;
    CompilationResult compilationUnitResult = new CompilationResult(unit, 0, 0, this.options.maxProblemsPerUnit);
    parsedUnit = parse(unit, compilationUnitResult);
    if (pm != null && pm.isCanceled())
      throw new OperationCanceledException(Messages.operation_cancelled);
    if (this.scanner.recordLineSeparator) {
      this.requestor.acceptLineSeparatorPositions(compilationUnitResult.getLineSeparatorPositions());
    }
    int initialStart = this.scanner.initialPosition;
    int initialEnd = this.scanner.eofPosition;
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

  int objectIndex = -1;
  IProgressMonitor progressMonitor = this.builder.hierarchy.progressMonitor;
  for (int current = this.typeIndex; current >= 0; current--) {
    if (progressMonitor != null && progressMonitor.isCanceled())
      throw new OperationCanceledException();
   
    ReferenceBinding typeBinding = this.typeBindings[current];

    // java.lang.Object treated at the end
    if (typeBinding.id == TypeIds.T_JavaLangObject) {
View Full Code Here

      CompilationUnitDeclaration parsedUnit = parsedUnits[i];
      if (parsedUnit != null) {
        try {
          if (hasLocalType[i]) { // NB: no-op if method bodies have been already parsed
            if (monitor != null && monitor.isCanceled())
              throw new OperationCanceledException();
            parser.getMethodBodies(parsedUnit);
          }
        } catch (AbortCompilation e) {
          // classpath problem for this type: don't try to resolve (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=49809)
          hasLocalType[i] = false;
        }
      }
    }
    // complete type bindings and build fields and methods only for local types
    // (in this case the constructor is needed when resolving local types)
    // (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=145333)
    try {
      this.lookupEnvironment.completeTypeBindings(parsedUnits, hasLocalType, unitsIndex);
      // remember type bindings
      for (int i = 0; i < unitsIndex; i++) {
        CompilationUnitDeclaration parsedUnit = parsedUnits[i];
        if (parsedUnit != null && !parsedUnit.hasErrors()) {
          boolean containsLocalType = hasLocalType[i];
          if (containsLocalType) {
            if (monitor != null && monitor.isCanceled())
              throw new OperationCanceledException();
            parsedUnit.scope.faultInTypes();
            parsedUnit.resolve();
          }
         
          rememberAllTypes(parsedUnit, cus[i], containsLocalType);
View Full Code Here

  return false;
}
protected void worked(IProgressMonitor monitor, int work) {
  if (monitor != null) {
    if (monitor.isCanceled()) {
      throw new OperationCanceledException();
    } else {
      monitor.worked(work);
    }
  }
}
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.