Examples of AbortCompilation


Examples of org.aspectj.org.eclipse.jdt.internal.compiler.problem.AbortCompilation

        notifyRequestor();
      } else {
        weave()// notification happens as weave progresses...
      }
    } catch (IOException ex) {
      AbortCompilation ac = new AbortCompilation(null,ex);
      throw ac;
    } catch (RuntimeException rEx) {
      if (rEx instanceof AbortCompilation) throw rEx; // Don't wrap AbortCompilation exceptions!

      // This will be unwrapped in Compiler.handleInternalException() and the nested
      // RuntimeException thrown back to the original caller - which is AspectJ
      // which will then then log it as a compiler problem.
      throw new AbortCompilation(true,rEx);
    }
  }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.problem.AbortCompilation

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

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

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.problem.AbortCompilation

          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

Examples of org.eclipse.jdt.internal.compiler.problem.AbortCompilation

public char[] getContents() {

  try {
    return Util.getResourceContentsAsCharArray(this.resource);
  } catch (CoreException e) {
    throw new AbortCompilation(true, new MissingSourceFileException(this.resource.getFullPath().toString()));
  }
}
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.problem.AbortCompilation

    this.notifier.checkCancelWithinCompiler();

  if (this.initialTypeNames != null && this.initialTypeNames.includes(qualifiedTypeName)) {
    if (this.isIncrementalBuild)
      // catch the case that a type inside a source file has been renamed but other class files are looking for it
      throw new AbortCompilation(true, new AbortIncrementalBuildException(qualifiedTypeName));
    return null; // looking for a file which we know was provided at the beginning of the compilation
  }

  if (this.additionalUnits != null && this.sourceLocations.length > 0) {
    // if an additional source file is waiting to be compiled, answer it BUT not if this is a secondary type search
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.problem.AbortCompilation

        abortCount++;
        String filename = new String(cud.getFileName());
        logger.log(TreeLogger.WARN, "JDT threw an exception: " + filename + ": " + e);
        if (abortCount >= ABORT_COUNT_MAX) {
          logger.log(TreeLogger.ERROR, "JDT threw too many exceptions.");
          throw new AbortCompilation(cud.compilationResult, e);
        }
        return; // continue without it; it might be a server-side class.
      }
      ClassFile[] classFiles = cud.compilationResult().getClassFiles();
      Map<ClassFile, CompiledClass> results = new LinkedHashMap<ClassFile, CompiledClass>();
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.problem.AbortCompilation

    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

Examples of org.eclipse.jdt.internal.compiler.problem.AbortCompilation

    return super.createProblem(originatingFileName, problemId, problemArguments, messageArguments, severity, startPosition, endPosition, lineNumber, columnNumber);
  }

  public CategorizedProblem createProblem(char[] originatingFileName, int problemId, String[] problemArguments, int elaborationId, 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, elaborationId, messageArguments, severity, startPosition, endPosition, lineNumber, columnNumber);
  }
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.problem.AbortCompilation

    this.notifier.checkCancelWithinCompiler();

  if (this.initialTypeNames != null && this.initialTypeNames.includes(qualifiedTypeName)) {
    if (this.isIncrementalBuild)
      // catch the case that a type inside a source file has been renamed but other class files are looking for it
      throw new AbortCompilation(true, new AbortIncrementalBuildException(qualifiedTypeName));
    return null; // looking for a file which we know was provided at the beginning of the compilation
  }

  if (this.additionalUnits != null && this.sourceLocations.length > 0) {
    // if an additional source file is waiting to be compiled, answer it BUT not if this is a secondary type search
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.problem.AbortCompilation

  if (this.monitor != null && this.monitor.isCanceled() && !this.cancelling) {
    // Once the compiler has been canceled, don't check again.
    setCancelling(true);
    // Only AbortCompilation can stop the compiler cleanly.
    // We check cancelation again following the call to compile.
    throw new AbortCompilation(true, null);
  }
}
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.