/** * Get an iterator over all internal errors. */ public Iterable<ICompilerProblem> getInternalErrors() { return getProblemView(new ProblemFilterClassCriteria(CodegenInternalProblem.class)); }
/** * Enable or disable semantic warnings. * @param showWarnings - if true, semantic warnings * will appear in the filtered diagnostics. */ public void setShowWarnings(boolean showWarnings) { setShowProblemByClass(SemanticWarningProblem.class, showWarnings); }
@Override public FileLineInfo load(String fileName) { return new FileLineInfo(fileName); } });
/** * Print out problems to standard output. * * @param problems */ private void printProblems(Collection<ICompilerProblem> problems) { CompilerProblemCategorizer categorizer = new CompilerProblemCategorizer(); ProblemFormatter formatter = new WorkspaceProblemFormatter(new Workspace(), categorizer); ProblemPrinter printer = new ProblemPrinter(formatter, System.err); printer.printProblems(problems); }
@Override public boolean accept(ICompilerProblem problem) { CompilerProblemSeverity severity = categorizer.getProblemSeverity(problem); if (severity == CompilerProblemSeverity.ERROR || severity == CompilerProblemSeverity.WARNING) { return true; } return false; }
/** * Enable or disable strict semantics mode diagnostics. * @param isStrict - if true, strict semantics mode * diagnostics will appear in the filtered diagnostics. */ private void setShowStrictSemantics(boolean isStrict) { setShowProblemByClass(StrictSemanticsProblem.class, isStrict); }
/** * @return the string used to format messages categorized as errors. */ private String getErrorFormat() { return getMessage(ERROR_FORMAT_ID); }
/** * Create a filter based on problem settings. * * @param problemSettings The settings, may not be null. */ public ProblemSettingsFilter(ICompilerProblemSettings problemSettings) { assert problemSettings != null : "Settings may not be null"; this.problemSettings = problemSettings; init(); }
/** * Enable or disable internal error display. * @param showInternalErrors - if true, internal error * diagnostics will appear in the filtered diagnostics. */ public void setShowInternalErrors(boolean showInternalErrors) { setShowProblemByClass(CodegenInternalProblem.class,showInternalErrors); }
/** * Get an iterator over all internal errors. */ public Iterable<ICompilerProblem> getInternalErrors() { return getProblemView(new ProblemFilterClassCriteria(CodegenInternalProblem.class)); }
@Override public boolean accept(ICompilerProblem problem) { CompilerProblemSeverity severity = categorizer.getProblemSeverity(problem); if (severity == CompilerProblemSeverity.ERROR || severity == CompilerProblemSeverity.WARNING) { return true; } return false; }
/** * Enable or disable semantic warnings. * @param showWarnings - if true, semantic warnings * will appear in the filtered diagnostics. */ private void setShowWarnings(boolean showWarnings) { setShowProblemByClass(SemanticWarningProblem.class, showWarnings); }
@Override public FileLineInfo load(String fileName) { return new FileLineInfo(fileName); } });
/** * @return the string used to format messages categorized as syntax errors. */ private String getSyntaxErrorFormat() { return getMessage(SYNTAXERROR_FORMAT_ID); }
/** * Enable or disable semantic warnings. * @param showWarnings - if true, semantic warnings * will appear in the filtered diagnostics. */ public void setShowWarnings(boolean showWarnings) { setShowProblemByClass(SemanticWarningProblem.class, showWarnings); }
/** * Enable or disable strict semantics mode diagnostics. * @param isStrict - if true, strict semantics mode * diagnostics will appear in the filtered diagnostics. */ private void setShowStrictSemantics(boolean isStrict) { setShowProblemByClass(StrictSemanticsProblem.class, isStrict); }
/** * Enable or disable internal error display. * @param showInternalErrors - if true, internal error * diagnostics will appear in the filtered diagnostics. */ public void setShowInternalErrors(boolean showInternalErrors) { setShowProblemByClass(CodegenInternalProblem.class,showInternalErrors); }
/** * Enable or disable deprecation warnings. * @param showWarnings - if true, deprecation warnings * will appear in the filtered diagnostics. */ private void setShowDeprecationWarnings(boolean showWarnings) { setShowProblemByClass(AbstractDeprecatedAPIProblem.class, showWarnings); setShowProblemByClass(DeprecatedConfigurationOptionProblem.class, showWarnings); }
/** * Enable or disable display of "problems" that * are used for compiler internal processing but * have no relevance to the user. * @param showIrrelevantProblems - if true, non-user-relevant * diagnostics will appear in the filtered diagnostics. */ public void setShowIrrelevantProblems(boolean showIrrelevantProblems) { setShowProblemByClass(UnfoundPropertyProblem.class,showIrrelevantProblems); }
/** * Enable or disable strict semantics mode diagnostics. * @param isStrict - if true, strict semantics mode * diagnostics will appear in the filtered diagnostics. */ public void setShowStrictSemantics(boolean isStrict) { setShowProblemByClass(StrictSemanticsProblem.class, isStrict); }