Package edu.umd.cs.findbugs.gui2
Class BugLoader
- java.lang.Object
-
- edu.umd.cs.findbugs.gui2.BugLoader
-
public class BugLoader extends java.lang.ObjectEverything having to do with loading bugs should end up here.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classBugLoader.RedoAnalysisCallbackjust used to know how the new analysis went
-
Field Summary
Fields Modifier and Type Field Description private static UserPreferencespreferencesSingleton
-
Constructor Summary
Constructors Modifier Constructor Description privateBugLoader()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static voidaddDeadBugMatcher(BugCollection bugCollection)static BugCollectioncombineBugHistories()TODO: This really needs to be rewritten such that they don't have to choose ALL xmls in one fel swoop.private static IFindBugsEnginecreateEngine(Project p, BugReporter pcb)Create the IFindBugsEngine that will be used to analyze the application.static BugCollectiondoAnalysis(Project p)Does what it says it does, hit apple r (control r on pc) and the analysis is redone using the current projectstatic BugCollectiondoAnalysis(Project p, FindBugsProgress progressCallback)Performs an analysis and returns the BugSet created(package private) static UserPreferencesgetUserPreferences()Get UserPreferences singleton.static SortedBugCollectionloadBugs(MainFrame mainFrame, Project project, java.io.File source)static SortedBugCollectionloadBugs(MainFrame mainFrame, Project project, java.net.URL url)static ProjectloadProject(MainFrame mainFrame, java.io.File f)static BugCollectionredoAnalysisKeepComments(Project p)Does what it says it does, hit apple r (control r on pc) and the analysis is redone using the current project
-
-
-
Field Detail
-
preferencesSingleton
private static UserPreferences preferencesSingleton
-
-
Method Detail
-
getUserPreferences
static UserPreferences getUserPreferences()
Get UserPreferences singleton. This should only be used if there is a single set of user preferences to be used for all projects.- Returns:
- the UserPreferences
-
doAnalysis
public static BugCollection doAnalysis(@Nonnull Project p, FindBugsProgress progressCallback) throws java.io.IOException, java.lang.InterruptedException
Performs an analysis and returns the BugSet created- Parameters:
p- The Project to run the analysis onprogressCallback- the progressCallBack is supposed to be supplied by analyzing dialog, FindBugs supplies progress information while it runs the analysis- Returns:
- the bugs found
- Throws:
java.lang.InterruptedExceptionjava.io.IOException
-
createEngine
private static IFindBugsEngine createEngine(@Nonnull Project p, BugReporter pcb)
Create the IFindBugsEngine that will be used to analyze the application.- Parameters:
p- the Projectpcb- the PrintCallBack- Returns:
- the IFindBugsEngine
-
loadBugs
@CheckForNull public static SortedBugCollection loadBugs(MainFrame mainFrame, Project project, java.io.File source)
-
loadBugs
@CheckForNull public static SortedBugCollection loadBugs(MainFrame mainFrame, Project project, java.net.URL url)
-
addDeadBugMatcher
static void addDeadBugMatcher(BugCollection bugCollection)
-
combineBugHistories
public static BugCollection combineBugHistories()
TODO: This really needs to be rewritten such that they don't have to choose ALL xmls in one fel swoop. I'm thinking something more like new project wizard's functionality. -Dan Merges bug collection histories from xmls selected by the user. Right now all xmls must be in the same folder and he must select all of them at once Makes use of FindBugs's mergeCollection method in the Update class of the workflow package- Returns:
- the merged collecction of bugs
-
doAnalysis
@CheckForNull public static BugCollection doAnalysis(@Nonnull Project p)
Does what it says it does, hit apple r (control r on pc) and the analysis is redone using the current project- Parameters:
p-- Returns:
- the bugs from the reanalysis, or null if cancelled
-
redoAnalysisKeepComments
@CheckForNull public static BugCollection redoAnalysisKeepComments(@Nonnull Project p)
Does what it says it does, hit apple r (control r on pc) and the analysis is redone using the current project- Parameters:
p-- Returns:
- the bugs from the reanalysis, or null if canceled
-
-