Class FixingErrorManager
java.lang.Object
com.google.javascript.jscomp.SortingErrorManager
com.google.javascript.jscomp.BasicErrorManager
com.google.javascript.refactoring.FixingErrorManager
- All Implemented Interfaces:
ErrorHandler,ErrorManager
An error manager that finds a SuggestedFix for all errors if possible.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.javascript.jscomp.SortingErrorManager
SortingErrorManager.ErrorReportGenerator -
Constructor Summary
ConstructorsConstructorDescriptionFixingErrorManager(com.google.common.collect.ImmutableSet<DiagnosticType> unfixableErrors) -
Method Summary
Modifier and TypeMethodDescriptionReturns fixes for errors first, then fixes for warnings.getFixesForJsError(JSError error) Returns fixes for errors and warnings that only have one 'sure' guaranteed fix.voidprintln(CheckLevel level, JSError error) Print a message with a trailing new line.voidPrint the summary of the compilation - number of errors and warnings.voidreport(CheckLevel level, JSError error) Reports an error.voidsetCompiler(AbstractCompiler compiler) Methods inherited from class com.google.javascript.jscomp.BasicErrorManager
generateReportMethods inherited from class com.google.javascript.jscomp.SortingErrorManager
getErrorCount, getErrors, getTypedPercent, getWarningCount, getWarnings, hasHaltingErrors, setTypedPercentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.javascript.jscomp.ErrorManager
shouldReportConformanceViolation
-
Constructor Details
-
FixingErrorManager
public FixingErrorManager() -
FixingErrorManager
-
-
Method Details
-
setCompiler
-
report
Description copied from interface:ErrorManagerReports an error. The errors will be displayed by theErrorManager.generateReport()at the discretion of the implementation.- Specified by:
reportin interfaceErrorHandler- Specified by:
reportin interfaceErrorManager- Overrides:
reportin classSortingErrorManager- Parameters:
level- the reporting levelerror- the error to report
-
getFixesForJsError
-
getSureFixes
Returns fixes for errors and warnings that only have one 'sure' guaranteed fix. -
getAllFixes
Returns fixes for errors first, then fixes for warnings. This includes 'sure' fixes with only one option, and 'multi' fixes which have multiple choices. -
printSummary
public void printSummary()Description copied from class:BasicErrorManagerPrint the summary of the compilation - number of errors and warnings.- Specified by:
printSummaryin classBasicErrorManager
-
println
Description copied from class:BasicErrorManagerPrint a message with a trailing new line. This method is called by theBasicErrorManager.generateReport()method when generating messages.- Specified by:
printlnin classBasicErrorManager
-