Package edu.umd.cs.findbugs.gui
Class SwingGUIBugReporter
- java.lang.Object
-
- edu.umd.cs.findbugs.AbstractBugReporter
-
- edu.umd.cs.findbugs.TextUIBugReporter
-
- edu.umd.cs.findbugs.gui.SwingGUIBugReporter
-
- All Implemented Interfaces:
RepositoryLookupFailureCallback,BugReporter,IClassObserver,IErrorLogger
public class SwingGUIBugReporter extends TextUIBugReporter
BugReporter used by AnalysisRun.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class edu.umd.cs.findbugs.AbstractBugReporter
AbstractBugReporter.Error
-
-
Field Summary
-
Fields inherited from class edu.umd.cs.findbugs.TextUIBugReporter
outputStream
-
Fields inherited from interface edu.umd.cs.findbugs.BugReporter
NORMAL, SILENT
-
-
Constructor Summary
Constructors Constructor Description SwingGUIBugReporter(AnalysisRun analysisRun)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoReportBug(BugInstance bugInstance)Subclasses must override this.protected voidemitLine(java.lang.String line)Emit one line of the error message report.booleanerrorsOccurred()voidfinish()Finish reporting bugs.SortedBugCollectiongetBugCollection()AnalysisErrorDialoggetErrorDialog()voidlogError(java.lang.String message)Log an error that occurs while performing analysis.voidobserveClass(ClassDescriptor classDescriptor)Observe a class being visited.voidreportMissingClass(java.lang.ClassNotFoundException ex)Called to report a class lookup failure.voidreportQueuedErrors()Report any accumulated error messages.-
Methods inherited from class edu.umd.cs.findbugs.TextUIBugReporter
checkBugInstance, getRealBugReporter, getUseLongBugCodes, isApplySuppressions, printBug, reportAnalysisError, reportMissingClass, setApplySuppressions, setOutputStream, setReportHistory, setReportStackTrace, setReportUserDesignations, setShowRank, setUseLongBugCodes
-
Methods inherited from class edu.umd.cs.findbugs.AbstractBugReporter
addObserver, getMissingClasses, getMissingClassName, getProjectStats, getQueuedErrors, isValidMissingClassMessage, logError, notifyObservers, reportBug, reportBugsFromXml, reportMissingClass, reportSkippedAnalysis, setErrorVerbosity, setPriorityThreshold, setRankThreshold
-
-
-
-
Constructor Detail
-
SwingGUIBugReporter
public SwingGUIBugReporter(AnalysisRun analysisRun)
Constructor.- Parameters:
analysisRun-
-
-
Method Detail
-
getBugCollection
public SortedBugCollection getBugCollection()
-
errorsOccurred
public boolean errorsOccurred()
-
getErrorDialog
public AnalysisErrorDialog getErrorDialog()
-
observeClass
public void observeClass(ClassDescriptor classDescriptor)
Description copied from interface:IClassObserverObserve a class being visited.- Parameters:
classDescriptor- class being visited
-
reportMissingClass
public void reportMissingClass(java.lang.ClassNotFoundException ex)
Description copied from interface:IErrorLoggerCalled to report a class lookup failure.- Specified by:
reportMissingClassin interfaceIErrorLogger- Overrides:
reportMissingClassin classAbstractBugReporter- Parameters:
ex- a ClassNotFoundException resulting from the class lookup failure
-
logError
public void logError(java.lang.String message)
Description copied from interface:IErrorLoggerLog an error that occurs while performing analysis.- Specified by:
logErrorin interfaceIErrorLogger- Overrides:
logErrorin classAbstractBugReporter- Parameters:
message- the error message
-
finish
public void finish()
Description copied from interface:BugReporterFinish reporting bugs. If any bug reports have been queued, calling this method will flush them.
-
doReportBug
public void doReportBug(BugInstance bugInstance)
Description copied from class:AbstractBugReporterSubclasses must override this. It will be called only for bugs which meet the priority threshold.- Specified by:
doReportBugin classAbstractBugReporter- Parameters:
bugInstance- the bug to report
-
reportQueuedErrors
public void reportQueuedErrors()
Description copied from interface:BugReporterReport any accumulated error messages.- Specified by:
reportQueuedErrorsin interfaceBugReporter- Overrides:
reportQueuedErrorsin classTextUIBugReporter
-
emitLine
protected void emitLine(java.lang.String line)
Description copied from class:TextUIBugReporterEmit one line of the error message report. By default, error messages are printed to System.err. Subclasses may override.- Overrides:
emitLinein classTextUIBugReporter- Parameters:
line- one line of the error report
-
-