Examples of CompilationResult


Examples of org.aspectj.org.eclipse.jdt.internal.compiler.CompilationResult

  // see bug 47079 for more details
  int[] oldLineEnds = this.parser.scanner.lineEnds;
  int oldLinePtr = this.parser.scanner.linePtr;
 
  try {
    CompilationResult compilationResult = unit.compilationResult;
    this.parser.scanner.setSource(compilationResult);

    if (this.parser.javadocParser.checkDocComment) {
      char[] contents = compilationResult.compilationUnit.getContents();
      this.parser.javadocParser.scanner.setSource(contents);
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.CompilationResult

  }
  this.bindings.put(methodPattern, new ProblemMethodBinding(methodPattern.selector, null, ProblemReasons.NotFound));
  return null;
}
protected boolean hasAlreadyDefinedType(CompilationUnitDeclaration parsedUnit) {
  CompilationResult result = parsedUnit.compilationResult;
  if (result == null) return false;
  for (int i = 0; i < result.problemCount; i++)
    if (result.problems[i].getID() == IProblem.DuplicateTypes)
      return true;
  return false;
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.CompilationResult

  try {
    if (BasicSearchEngine.VERBOSE)
      System.out.println("Parsing " + possibleMatch.openable.toStringWithAncestors()); //$NON-NLS-1$

    this.parser.nodeSet = possibleMatch.nodeSet;
    CompilationResult unitResult = new CompilationResult(possibleMatch, 1, 1, this.options.maxProblemsPerUnit);
    CompilationUnitDeclaration parsedUnit = this.parser.dietParse(possibleMatch, unitResult);
    if (parsedUnit != null) {
      if (!parsedUnit.isEmpty()) {
        if (mustResolve) {
          this.lookupEnvironment.buildTypeBindings(parsedUnit, null /*no access restriction*/);
 
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.CompilationResult

*/
protected CompilationUnitDeclaration buildBindings(ICompilationUnit compilationUnit, boolean isTopLevelOrMember) throws JavaModelException {
  // source unit
  org.aspectj.org.eclipse.jdt.internal.compiler.env.ICompilationUnit sourceUnit = (org.aspectj.org.eclipse.jdt.internal.compiler.env.ICompilationUnit) compilationUnit;

  CompilationResult compilationResult = new CompilationResult(sourceUnit, 1, 1, 0);
  CompilationUnitDeclaration unit =
    isTopLevelOrMember ?
      this.locator.basicParser().dietParse(sourceUnit, compilationResult) :
      this.locator.basicParser().parse(sourceUnit, compilationResult);
  if (unit != null) {
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.CompilationResult

      new CompilationUnit(
        source,
        "", //$NON-NLS-1$
        compilerOptions.defaultEncoding);

    CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, compilerOptions.maxProblemsPerUnit);
    final CompilationUnitDeclaration compilationUnitDeclaration = new CompilationUnitDeclaration(problemReporter, compilationResult, source.length);
    ASTNode[] result = parser.parseClassBodyDeclarations(source, offset, length, compilationUnitDeclaration);
   
    if (recordParsingInformation) {
      this.recordedParsingInformation = getRecordedParsingInformation(compilationResult, parser);
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.CompilationResult

    ICompilationUnit sourceUnit =
      new CompilationUnit(
        source,
        "", //$NON-NLS-1$
        compilerOptions.defaultEncoding);
    final CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, compilerOptions.maxProblemsPerUnit);
    CompilationUnitDeclaration compilationUnitDeclaration = parser.dietParse(sourceUnit, compilationResult);

    if (recordParsingInformation) {
      this.recordedParsingInformation = getRecordedParsingInformation(compilationResult, parser);
    }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.CompilationResult

      new CompilationUnit(
        source,
        "", //$NON-NLS-1$
        compilerOptions.defaultEncoding);

    CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, compilerOptions.maxProblemsPerUnit);
    Expression result = parser.parseExpression(source, offset, length, new CompilationUnitDeclaration(problemReporter, compilationResult, source.length));
   
    if (recordParsingInformation) {
      this.recordedParsingInformation = getRecordedParsingInformation(compilationResult, parser);
    }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.CompilationResult

      new CompilationUnit(
        source,
        "", //$NON-NLS-1$
        compilerOptions.defaultEncoding);

    final CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, compilerOptions.maxProblemsPerUnit);
    CompilationUnitDeclaration compilationUnitDeclaration = new CompilationUnitDeclaration(problemReporter, compilationResult, length);   

    ConstructorDeclaration constructorDeclaration = new ConstructorDeclaration(compilationResult);
    constructorDeclaration.sourceEnd  = -1;
    constructorDeclaration.declarationSourceEnd = offset + length - 1;
View Full Code Here

Examples of org.drools.commons.jci.compilers.CompilationResult

        if ( dumpDir != null ) {
            dumpResources( classes,
                           dumpDir );
        }

        final CompilationResult result = this.compiler.compile( classes,
                                                                this.src,
                                                                this.packageStoreWrapper,
                                                                this.packageBuilder.getRootClassLoader() );

        //this will sort out the errors based on what class/file they happened in
        if ( result.getErrors().length > 0 ) {
            for ( int i = 0; i < result.getErrors().length; i++ ) {
                final CompilationProblem err = result.getErrors()[i];
                final ErrorHandler handler = this.errorHandlers.get( err.getFileName() );
                handler.addError( err );
            }

            final Collection errors = this.errorHandlers.values();
View Full Code Here

Examples of org.drools.compiler.commons.jci.compilers.CompilationResult

        if ( dumpDir != null ) {
            dumpResources( classes,
                           dumpDir );
        }

        final CompilationResult result = this.compiler.compile( classes,
                                                                this.src,
                                                                this.packageStoreWrapper,
                                                                rootClassLoader );

        //this will sort out the errors based on what class/file they happened in
        if ( result.getErrors().length > 0 ) {
            for ( int i = 0; i < result.getErrors().length; i++ ) {
                final CompilationProblem err = result.getErrors()[i];
                final ErrorHandler handler = this.errorHandlers.get( err.getFileName() );
                handler.addError( err );
            }

            final Collection errors = this.errorHandlers.values();
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.