edu.umd.cs.findbugs.gui
Class SwingGUIBugReporter

java.lang.Object
  extended by edu.umd.cs.findbugs.AbstractBugReporter
      extended by edu.umd.cs.findbugs.TextUIBugReporter
          extended by edu.umd.cs.findbugs.gui.SwingGUIBugReporter
All Implemented Interfaces:
ClassObserver, RepositoryLookupFailureCallback, BugReporter

public class SwingGUIBugReporter
extends TextUIBugReporter

BugReporter used by AnalysisRun.


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
SwingGUIBugReporter(AnalysisRun analysisRun)
          Constructor.
 
Method Summary
 void doReportBug(BugInstance bugInstance)
          Subclasses must override this.
protected  void emitLine(java.lang.String line)
          Emit one line of the error message report.
 boolean errorsOccurred()
           
 void finish()
          Finish reporting bugs.
 SortedBugCollection getBugCollection()
           
 AnalysisErrorDialog getErrorDialog()
           
 void logError(java.lang.String message)
          Log an error that occurs while performing analysis.
 void observeClass(org.apache.bcel.classfile.JavaClass javaClass)
          Observe a class.
 void reportMissingClass(java.lang.ClassNotFoundException ex)
          Called to report a lookup failure.
 void reportQueuedErrors()
          Report any accumulated error messages.
 
Methods inherited from class edu.umd.cs.findbugs.TextUIBugReporter
checkBugInstance, getRealBugReporter, getUseLongBugCodes, printBug, reportAnalysisError, reportMissingClass, setOutputStream, setReportStackTrace, setUseLongBugCodes
 
Methods inherited from class edu.umd.cs.findbugs.AbstractBugReporter
addObserver, getEngine, getMissingClassName, getProjectStats, logError, notifyObservers, reportBug, reportSkippedAnalysis, setEngine, setErrorVerbosity, setPriorityThreshold
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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(org.apache.bcel.classfile.JavaClass javaClass)
Description copied from interface: ClassObserver
Observe a class.

Parameters:
javaClass - the class

reportMissingClass

public void reportMissingClass(java.lang.ClassNotFoundException ex)
Description copied from interface: RepositoryLookupFailureCallback
Called to report a lookup failure.

Specified by:
reportMissingClass in interface RepositoryLookupFailureCallback
Overrides:
reportMissingClass in class AbstractBugReporter
Parameters:
ex - a ClassNotFoundException resulting from the failure

logError

public void logError(java.lang.String message)
Description copied from interface: RepositoryLookupFailureCallback
Log an error that occurs while performing analysis.

Specified by:
logError in interface RepositoryLookupFailureCallback
Overrides:
logError in class AbstractBugReporter
Parameters:
message - the error message

finish

public void finish()
Description copied from interface: BugReporter
Finish 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: AbstractBugReporter
Subclasses must override this. It will be called only for bugs which meet the priority threshold.

Specified by:
doReportBug in class AbstractBugReporter

reportQueuedErrors

public void reportQueuedErrors()
Description copied from interface: BugReporter
Report any accumulated error messages.

Specified by:
reportQueuedErrors in interface BugReporter
Overrides:
reportQueuedErrors in class TextUIBugReporter

emitLine

protected void emitLine(java.lang.String line)
Description copied from class: TextUIBugReporter
Emit one line of the error message report. By default, error messages are printed to System.err. Subclasses may override.

Overrides:
emitLine in class TextUIBugReporter
Parameters:
line - one line of the error report