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

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


}
/**
* Creates a new parser.
*/
protected SourceElementParser getParser(Map settings) {
  return new SourceElementParser(this, new DefaultProblemFactory(), new CompilerOptions(settings), false/*don't report local declarations*/, true/*optimize string literals*/);
}
 
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*/;
    compilerOptions.ignoreSourceFolderWarningOption = true;
View Full Code Here

    this.abortProblem = abortException.problem;
  }

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

      int apiLevel,
      Map options,
      int flags,
      IProgressMonitor monitor) {
    try {
      CompilerOptions compilerOptions = new CompilerOptions(options);
      compilerOptions.ignoreMethodBodies = (flags & ICompilationUnit.IGNORE_METHOD_BODIES) != 0;
      Parser parser = new CommentRecorderParser(
        new ProblemReporter(
            DefaultErrorHandlingPolicies.proceedWithAllProblems(),
            compilerOptions,
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;
    compilerOptions.ignoreMethodBodies = (flags & ICompilationUnit.IGNORE_METHOD_BODIES) != 0;
    Parser parser = new CommentRecorderParser(
View Full Code Here

        int amountOfWork = (compilationUnits.length + bindingKeys.length) * 2; // 1 for beginToCompile, 1 for resolve
        monitor.beginTask("", amountOfWork); //$NON-NLS-1$
      }
      environment = new CancelableNameEnvironment(((JavaProject) javaProject), owner, monitor);
      problemFactory = new CancelableProblemFactory(monitor);
      CompilerOptions compilerOptions = getCompilerOptions(options, (flags & ICompilationUnit.ENABLE_STATEMENTS_RECOVERY) != 0);
      compilerOptions.ignoreMethodBodies = (flags & ICompilationUnit.IGNORE_METHOD_BODIES) != 0;
      CompilationUnitResolver resolver =
        new CompilationUnitResolver(
          environment,
          getHandlingPolicy(),
View Full Code Here

        }
        Classpath[] allEntries = new Classpath[classpaths.size()];
        classpaths.toArray(allEntries);
        environment = new NameEnvironmentWithProgress(allEntries, null, monitor);
        problemFactory = new CancelableProblemFactory(monitor);
        CompilerOptions compilerOptions = getCompilerOptions(options, (flags & ICompilationUnit.ENABLE_STATEMENTS_RECOVERY) != 0);
        compilerOptions.ignoreMethodBodies = (flags & ICompilationUnit.IGNORE_METHOD_BODIES) != 0;
        CompilationUnitResolver resolver =
          new CompilationUnitResolver(
            environment,
            getHandlingPolicy(),
View Full Code Here

        environment = new NameEnvironmentWithProgress(allEntries, null, monitor);
      } else {
        environment = new CancelableNameEnvironment((JavaProject) javaProject, owner, monitor);
      }
      problemFactory = new CancelableProblemFactory(monitor);
      CompilerOptions compilerOptions = getCompilerOptions(options, (flags & ICompilationUnit.ENABLE_STATEMENTS_RECOVERY) != 0);
      boolean ignoreMethodBodies = (flags & ICompilationUnit.IGNORE_METHOD_BODIES) != 0;
      compilerOptions.ignoreMethodBodies = ignoreMethodBodies;
      resolver =
        new CompilationUnitResolver(
          environment,
View Full Code Here

  this.logger = new Logger(this, outWriter, errWriter);
  this.proceed = true;
  this.out = outWriter;
  this.err = errWriter;
  this.systemExitWhenFinished = systemExit;
  this.options = new CompilerOptions().getMap();
  this.ignoreOptionalProblemsFromFolders = null;

  this.progress = compilationProgress;
  if (customDefaultOptions != null) {
    this.didSpecifySource = customDefaultOptions.get(CompilerOptions.OPTION_Source) != null;
View Full Code Here

public void performCompilation() {

  this.startTime = System.currentTimeMillis();

  FileSystem environment = getLibraryAccess();
  this.compilerOptions = new CompilerOptions(this.options);
  this.compilerOptions.performMethodsFullRecovery = false;
  this.compilerOptions.performStatementsRecovery = false;
  this.batchCompiler =
    new Compiler(
      environment,
View Full Code Here

TOP

Related Classes of 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.