Package org.aspectj.org.eclipse.jdt.internal.compiler.env

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.env.ICompilationUnit


              result);
          if (containsLocalType)   parsedUnit.bits |= ASTNode.HasAllMethodBodies;
        } else {
          // create parsed unit from file
          IFile file = (IFile) cu.getResource();
          ICompilationUnit sourceUnit = this.builder.createCompilationUnitFromPath(openable, file);
         
          CompilationResult unitResult = new CompilationResult(sourceUnit, i, openablesLength, this.options.maxProblemsPerUnit);
          parsedUnit = parser.dietParse(sourceUnit, unitResult);
        }
View Full Code Here


  } finally {
    if (monitor != null) monitor.done();
  }
}
protected ICompilationUnit createCompilationUnitFromPath(Openable handle, IFile file) {
  ICompilationUnit unit = super.createCompilationUnitFromPath(handle, file);
  this.cuToHandle.put(unit, handle);
  return unit;
}
View Full Code Here

          int typeNameStart = qSourceFileName.length() - typeName.length;
          qPackageName =  qSourceFileName.substring(0, typeNameStart - 1);
          sourceFileName = qSourceFileName.substring(typeNameStart);
        }
      }
      ICompilationUnit workingCopy = (ICompilationUnit) this.workingCopies.get(qualifiedTypeName);
      if (workingCopy != null) {
        answer = new NameEnvironmentAnswer(workingCopy, null /*no access restriction*/);
      } else {
        answer = location.findClass(
          sourceFileName, // doesn't include the file extension
View Full Code Here

         
    CommentRecorderParser parser = new CommentRecorderParser(problemReporter, false);
    parser.setMethodsFullRecovery(false);
    parser.setStatementsRecovery(false);
   
    ICompilationUnit sourceUnit =
      new CompilationUnit(
        source,
        "", //$NON-NLS-1$
        compilerOptions.defaultEncoding);
View Full Code Here

          DefaultErrorHandlingPolicies.proceedWithAllProblems(),
          compilerOptions,
          new DefaultProblemFactory(Locale.getDefault())),
      false);
   
    ICompilationUnit sourceUnit =
      new CompilationUnit(
        source,
        "", //$NON-NLS-1$
        compilerOptions.defaultEncoding);
    final CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, compilerOptions.maxProblemsPerUnit);
View Full Code Here

          compilerOptions,
          new DefaultProblemFactory(Locale.getDefault()));
         
    CommentRecorderParser parser = new CommentRecorderParser(problemReporter, false);

    ICompilationUnit sourceUnit =
      new CompilationUnit(
        source,
        "", //$NON-NLS-1$
        compilerOptions.defaultEncoding);
View Full Code Here

          new DefaultProblemFactory(Locale.getDefault()));
    CommentRecorderParser parser = new CommentRecorderParser(problemReporter, false);
    parser.setMethodsFullRecovery(false);
    parser.setStatementsRecovery(enabledStatementRecovery);
   
    ICompilationUnit sourceUnit =
      new CompilationUnit(
        source,
        "", //$NON-NLS-1$
        compilerOptions.defaultEncoding);
View Full Code Here

        return endLine;
  }
   
    public String getContext() {
        if (null == context) {
            ICompilationUnit compilationUnit = result.compilationUnit;
            IProblem[] problems = result.problems;
            if ((null == compilationUnit) || (null == problems)
                || (1 != problems.length)) { // ?? which of n>1 problems?
                context = NO_CONTEXT;
            } else {
View Full Code Here

    }
    return units;
  }
   
  public String extractDestinationPathFromSourceFile(CompilationResult result) {
    ICompilationUnit compilationUnit = result.compilationUnit;
    if (compilationUnit != null) {
      char[] fileName = compilationUnit.getFileName();
      int lastIndex = CharOperation.lastIndexOf(java.io.File.separatorChar, fileName);
      if (lastIndex == -1) {
        return System.getProperty("user.dir"); //$NON-NLS-1$
      }
      return new String(CharOperation.subarray(fileName, 0, lastIndex));
View Full Code Here

TOP

Related Classes of org.aspectj.org.eclipse.jdt.internal.compiler.env.ICompilationUnit

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.