/** * Categorize the compiler problems into two bins, errors and warning. * * @param errors the collection where the errors are added. * @param warnings the collection where the warnings are added. */ public void getErrorsAndWarnings(Collection<ICompilerProblem> errors, Collection<ICompilerProblem> warnings) { CompilerProblemCategorizer categorizer = new CompilerProblemCategorizer(problemSettings); // Get the filtered problems and classify the problems as either errors or // warnings. for (ICompilerProblem problem : getFilteredProblemsUsingBaseFilter()) { CompilerProblemSeverity severity = categorizer.getProblemSeverity(problem); if (severity == CompilerProblemSeverity.ERROR) errors.add(problem); else if (severity == CompilerProblemSeverity.WARNING) warnings.add(problem); } }
/** * Categorize the compiler problems into two bins, errors and warning. * * @param errors the collection where the errors are added. * @param warnings the collection where the warnings are added. */ public void getErrorsAndWarnings(Collection<ICompilerProblem> errors, Collection<ICompilerProblem> warnings) { CompilerProblemCategorizer categorizer = new CompilerProblemCategorizer(problemSettings); // Get the filtered problems and classify the problems as either errors or // warnings. for (ICompilerProblem problem : getFilteredProblemsUsingBaseFilter()) { CompilerProblemSeverity severity = categorizer.getProblemSeverity(problem); if (severity == CompilerProblemSeverity.ERROR) errors.add(problem); else if (severity == CompilerProblemSeverity.WARNING) warnings.add(problem); } }
/** * Test if any of the problems are errors. * * return true if any of the problems are errors, false otherwise. */ public boolean hasErrors() { CompilerProblemCategorizer categorizer = new CompilerProblemCategorizer(problemSettings); for (ICompilerProblem problem : getFilteredProblemsUsingBaseFilter()) { CompilerProblemSeverity severity = categorizer.getProblemSeverity(problem); if (severity == CompilerProblemSeverity.ERROR) return true; } return false; }
/** * Test if any of the problems are errors. * * return true if any of the problems are errors, false otherwise. */ public boolean hasErrors() { CompilerProblemCategorizer categorizer = new CompilerProblemCategorizer(problemSettings); for (ICompilerProblem problem : getFilteredProblemsUsingBaseFilter()) { CompilerProblemSeverity severity = categorizer.getProblemSeverity(problem); if (severity == CompilerProblemSeverity.ERROR) return true; } return false; }