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

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.impl.CompilerOptions


    options.put(JavaCore.COMPILER_TASK_TAGS, ""); //$NON-NLS-1$
  }
  SourceElementParser parser = new SourceElementParser(
    requestor,
    problemFactory,
    new CompilerOptions(options),
    true/*report local declarations*/,
    !createAST /*optimize string literals only if not creating a DOM AST*/);
  parser.reportOnlyOneSyntaxError = !computeProblems;
  parser.setMethodsFullRecovery(true);
  parser.setStatementsRecovery((reconcileFlags & ICompilationUnit.ENABLE_STATEMENTS_RECOVERY) != 0);
View Full Code Here


    return options;
  }

  // Do not modify without modifying getDefaultOptions()
  private Hashtable getDefaultOptionsNoInitialization() {
    Map defaultOptionsMap = new CompilerOptions().getMap(); // compiler defaults
   
    // Override some compiler defaults
    defaultOptionsMap.put(JavaCore.COMPILER_LOCAL_VARIABLE_ATTR, JavaCore.GENERATE);
    defaultOptionsMap.put(JavaCore.COMPILER_CODEGEN_UNUSED_LOCAL, JavaCore.PRESERVE);
    defaultOptionsMap.put(JavaCore.COMPILER_TASK_TAGS, JavaCore.DEFAULT_TASK_TAGS);
View Full Code Here

    ast.setOriginalModificationCount(ast.modificationCount());
    return compilationUnit;
  }

  protected static CompilerOptions getCompilerOptions(Map options, boolean statementsRecovery) {
    CompilerOptions compilerOptions = new CompilerOptions(options);
    compilerOptions.performMethodsFullRecovery = statementsRecovery;
    compilerOptions.performStatementsRecovery = statementsRecovery;
    compilerOptions.parseLiteralExpressionsAsConstants = false;
    compilerOptions.storeAnnotations = true /*store annotations in the bindings*/;
    return compilerOptions;
View Full Code Here

    this.hasCompilationAborted = true;
  }

  public static void parse(ICompilationUnit[] compilationUnits, ASTRequestor astRequestor, int apiLevel, Map options, int flags, IProgressMonitor monitor) {
    try {
      CompilerOptions compilerOptions = new CompilerOptions(options);
      Parser parser = new CommentRecorderParser(
        new ProblemReporter(
            DefaultErrorHandlingPolicies.proceedWithAllProblems(),
            compilerOptions,
            new DefaultProblemFactory()),
View Full Code Here

      Map settings,
      int flags) {
    if (sourceUnit == null) {
      throw new IllegalStateException();
    }
    CompilerOptions compilerOptions = new CompilerOptions(settings);
    boolean statementsRecovery = (flags & ICompilationUnit.ENABLE_STATEMENTS_RECOVERY) != 0;
    compilerOptions.performMethodsFullRecovery = statementsRecovery;
    compilerOptions.performStatementsRecovery = statementsRecovery;
    Parser parser = new CommentRecorderParser(
      new ProblemReporter(
View Full Code Here

   * @param unit
   * @param source
   */
  private String processElement(ICompilationUnit unit, char[] source) {
    Document document = new Document(new String(source));
    CompilerOptions options = new CompilerOptions(unit.getJavaProject().getOptions(true));
    ASTParser parser = ASTParser.newParser(this.apiLevel);
    parser.setCompilerOptions(options.getMap());
    parser.setSource(source);
    parser.setKind(ASTParser.K_COMPILATION_UNIT);
    parser.setResolveBindings(false);
    org.aspectj.org.eclipse.jdt.core.dom.CompilationUnit ast = (org.aspectj.org.eclipse.jdt.core.dom.CompilationUnit) parser.createAST(null);
       
View Full Code Here

  options.put(JavaCore.COMPILER_TASK_TAGS, ""); //$NON-NLS-1$
 
  SourceElementParser parser = new IndexingParser(
    requestor,
    new DefaultProblemFactory(Locale.getDefault()),
    new CompilerOptions(options),
    true, // index local declarations
    true, // optimize string literals
    false); // do not use source javadoc parser to speed up parsing
  parser.reportOnlyOneSyntaxError = true;
View Full Code Here

}
/**
* Creates a new parser.
*/
protected DocumentElementParser getParser(Map settings) {
  return new DocumentElementParser(this, new DefaultProblemFactory(), new CompilerOptions(settings));
}
View Full Code Here

  }
 
 
  protected Commandline setupJavacCommand() throws BuildException {
    Commandline cmd = new Commandline();
    this.customDefaultOptions = new CompilerOptions().getMap();
   
    Class javacClass = Javac.class;
   
    /*
     * Read in the compiler arguments first since we might need to modify
View Full Code Here

  }
 
  public ClassFile(SourceTypeBinding typeBinding) {
    // default constructor for subclasses
    this.constantPool = new ConstantPool(this);
    final CompilerOptions options = typeBinding.scope.compilerOptions();
    this.targetJDK = options.targetJDK;
    this.produceAttributes = options.produceDebugAttributes;
    this.referenceBinding = typeBinding;
    if (this.targetJDK >= ClassFileConstants.JDK1_6) {
      this.produceAttributes |= ClassFileConstants.ATTR_STACK_MAP;
View Full Code Here

TOP

Related Classes of org.aspectj.org.eclipse.jdt.internal.compiler.impl.CompilerOptions

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.