Package org.eclipse.jdt.core.compiler

Examples of org.eclipse.jdt.core.compiler.CategorizedProblem


      if (count != 0) {
        int errors = 0;
        int warnings = 0;
        int tasks = 0;
        for (int i = 0; i < count; i++) {
          CategorizedProblem problem = problems[i];
          if (problem != null) {
            currentMain.globalProblemsCount++;
            logProblem(problem, localProblemCount, currentMain.globalProblemsCount, unitSource);
            localProblemCount++;
            if (problem.isError()) {
              localErrorCount++;
              errors++;
              currentMain.globalErrorsCount++;
            } else if (problem.getID() == IProblem.Task) {
              currentMain.globalTasksCount++;
              tasks++;
            } else {
              currentMain.globalWarningsCount++;
              warnings++;
            }
          }
        }
        if ((this.tagBits & Logger.XML) != 0) {
          if ((errors + warnings) != 0) {
            startLoggingProblems(errors, warnings);
            for (int i = 0; i < count; i++) {
              CategorizedProblem problem = problems[i];
              if (problem!= null) {
                if (problem.getID() != IProblem.Task) {
                  logXmlProblem(problem, unitSource);
                }
              }
            }
            endLoggingProblems();
          }
          if (tasks != 0) {
            startLoggingTasks(tasks);
            for (int i = 0; i < count; i++) {
              CategorizedProblem problem = problems[i];
              if (problem!= null) {
                if (problem.getID() == IProblem.Task) {
                  logXmlTask(problem, unitSource);
                }
              }
            }
            endLoggingTasks();
View Full Code Here


  int problemCount = this.compilationResult.problemCount;
  IrritantSet[] foundIrritants = new IrritantSet[this.suppressWarningsCount];
  CompilerOptions options = this.scope.compilerOptions();
  boolean hasMandatoryErrors = false;
  nextProblem: for (int iProblem = 0, length = problemCount; iProblem < length; iProblem++) {
    CategorizedProblem problem = problems[iProblem];
    int problemID = problem.getID();
    int irritant = ProblemReporter.getIrritant(problemID);
    boolean isError = problem.isError();
    if (isError) {
      if (irritant == 0) {
        // tolerate unused warning tokens when mandatory errors
        hasMandatoryErrors = true;
        continue;
      }
      if (!options.suppressOptionalErrors) {
        continue;
      }
    }
    int start = problem.getSourceStart();
    int end = problem.getSourceEnd();
    nextSuppress: for (int iSuppress = 0, suppressCount = this.suppressWarningsCount; iSuppress < suppressCount; iSuppress++) {
      long position = this.suppressWarningScopePositions[iSuppress];
      int startSuppress = (int) (position >>> 32);
      int endSuppress = (int) position;
      if (start < startSuppress) continue nextSuppress;
      if (end > endSuppress) continue nextSuppress;
      if (!this.suppressWarningIrritants[iSuppress].isSet(irritant))
        continue nextSuppress;
      // discard suppressed warning
      removed++;
      problems[iProblem] = null;
      this.compilationResult.removeProblem(problem);
      if (foundIrritants[iSuppress] == null){
        foundIrritants[iSuppress] = new IrritantSet(irritant);
      } else {
        foundIrritants[iSuppress].set(irritant);
      }
      continue nextProblem;
    }
  }
  // compact remaining problems
  if (removed > 0) {
    for (int i = 0, index = 0; i < problemCount; i++) {
      CategorizedProblem problem;
      if ((problem = problems[i]) != null) {
        if (i > index) {
          problems[index++] = problem;
        } else {
          index++;
View Full Code Here

  int problemCount = this.compilationResult.problemCount;
  IrritantSet[] foundIrritants = new IrritantSet[this.suppressWarningsCount];
  CompilerOptions options = this.scope.compilerOptions();
  boolean hasMandatoryErrors = false;
  nextProblem: for (int iProblem = 0, length = problemCount; iProblem < length; iProblem++) {
    CategorizedProblem problem = problems[iProblem];
    int problemID = problem.getID();
    int irritant = ProblemReporter.getIrritant(problemID);
    boolean isError = problem.isError();
    if (isError) {
      if (irritant == 0) {
        // tolerate unused warning tokens when mandatory errors
        hasMandatoryErrors = true;
        continue;
      }
      if (!options.suppressOptionalErrors) {
        continue;
      }
    }
    int start = problem.getSourceStart();
    int end = problem.getSourceEnd();
    nextSuppress: for (int iSuppress = 0, suppressCount = this.suppressWarningsCount; iSuppress < suppressCount; iSuppress++) {
      long position = this.suppressWarningScopePositions[iSuppress];
      int startSuppress = (int) (position >>> 32);
      int endSuppress = (int) position;
      if (start < startSuppress) continue nextSuppress;
      if (end > endSuppress) continue nextSuppress;
      if (!this.suppressWarningIrritants[iSuppress].isSet(irritant))
        continue nextSuppress;
      // discard suppressed warning
      removed++;
      problems[iProblem] = null;
      this.compilationResult.removeProblem(problem);
      if (foundIrritants[iSuppress] == null){
        foundIrritants[iSuppress] = new IrritantSet(irritant);
      } else {
        foundIrritants[iSuppress].set(irritant);
      }
      continue nextProblem;
    }
  }
  // compact remaining problems
  if (removed > 0) {
    for (int i = 0, index = 0; i < problemCount; i++) {
      CategorizedProblem problem;
      if ((problem = problems[i]) != null) {
        if (i > index) {
          problems[index++] = problem;
        } else {
          index++;
View Full Code Here

      problemRequestor.beginReporting();
      for (Iterator iteraror = this.problems.values().iterator(); iteraror.hasNext();) {
        CategorizedProblem[] categorizedProblems = (CategorizedProblem[]) iteraror.next();
        if (categorizedProblems == null) continue;
        for (int i = 0, length = categorizedProblems.length; i < length; i++) {
          CategorizedProblem problem = categorizedProblems[i];
          if (JavaModelManager.VERBOSE){
            System.out.println("PROBLEM FOUND while reconciling : " + problem.getMessage());//$NON-NLS-1$
          }
          if (this.progressMonitor != null && this.progressMonitor.isCanceled()) break;
          problemRequestor.acceptProblem(problem);
        }
      }
View Full Code Here

  int problemCount = this.compilationResult.problemCount;
  IrritantSet[] foundIrritants = new IrritantSet[this.suppressWarningsCount];
  CompilerOptions options = this.scope.compilerOptions();
  boolean hasMandatoryErrors = false;
  nextProblem: for (int iProblem = 0, length = problemCount; iProblem < length; iProblem++) {
    CategorizedProblem problem = problems[iProblem];
    int problemID = problem.getID();
    int irritant = ProblemReporter.getIrritant(problemID);
    boolean isError = problem.isError();
    if (isError) {
      if (irritant == 0) {
        // tolerate unused warning tokens when mandatory errors
        hasMandatoryErrors = true;
        continue;
      }
      if (!options.suppressOptionalErrors) {
        continue;
      }
    }
    int start = problem.getSourceStart();
    int end = problem.getSourceEnd();
    nextSuppress: for (int iSuppress = 0, suppressCount = this.suppressWarningsCount; iSuppress < suppressCount; iSuppress++) {
      long position = this.suppressWarningScopePositions[iSuppress];
      int startSuppress = (int) (position >>> 32);
      int endSuppress = (int) position;
      if (start < startSuppress) continue nextSuppress;
      if (end > endSuppress) continue nextSuppress;
      if (!this.suppressWarningIrritants[iSuppress].isSet(irritant))
        continue nextSuppress;
      // discard suppressed warning
      removed++;
      problems[iProblem] = null;
      this.compilationResult.removeProblem(problem);
      if (foundIrritants[iSuppress] == null){
        foundIrritants[iSuppress] = new IrritantSet(irritant);
      } else {
        foundIrritants[iSuppress].set(irritant);
      }
      continue nextProblem;
    }
  }
  // compact remaining problems
  if (removed > 0) {
    for (int i = 0, index = 0; i < problemCount; i++) {
      CategorizedProblem problem;
      if ((problem = problems[i]) != null) {
        if (i > index) {
          problems[index++] = problem;
        } else {
          index++;
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.core.compiler.CategorizedProblem

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.