Examples of ProblemReporter


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

* Note that as a side-effect, this updates the current reference context
* (unit, type or method) in case the problem handler decides it is necessary
* to abort.
*/
public ProblemReporter problemReporter() {
  ProblemReporter problemReporter = this.referenceContext.problemReporter;
  problemReporter.referenceContext = this.referenceContext;
  return problemReporter;
}
View Full Code Here

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

  * to abort.
  */
  public ProblemReporter problemReporter() {
    MethodScope outerMethodScope;
    if ((outerMethodScope = outerMostMethodScope()) == null) {
      ProblemReporter problemReporter = referenceCompilationUnit().problemReporter;
      problemReporter.referenceContext = this.referenceContext;
      return problemReporter;
    }
    return outerMethodScope.problemReporter();
  }
View Full Code Here

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

    if (this.javadoc != null) {
      this.javadoc.resolve(initializationScope);
    } else if (this.binding != null && this.binding.declaringClass != null && !this.binding.declaringClass.isLocalType()) {
      // Set javadoc visibility
      int javadocVisibility = this.binding.modifiers & ExtraCompilerModifiers.AccVisibilityMASK;
      ProblemReporter reporter = initializationScope.problemReporter();
      int severity = reporter.computeSeverity(IProblem.JavadocMissing);
      if (severity != ProblemSeverities.Ignore) {
        if (classScope != null) {
          javadocVisibility = Util.computeOuterMostVisibility(classScope.referenceType(), javadocVisibility);
        }
        int javadocModifiers = (this.binding.modifiers & ~ExtraCompilerModifiers.AccVisibilityMASK) | javadocVisibility;
        reporter.javadocMissing(this.sourceStart, this.sourceEnd, severity, javadocModifiers);
      }
    }
  } finally {
    initializationScope.initializedField = previousField;
    initializationScope.lastVisibleFieldID = previousFieldID;
View Full Code Here

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

  * to abort.
  */
  public ProblemReporter problemReporter() {
    MethodScope outerMethodScope;
    if ((outerMethodScope = outerMostMethodScope()) == null) {
      ProblemReporter problemReporter = referenceCompilationUnit().problemReporter;
      problemReporter.referenceContext = this.referenceContext;
      return problemReporter;
    }
    return outerMethodScope.problemReporter();
  }
View Full Code Here

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

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

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

    if (source == null) {
      throw new IllegalArgumentException();
    }
    CompilerOptions compilerOptions = new CompilerOptions(settings);
    compilerOptions.ignoreMethodBodies = this.ignoreMethodBodies;
    final ProblemReporter problemReporter = new ProblemReporter(
          DefaultErrorHandlingPolicies.proceedWithAllProblems(),
          compilerOptions,
          new DefaultProblemFactory(Locale.getDefault()));

    CommentRecorderParser parser = new CommentRecorderParser(problemReporter, false);
View Full Code Here

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

    }
    CompilerOptions compilerOptions = new CompilerOptions(settings);
    compilerOptions.ignoreMethodBodies = this.ignoreMethodBodies;
    CommentRecorderParser parser =
      new CommentRecorderParser(
        new ProblemReporter(
          DefaultErrorHandlingPolicies.proceedWithAllProblems(),
          compilerOptions,
          new DefaultProblemFactory(Locale.getDefault())),
      false);
View Full Code Here

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

    if (source == null) {
      throw new IllegalArgumentException();
    }
    CompilerOptions compilerOptions = new CompilerOptions(settings);
    // in this case we don't want to ignore method bodies since we are parsing only an expression
    final ProblemReporter problemReporter = new ProblemReporter(
          DefaultErrorHandlingPolicies.proceedWithAllProblems(),
          compilerOptions,
          new DefaultProblemFactory(Locale.getDefault()));

    CommentRecorderParser parser = new CommentRecorderParser(problemReporter, false);
View Full Code Here

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

    if (source == null) {
      throw new IllegalArgumentException();
    }
    CompilerOptions compilerOptions = new CompilerOptions(settings);
    // in this case we don't want to ignore method bodies since we are parsing only statements
    final ProblemReporter problemReporter = new ProblemReporter(
          DefaultErrorHandlingPolicies.proceedWithAllProblems(),
          compilerOptions,
          new DefaultProblemFactory(Locale.getDefault()));
    CommentRecorderParser parser = new CommentRecorderParser(problemReporter, false);
    parser.setMethodsFullRecovery(false);
View Full Code Here

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

  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
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.