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.void
println
(CheckLevel level, JSError error) Print a message with a trailing new line.void
Print the summary of the compilation - number of errors and warnings.void
report
(CheckLevel level, JSError error) Reports an error.void
setCompiler
(AbstractCompiler compiler) Methods inherited from class com.google.javascript.jscomp.BasicErrorManager
generateReport
Methods inherited from class com.google.javascript.jscomp.SortingErrorManager
getErrorCount, getErrors, getTypedPercent, getWarningCount, getWarnings, hasHaltingErrors, setTypedPercent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.google.javascript.jscomp.ErrorManager
shouldReportConformanceViolation
-
Constructor Details
-
FixingErrorManager
public FixingErrorManager() -
FixingErrorManager
-
-
Method Details
-
setCompiler
-
report
Description copied from interface:ErrorManager
Reports an error. The errors will be displayed by theErrorManager.generateReport()
at the discretion of the implementation.- Specified by:
report
in interfaceErrorHandler
- Specified by:
report
in interfaceErrorManager
- Overrides:
report
in 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:BasicErrorManager
Print the summary of the compilation - number of errors and warnings.- Specified by:
printSummary
in classBasicErrorManager
-
println
Description copied from class:BasicErrorManager
Print a message with a trailing new line. This method is called by theBasicErrorManager.generateReport()
method when generating messages.- Specified by:
println
in classBasicErrorManager
-