Package org.eclipse.jdt.internal.compiler.problem

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


  public EcjTreeBuilder(String rawInput, String name, CompilerOptions options) {
    this(rawInput, createDefaultProblemReporter(options), createSilentProblemReporter(options), new CompilationResult(name.toCharArray(), 0, 0, 0));
  }
 
  private static ProblemReporter createDefaultProblemReporter(CompilerOptions options) {
    return new ProblemReporter(new IErrorHandlingPolicy() {
      public boolean proceedOnErrors() {
        return true;
      }
     
      public boolean stopOnFirstError() {
View Full Code Here


      }
    }, options, new DefaultProblemFactory(Locale.ENGLISH));
  }
 
  private static ProblemReporter createSilentProblemReporter(CompilerOptions options) {
    return new ProblemReporter(new IErrorHandlingPolicy() {
      public boolean proceedOnErrors() {
        return true;
      }
     
      public boolean stopOnFirstError() {
View Full Code Here

    }

    private Parser getParser() {
        if (mParser == null) {
            CompilerOptions options = createCompilerOptions();
            ProblemReporter problemReporter = new ProblemReporter(
                    DefaultErrorHandlingPolicies.exitOnFirstError(),
                    options,
                    new DefaultProblemFactory());
            mParser = new Parser(problemReporter,
                    options.parseLiteralExpressionsAsConstants);
View Full Code Here

        return cu;
    }

    private static Parser createCommentRecorderParser(CompilerOptions options) {
        Parser parser =
                new CommentRecorderParser(new ProblemReporter(
                        DefaultErrorHandlingPolicies.proceedWithAllProblems(),
                        options,
                        new DefaultProblemFactory()), false);
        return parser;
    }
View Full Code Here

        options.targetJDK = ClassFileConstants.JDK1_6;
        return options;
    }

    private static Parser createCommentRecorderParser(CompilerOptions options) {
        return new CommentRecorderParser(new ProblemReporter(
                DefaultErrorHandlingPolicies.proceedWithAllProblems(),
                options,
                new DefaultProblemFactory()), false);
    }
View Full Code Here

public HierarchyResolver(INameEnvironment nameEnvironment, Map settings, HierarchyBuilder builder, IProblemFactory problemFactory) {
  // create a problem handler with the 'exit after all problems' handling policy
  this.options = new CompilerOptions(settings);
  IErrorHandlingPolicy policy = DefaultErrorHandlingPolicies.exitAfterAllProblems();
  ProblemReporter problemReporter = new ProblemReporter(policy, this.options, problemFactory);

  LookupEnvironment environment = new LookupEnvironment(this, this.options, problemReporter, nameEnvironment);
  environment.mayTolerateMissingType = true;
  setEnvironment(environment, builder);
}
View Full Code Here

    this.openedBinaryTypes = 0;
    this.sourceLevel = javaProject.getOption(JavaCore.COMPILER_SOURCE, true);
    this.complianceLevel = javaProject.getOption(JavaCore.COMPILER_COMPLIANCE, true);

    this.problemFactory = new CompletionProblemFactory(Locale.getDefault());
    this.problemReporter = new ProblemReporter(
        DefaultErrorHandlingPolicies.proceedWithAllProblems(),
        this.compilerOptions,
        this.problemFactory);
    this.lookupEnvironment =
      new LookupEnvironment(this, this.compilerOptions, this.problemReporter, nameEnvironment);
View Full Code Here

  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,
            new DefaultProblemFactory()),
        false);
      int unitLength = compilationUnits.length;
View Full Code Here

      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,
            new DefaultProblemFactory()),
        false);
      int unitLength = sourceUnits.length;
View Full Code Here

    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(
      new ProblemReporter(
          DefaultErrorHandlingPolicies.proceedWithAllProblems(),
          compilerOptions,
          new DefaultProblemFactory()),
      false);
    CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, compilerOptions.maxProblemsPerUnit);
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.compiler.problem.ProblemReporter

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.