edu.umd.cs.findbugs.gui
Class FindBugsFrame

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by javax.swing.JFrame
                      extended by edu.umd.cs.findbugs.gui.FindBugsFrame
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants

public class FindBugsFrame
extends javax.swing.JFrame

The main GUI frame for FindBugs.

Author:
David Hovemeyer
See Also:
Serialized Form

Nested Class Summary
private static class FindBugsFrame.ArchiveAndDirectoryFilter
          File filter for choosing archives and directories.
private static class FindBugsFrame.AuxClasspathEntryFileFilter
          Swing FileFilter for choosing an auxiliary classpath entry.
private static class FindBugsFrame.BugCellRenderer
          Custom cell renderer for the bug tree.
private static class FindBugsFrame.BugInstanceByClassComparator
          Two-level comparison of bug instances by class name and BugInstance natural ordering.
private static class FindBugsFrame.BugInstanceByPackageComparator
          Two-level comparison of bug instances by package and BugInstance natural ordering.
private static class FindBugsFrame.BugInstanceByTypeComparator
          Two-level comparison of bug instances by bug type and BugInstance natural ordering.
private static class FindBugsFrame.BugInstanceClassComparator
          Compare BugInstance class names.
private static class FindBugsFrame.BugInstancePackageComparator
          Compare BugInstance package names.
private static class FindBugsFrame.BugInstanceTypeComparator
          Compare BugInstance bug types.
private  class FindBugsFrame.BugTreeNode
          Tree node type for BugInstances.
private static class FindBugsFrame.ProjectFileFilter
          Swing FileFilter class for file selection dialogs for FindBugs project files.
private static class FindBugsFrame.XMLFileFilter
          Swing FileFilter for choosing XML saved bug files.
 
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
 
Nested classes/interfaces inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
 
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
private  javax.swing.JMenuItem aboutItem
           
private  javax.swing.JButton addClasspathEntryButton
           
private  javax.swing.JButton addJarButton
           
private  javax.swing.JButton addSourceDirButton
           
private  javax.swing.JTextArea annotationTextArea
           
private  javax.swing.JScrollPane annotationTextAreaScrollPane
           
private static javax.swing.filechooser.FileFilter archiveAndDirectoryFilter
          The instance of ArchiveAndDirectoryFilter.
private static java.util.HashSet<java.lang.String> archiveExtensionSet
          Set of archive file extensions.
private static javax.swing.filechooser.FileFilter auxClasspathEntryFileFilter
          The instance of AuxClasspathEntryFileFilter.
private  javax.swing.JButton browseClasspathEntryButton
           
private  javax.swing.JButton browseJarButton
           
private  javax.swing.JButton browseSrcDirButton
           
private static boolean BUG_COUNT
           
private  javax.swing.JCheckBoxMenuItem[] bugCategoryCheckBoxList
           
private  java.lang.String[] bugCategoryList
           
private static FindBugsFrame.BugCellRenderer bugCellRenderer
          The instance of BugCellRenderer.
private  javax.swing.JEditorPane bugDescriptionEditorPane
           
private  javax.swing.JScrollPane bugDescriptionScrollPane
           
private  javax.swing.JTabbedPane bugDetailsTabbedPane
           
private static java.util.Comparator<BugInstance> bugInstanceByClassComparator
          The instance of BugInstanceByClassComparator.
private static java.util.Comparator<BugInstance> bugInstanceByPackageComparator
          The instance of BugInstanceByPackageComparator.
private static java.util.Comparator<BugInstance> bugInstanceByTypeComparator
          The instance of BugTypeByTypeComparator.
private static java.util.Comparator<BugInstance> bugInstanceClassComparator
          The instance of BugInstanceClassComparator.
private static java.util.Comparator<BugInstance> bugInstancePackageComparator
          The instance of BugInstancePackageComparator.
private static java.util.Comparator<BugInstance> bugInstanceTypeComparator
          The instance of BugInstanceTypeComparator.
private  javax.swing.JEditorPane bugSummaryEditorPane
           
private  javax.swing.JSplitPane bugTreeBugDetailsSplitter
           
private  javax.swing.JTree[] bugTreeList
           
private  javax.swing.JPanel bugTreePanel
           
private  javax.swing.JTree byBugTypeBugTree
           
private  javax.swing.JScrollPane byBugTypeScrollPane
           
private  javax.swing.JTree byClassBugTree
           
private  javax.swing.JScrollPane byClassScrollPane
           
private  javax.swing.JTree byPackageBugTree
           
private  javax.swing.JScrollPane byPackageScrollPane
           
private  javax.swing.JScrollPane bySummary
           
private  javax.swing.JButton classpathDownButton
           
private  javax.swing.JLabel classpathEntryLabel
           
private  javax.swing.JList classpathEntryList
           
private  javax.swing.JLabel classpathEntryListLabel
           
private  javax.swing.JScrollPane classpathEntryListScrollPane
           
private  javax.swing.JTextField classpathEntryTextField
           
private  javax.swing.JButton classpathUpButton
           
private  javax.swing.JMenuItem closeProjectItem
           
private  javax.swing.JMenuItem configureDetectorsItem
           
private  javax.swing.JTextArea consoleMessageArea
           
private  javax.swing.JScrollPane consoleScrollPane
           
private  javax.swing.JSplitPane consoleSplitter
           
private  javax.swing.JMenuItem copyItem
           
private  AnalysisRun currentAnalysisRun
           
private  java.lang.String currentBugDetailsKey
           
private  BugInstance currentBugInstance
           
private  java.io.File currentDirectory
           
private  Project currentProject
           
private  SourceLineAnnotation currentSourceLineAnnotation
           
private  java.lang.String currentView
           
private  javax.swing.JMenuItem cutItem
           
private static int DIVIDER_FUDGE
          A fudge value required in our hack to get the REAL maximum divider location for a JSplitPane.
private  javax.swing.JMenu editMenu
           
private  javax.swing.JLabel editProjectLabel
           
private  javax.swing.JPanel editProjectPanel
           
private  javax.swing.JPanel emptyPanel
           
private  javax.swing.JMenuItem exitItem
           
private static java.awt.Color EXP_PRIORITY_COLOR
           
private  javax.swing.JRadioButtonMenuItem expPriorityButton
           
private  javax.swing.JMenu fileMenu
           
private  javax.swing.JMenu filterWarningsMenu
           
private  javax.swing.JButton findBugsButton
           
private  javax.swing.JCheckBoxMenuItem fullDescriptionsItem
           
private static java.lang.String GROUP_BY_BUG_TYPE
           
private static java.lang.String GROUP_BY_CLASS
           
private static java.lang.String[] GROUP_BY_ORDER_LIST
           
private static java.lang.String GROUP_BY_PACKAGE
           
private  javax.swing.JTabbedPane groupByTabbedPane
           
private  javax.swing.JLabel growBoxSpacer
           
private  javax.swing.JMenu helpMenu
           
private static java.awt.Color HIGH_PRIORITY_COLOR
           
private  javax.swing.JRadioButtonMenuItem highPriorityButton
           
private  javax.swing.JLabel jarFileLabel
           
private  javax.swing.JList jarFileList
           
private  javax.swing.JLabel jarFileListLabel
           
private  javax.swing.JScrollPane jarFileListScrollPane
           
private  javax.swing.JTextField jarNameTextField
           
private  javax.swing.JPanel jPanel1
           
private  javax.swing.JSeparator jSeparator1
           
private  javax.swing.JSeparator jSeparator10
           
private  javax.swing.JSeparator jSeparator11
           
private  javax.swing.JSeparator jSeparator2
           
private  javax.swing.JSeparator jSeparator3
           
private  javax.swing.JSeparator jSeparator4
           
private  javax.swing.JSeparator jSeparator5
           
private  javax.swing.JSeparator jSeparator6
           
private  javax.swing.JSeparator jSeparator7
           
private  javax.swing.JSeparator jSeparator8
           
private  javax.swing.JSeparator jSeparator9
           
private  javax.swing.JMenuItem loadBugsItem
           
private  ConsoleLogger logger
           
private  javax.swing.JLabel logoLabel
           
private static java.awt.Color LOW_PRIORITY_COLOR
           
private  javax.swing.JRadioButtonMenuItem lowPriorityButton
           
private static boolean MAC_OS_X
           
private  javax.swing.JRadioButtonMenuItem mediumPriorityButton
           
private static int MENU_MASK
           
private  javax.swing.JMenuItem newProjectItem
           
private static java.awt.Color NORMAL_PRIORITY_COLOR
           
private  javax.swing.JMenuItem openProjectItem
           
private  javax.swing.JMenuItem pasteItem
           
private  javax.swing.ButtonGroup priorityButtonGroup
           
private static javax.swing.filechooser.FileFilter projectFileFilter
          The instance of ProjectFileFilter.
private  javax.swing.JMenu recentProjectsMenu
           
private  javax.swing.JMenuItem reloadProjectItem
           
private  javax.swing.JButton removeClasspathEntryButton
           
private  javax.swing.JButton removeJarButton
           
private  javax.swing.JButton removeSrcDirButton
           
private  javax.swing.JPanel reportPanel
           
private  javax.swing.JMenuItem saveBugsItem
           
private  javax.swing.JMenuItem saveProjectAsItem
           
private  javax.swing.JMenuItem saveProjectItem
           
private  javax.swing.JMenuItem selectAllItem
           
(package private)  java.awt.Component selectedComponent
           
private static int SELECTION_VOFFSET
           
private  javax.swing.JMenu settingsMenu
           
private  javax.swing.JLabel sourceDirLabel
           
private  javax.swing.JList sourceDirList
           
private  javax.swing.JLabel sourceDirListLabel
           
private  javax.swing.JScrollPane sourceDirListScrollPane
           
private  javax.swing.JButton sourceDownButton
           
private  SourceFinder sourceFinder
           
private  javax.swing.JTextArea sourceTextArea
           
private  javax.swing.JScrollPane sourceTextAreaScrollPane
           
private  javax.swing.JButton sourceUpButton
           
private  javax.swing.JTextField srcDirTextField
           
private  javax.swing.JMenuBar theMenuBar
           
private  javax.swing.JLabel urlLabel
           
private  javax.swing.JCheckBoxMenuItem viewBugDetailsItem
           
private  javax.swing.JRadioButtonMenuItem viewBugsItem
           
private  javax.swing.JCheckBoxMenuItem viewConsoleItem
           
private  javax.swing.JMenu viewMenu
           
private  javax.swing.JPanel viewPanel
           
private  java.awt.CardLayout viewPanelLayout
           
private  javax.swing.JRadioButtonMenuItem viewProjectItem
           
private static javax.swing.filechooser.FileFilter xmlFileFilter
          The instance of XMLFileFilter.
 
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
FindBugsFrame()
          Creates new form FindBugsFrame.
 
Method Summary
private  void ableEditMenu()
           
(package private)  void about()
          Show About
private  void aboutItemActionPerformed(java.awt.event.ActionEvent evt)
           
private  void addClasspathEntryButtonActionPerformed(java.awt.event.ActionEvent evt)
           
private  void addClasspathEntryToList()
          Called to add the classpath entry in the classpathEntryTextField to the classpath entry list (and the project it represents).
private  void addClasspathEntryToProject(java.lang.String classpathEntry)
          Add a classpath entry to the current project.
private  void addJarButtonActionPerformed(java.awt.event.ActionEvent evt)
           
private  void addJarToList()
          Called to add the jar file in the jarNameTextField to the Jar file list (and the project it represents).
private  void addJarToProject(java.lang.String jarFile)
          Add a Jar file to the current project.
private  void addSourceDirButtonActionPerformed(java.awt.event.ActionEvent evt)
           
private  void addSourceDirToList()
          Called to add the source directory in the sourceDirTextField to the source directory list (and the project it represents).
private  void addSrcToProject(java.lang.String srcFile)
          Add a Src file to the current project.
private  void browseClasspathEntryButtonActionPerformed(java.awt.event.ActionEvent evt)
           
private  void browseJarButtonActionPerformed(java.awt.event.ActionEvent evt)
           
private  void browseSrcDirButtonActionPerformed(java.awt.event.ActionEvent evt)
           
private  void bugTreeBugDetailsSplitterPropertyChange(java.beans.PropertyChangeEvent evt)
           
private  void bugTreeSelectionChanged(javax.swing.event.TreeSelectionEvent e)
          This is called whenever the selection is changed in the bug tree.
private  java.lang.String buildSelectPath(javax.swing.JList list)
           
private  void checkBugDetailsVisibility()
           
private  int chooseFile(javax.swing.JFileChooser dialog, java.lang.String dialogTitle)
          Run a file chooser dialog.
private  int chooseFileToOpen(javax.swing.JFileChooser dialog)
          Run a file chooser dialog to choose a file to open.
private  void classpathDownButtonActionPerformed(java.awt.event.ActionEvent evt)
           
private  void classpathUpButtonActionPerformed(java.awt.event.ActionEvent evt)
           
private  boolean closeProjectHook(Project project, java.lang.String savePromptTitle)
          Hook to call before closing a project.
private  void closeProjectItemActionPerformed(java.awt.event.ActionEvent evt)
           
private  void configureDetectorsItemActionPerformed(java.awt.event.ActionEvent evt)
           
private  void consoleSplitterPropertyChange(java.beans.PropertyChangeEvent evt)
           
private  void copyActionPerformed(java.awt.event.ActionEvent evt)
           
private  javax.swing.JFileChooser createFileChooser()
          Create a file chooser dialog.
private  javax.swing.JFileChooser createFileChooser(javax.swing.JComponent extraComp)
          Create a file chooser dialog.
private  void cutActionPerformed(java.awt.event.ActionEvent evt)
           
private  void disableEditKeyBindings(javax.swing.JList list)
           
private  void equalizeControls(javax.swing.JComponent[] components)
          This makes the set of controls passed in all the same size, equal to the minimum needed of the largest control.
 void error(java.lang.String message)
          Show an error dialog.
(package private)  void exitFindBugs()
          Exit the application.
private  void exitForm(java.awt.event.WindowEvent evt)
          Exit the Application
private  void exitItemActionPerformed(java.awt.event.ActionEvent evt)
           
private  void expPriorityButtonActionPerformed(java.awt.event.ActionEvent evt)
           
private  void fileMenuMenuSelected(javax.swing.event.MenuEvent evt)
           
private  void findBugsButtonActionPerformed(java.awt.event.ActionEvent evt)
           
private  void focusGainedHandler(java.awt.event.FocusEvent evt)
           
private  void fullDescriptionsItemActionPerformed(java.awt.event.ActionEvent evt)
           
private  java.util.Comparator<BugInstance> getBugInstanceComparator(java.lang.String sortOrder)
          Get a BugInstance Comparator for given sort order.
private  AnalysisRun getCurrentAnalysisRun()
          Get the current analysis run.
private  BugInstance getCurrentBugInstance()
          Get the bug instance currently selected in the bug tree.
private  javax.swing.JTree getCurrentBugTree()
           
private  Project getCurrentProject()
          Get the current project.
 ProjectFilterSettings getFilterSettings()
          Get the current ProjectFilterSettings.
private  java.util.Comparator<BugInstance> getGroupComparator(java.lang.String groupBy)
          Get a Grouper for a given sort order.
 ConsoleLogger getLogger()
          Get the ConsoleLogger.
 int getPriorityThreshold()
          Get the current priority threshold.
private static java.lang.Object getTreeSelectionOf(javax.swing.JTree tree, java.lang.Class c)
          Based on the current tree selection path, get a user object whose class is the same as the given class.
private  java.lang.String getView()
          Get which view is displayed currently.
private  void highPriorityButtonActionPerformed(java.awt.event.ActionEvent evt)
           
private  void initComponents()
          This method is called from within the constructor to initialize the form.
private  boolean isSplitterMaximized(javax.swing.JSplitPane splitter, java.beans.PropertyChangeEvent evt)
          Return whether or not the given splitter is "maximized", meaning that the top window of the split has been given all of the space.
private  void jarNameTextFieldActionPerformed(java.awt.event.ActionEvent evt)
           
private  void loadBugsItemActionPerformed(java.awt.event.ActionEvent evt)
           
private  void localiseButton(javax.swing.AbstractButton button, java.lang.String key, java.lang.String defaultString, boolean setMnemonic)
          Localise the given AbstractButton, setting the text and optionally mnemonic Note that AbstractButton includes menus and menu items.
private  void lowPriorityButtonActionPerformed(java.awt.event.ActionEvent evt)
           
static void main(java.lang.String[] args)
          Invoke from the command line.
private  void mediumPriorityButtonActionPerformed(java.awt.event.ActionEvent evt)
           
private  boolean moveEntriesDown(javax.swing.JList entryList)
           
private  boolean moveEntriesUp(javax.swing.JList entryList)
           
private  void newProjectItemActionPerformed(java.awt.event.ActionEvent evt)
           
private  void openProjectItemActionPerformed(java.awt.event.ActionEvent evt)
           
private  void openRecentProjectItemActionPerformed(java.awt.event.ActionEvent evt)
           
private  java.lang.String[] parsePaths(java.lang.String paths)
          Parses a classpath into it's sub paths
private  void pasteActionPerformed(java.awt.event.ActionEvent evt)
           
private  void populateAnalysisRunTreeModel(AnalysisRun analysisRun, java.lang.String groupBy)
          Populate an analysis run's tree model for given sort order.
private  void postInitComponents()
          This is called from the constructor to perform post-initialization of the components in the form.
private  void rebuildRecentProjectsMenu()
           
private  void reloadProjectItemActionPerformed(java.awt.event.ActionEvent evt)
           
private  void removeClasspathEntryButtonActionPerformed(java.awt.event.ActionEvent evt)
           
private  void removeJarButtonActionPerformed(java.awt.event.ActionEvent evt)
           
private  void removeSrcDirButtonActionPerformed(java.awt.event.ActionEvent evt)
           
private  void resyncAuxClasspathEntries()
           
private  void resyncSourceEntries()
           
private  void saveBugsItemActionPerformed(java.awt.event.ActionEvent evt)
           
private  boolean saveProject(Project project, java.lang.String dialogTitle)
          Save given project.
private  boolean saveProject(Project project, java.lang.String dialogTitle, boolean chooseFilename)
          Offer to save the current Project to a file.
private  void saveProjectAsItemActionPerformed(java.awt.event.ActionEvent evt)
           
private  void saveProjectItemActionPerformed(java.awt.event.ActionEvent evt)
           
private  void selectAllActionPerformed(java.awt.event.ActionEvent evt)
           
private  void setPriorityThreshold(int threshold)
          Set the priority threshold for display of bugs in the bug tree.
private  void setProject(Project project)
           
private  void setSummary(java.lang.String summaryXML)
           
private  void setView(java.lang.String viewName)
          Set the view panel to display the named view.
private  void showBugInfo(BugInstance bugInstance)
          Show descriptive text about the type of bug
private  void sourceDownButtonActionPerformed(java.awt.event.ActionEvent evt)
           
private  void sourceUpButtonActionPerformed(java.awt.event.ActionEvent evt)
           
private  void srcDirTextFieldActionPerformed(java.awt.event.ActionEvent evt)
           
private  void synchAnalysisRun(AnalysisRun analysisRun)
          Synchronize the bug trees with the given analysisRun object.
private  void synchBugAnnotation(BugInstance selected)
          Synchronize the bug annotation text with the current bug instance, and update the annotation text with the new bug instance.
private  void synchBugInstance()
          Synchronize current bug instance with the bug detail window (source view, details window, etc.)
private  void synchProject(Project project)
          Synchronize the edit project dialog with given project.
private  void toggleBugCategory(javax.swing.JCheckBoxMenuItem checkBox)
          Toggle a bug category checkbox.
private  int updateCurrentDirectoryFromDialog(javax.swing.JFileChooser dialog, int outcome)
           
private  void updateTitle(Project project)
           
 java.io.File verifyFileSelection(java.io.File pickedFile)
          Fix up the path that is received from JFileChooser, if necessary Double clicking a directory causes a repeated name, for some reason such as a:\b\c\c when a:\b\c was chosen
private  void viewBugDetailsItemActionPerformed(java.awt.event.ActionEvent evt)
           
private  void viewBugsItemActionPerformed(java.awt.event.ActionEvent evt)
           
private  void viewConsoleItemActionPerformed(java.awt.event.ActionEvent evt)
           
private  void viewMenuMenuSelected(javax.swing.event.MenuEvent evt)
           
private  void viewProjectItemActionPerformed(java.awt.event.ActionEvent evt)
           
private  boolean viewSource(Project project, AnalysisRun analysisRun, SourceLineAnnotation srcLine)
          Update the source view window.
 void writeToConsole(java.lang.String message)
          Write a message to the console window.
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Frame
addNotify, finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, setLocationRelativeTo, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

HIGH_PRIORITY_COLOR

private static final java.awt.Color HIGH_PRIORITY_COLOR

NORMAL_PRIORITY_COLOR

private static final java.awt.Color NORMAL_PRIORITY_COLOR

LOW_PRIORITY_COLOR

private static final java.awt.Color LOW_PRIORITY_COLOR

EXP_PRIORITY_COLOR

private static final java.awt.Color EXP_PRIORITY_COLOR

bugCellRenderer

private static final FindBugsFrame.BugCellRenderer bugCellRenderer
The instance of BugCellRenderer.


bugInstanceClassComparator

private static final java.util.Comparator<BugInstance> bugInstanceClassComparator
The instance of BugInstanceClassComparator.


bugInstancePackageComparator

private static final java.util.Comparator<BugInstance> bugInstancePackageComparator
The instance of BugInstancePackageComparator.


bugInstanceTypeComparator

private static final java.util.Comparator<BugInstance> bugInstanceTypeComparator
The instance of BugInstanceTypeComparator.


bugInstanceByClassComparator

private static final java.util.Comparator<BugInstance> bugInstanceByClassComparator
The instance of BugInstanceByClassComparator.


bugInstanceByPackageComparator

private static final java.util.Comparator<BugInstance> bugInstanceByPackageComparator
The instance of BugInstanceByPackageComparator.


bugInstanceByTypeComparator

private static final java.util.Comparator<BugInstance> bugInstanceByTypeComparator
The instance of BugTypeByTypeComparator.


projectFileFilter

private static final javax.swing.filechooser.FileFilter projectFileFilter
The instance of ProjectFileFilter.


auxClasspathEntryFileFilter

private static final javax.swing.filechooser.FileFilter auxClasspathEntryFileFilter
The instance of AuxClasspathEntryFileFilter.


xmlFileFilter

private static final javax.swing.filechooser.FileFilter xmlFileFilter
The instance of XMLFileFilter.


archiveExtensionSet

private static final java.util.HashSet<java.lang.String> archiveExtensionSet
Set of archive file extensions.


archiveAndDirectoryFilter

private static final javax.swing.filechooser.FileFilter archiveAndDirectoryFilter
The instance of ArchiveAndDirectoryFilter.


GROUP_BY_CLASS

private static final java.lang.String GROUP_BY_CLASS
See Also:
Constant Field Values

GROUP_BY_PACKAGE

private static final java.lang.String GROUP_BY_PACKAGE
See Also:
Constant Field Values

GROUP_BY_BUG_TYPE

private static final java.lang.String GROUP_BY_BUG_TYPE
See Also:
Constant Field Values

GROUP_BY_ORDER_LIST

private static final java.lang.String[] GROUP_BY_ORDER_LIST

DIVIDER_FUDGE

private static final int DIVIDER_FUDGE
A fudge value required in our hack to get the REAL maximum divider location for a JSplitPane. Experience suggests that the value "1" would work here, but setting it a little higher makes the code a bit more robust.

See Also:
Constant Field Values

BUG_COUNT

private static final boolean BUG_COUNT

selectedComponent

java.awt.Component selectedComponent

SELECTION_VOFFSET

private static final int SELECTION_VOFFSET
See Also:
Constant Field Values

aboutItem

private javax.swing.JMenuItem aboutItem

addClasspathEntryButton

private javax.swing.JButton addClasspathEntryButton

addJarButton

private javax.swing.JButton addJarButton

addSourceDirButton

private javax.swing.JButton addSourceDirButton

annotationTextArea

private javax.swing.JTextArea annotationTextArea

annotationTextAreaScrollPane

private javax.swing.JScrollPane annotationTextAreaScrollPane

browseClasspathEntryButton

private javax.swing.JButton browseClasspathEntryButton

browseJarButton

private javax.swing.JButton browseJarButton

browseSrcDirButton

private javax.swing.JButton browseSrcDirButton

bugDescriptionEditorPane

private javax.swing.JEditorPane bugDescriptionEditorPane

bugDescriptionScrollPane

private javax.swing.JScrollPane bugDescriptionScrollPane

bugDetailsTabbedPane

private javax.swing.JTabbedPane bugDetailsTabbedPane

bugSummaryEditorPane

private javax.swing.JEditorPane bugSummaryEditorPane

bugTreeBugDetailsSplitter

private javax.swing.JSplitPane bugTreeBugDetailsSplitter

bugTreePanel

private javax.swing.JPanel bugTreePanel

byBugTypeBugTree

private javax.swing.JTree byBugTypeBugTree

byBugTypeScrollPane

private javax.swing.JScrollPane byBugTypeScrollPane

byClassBugTree

private javax.swing.JTree byClassBugTree

byClassScrollPane

private javax.swing.JScrollPane byClassScrollPane

byPackageBugTree

private javax.swing.JTree byPackageBugTree

byPackageScrollPane

private javax.swing.JScrollPane byPackageScrollPane

bySummary

private javax.swing.JScrollPane bySummary

classpathDownButton

private javax.swing.JButton classpathDownButton

classpathEntryLabel

private javax.swing.JLabel classpathEntryLabel

classpathEntryList

private javax.swing.JList classpathEntryList

classpathEntryListLabel

private javax.swing.JLabel classpathEntryListLabel

classpathEntryListScrollPane

private javax.swing.JScrollPane classpathEntryListScrollPane

classpathEntryTextField

private javax.swing.JTextField classpathEntryTextField

classpathUpButton

private javax.swing.JButton classpathUpButton

closeProjectItem

private javax.swing.JMenuItem closeProjectItem

configureDetectorsItem

private javax.swing.JMenuItem configureDetectorsItem

consoleMessageArea

private javax.swing.JTextArea consoleMessageArea

consoleScrollPane

private javax.swing.JScrollPane consoleScrollPane

consoleSplitter

private javax.swing.JSplitPane consoleSplitter

copyItem

private javax.swing.JMenuItem copyItem

cutItem

private javax.swing.JMenuItem cutItem

editMenu

private javax.swing.JMenu editMenu

editProjectLabel

private javax.swing.JLabel editProjectLabel

editProjectPanel

private javax.swing.JPanel editProjectPanel

emptyPanel

private javax.swing.JPanel emptyPanel

exitItem

private javax.swing.JMenuItem exitItem

expPriorityButton

private javax.swing.JRadioButtonMenuItem expPriorityButton

fileMenu

private javax.swing.JMenu fileMenu

filterWarningsMenu

private javax.swing.JMenu filterWarningsMenu

findBugsButton

private javax.swing.JButton findBugsButton

fullDescriptionsItem

private javax.swing.JCheckBoxMenuItem fullDescriptionsItem

groupByTabbedPane

private javax.swing.JTabbedPane groupByTabbedPane

growBoxSpacer

private javax.swing.JLabel growBoxSpacer

helpMenu

private javax.swing.JMenu helpMenu

highPriorityButton

private javax.swing.JRadioButtonMenuItem highPriorityButton

jPanel1

private javax.swing.JPanel jPanel1

jSeparator1

private javax.swing.JSeparator jSeparator1

jSeparator10

private javax.swing.JSeparator jSeparator10

jSeparator11

private javax.swing.JSeparator jSeparator11

jSeparator2

private javax.swing.JSeparator jSeparator2

jSeparator3

private javax.swing.JSeparator jSeparator3

jSeparator4

private javax.swing.JSeparator jSeparator4

jSeparator5

private javax.swing.JSeparator jSeparator5

jSeparator6

private javax.swing.JSeparator jSeparator6

jSeparator7

private javax.swing.JSeparator jSeparator7

jSeparator8

private javax.swing.JSeparator jSeparator8

jSeparator9

private javax.swing.JSeparator jSeparator9

jarFileLabel

private javax.swing.JLabel jarFileLabel

jarFileList

private javax.swing.JList jarFileList

jarFileListLabel

private javax.swing.JLabel jarFileListLabel

jarFileListScrollPane

private javax.swing.JScrollPane jarFileListScrollPane

jarNameTextField

private javax.swing.JTextField jarNameTextField

loadBugsItem

private javax.swing.JMenuItem loadBugsItem

logoLabel

private javax.swing.JLabel logoLabel

lowPriorityButton

private javax.swing.JRadioButtonMenuItem lowPriorityButton

mediumPriorityButton

private javax.swing.JRadioButtonMenuItem mediumPriorityButton

newProjectItem

private javax.swing.JMenuItem newProjectItem

openProjectItem

private javax.swing.JMenuItem openProjectItem

pasteItem

private javax.swing.JMenuItem pasteItem

priorityButtonGroup

private javax.swing.ButtonGroup priorityButtonGroup

recentProjectsMenu

private javax.swing.JMenu recentProjectsMenu

reloadProjectItem

private javax.swing.JMenuItem reloadProjectItem

removeClasspathEntryButton

private javax.swing.JButton removeClasspathEntryButton

removeJarButton

private javax.swing.JButton removeJarButton

removeSrcDirButton

private javax.swing.JButton removeSrcDirButton

reportPanel

private javax.swing.JPanel reportPanel

saveBugsItem

private javax.swing.JMenuItem saveBugsItem

saveProjectAsItem

private javax.swing.JMenuItem saveProjectAsItem

saveProjectItem

private javax.swing.JMenuItem saveProjectItem

selectAllItem

private javax.swing.JMenuItem selectAllItem

settingsMenu

private javax.swing.JMenu settingsMenu

sourceDirLabel

private javax.swing.JLabel sourceDirLabel

sourceDirList

private javax.swing.JList sourceDirList

sourceDirListLabel

private javax.swing.JLabel sourceDirListLabel

sourceDirListScrollPane

private javax.swing.JScrollPane sourceDirListScrollPane

sourceDownButton

private javax.swing.JButton sourceDownButton

sourceTextArea

private javax.swing.JTextArea sourceTextArea

sourceTextAreaScrollPane

private javax.swing.JScrollPane sourceTextAreaScrollPane

sourceUpButton

private javax.swing.JButton sourceUpButton

srcDirTextField

private javax.swing.JTextField srcDirTextField

theMenuBar

private javax.swing.JMenuBar theMenuBar

urlLabel

private javax.swing.JLabel urlLabel

viewBugDetailsItem

private javax.swing.JCheckBoxMenuItem viewBugDetailsItem

viewBugsItem

private javax.swing.JRadioButtonMenuItem viewBugsItem

viewConsoleItem

private javax.swing.JCheckBoxMenuItem viewConsoleItem

viewMenu

private javax.swing.JMenu viewMenu

viewPanel

private javax.swing.JPanel viewPanel

viewProjectItem

private javax.swing.JRadioButtonMenuItem viewProjectItem

logger

private ConsoleLogger logger

viewPanelLayout

private java.awt.CardLayout viewPanelLayout

currentView

private java.lang.String currentView

currentDirectory

private java.io.File currentDirectory

currentProject

private Project currentProject

bugTreeList

private javax.swing.JTree[] bugTreeList

currentAnalysisRun

private AnalysisRun currentAnalysisRun

sourceFinder

private SourceFinder sourceFinder

currentBugInstance

private BugInstance currentBugInstance

currentSourceLineAnnotation

private SourceLineAnnotation currentSourceLineAnnotation

currentBugDetailsKey

private java.lang.String currentBugDetailsKey

bugCategoryCheckBoxList

private javax.swing.JCheckBoxMenuItem[] bugCategoryCheckBoxList

bugCategoryList

private java.lang.String[] bugCategoryList

MAC_OS_X

private static final boolean MAC_OS_X

MENU_MASK

private static final int MENU_MASK
Constructor Detail

FindBugsFrame

public FindBugsFrame()
Creates new form FindBugsFrame.

Method Detail

initComponents

private void initComponents()
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.


selectAllActionPerformed

private void selectAllActionPerformed(java.awt.event.ActionEvent evt)

disableEditKeyBindings

private void disableEditKeyBindings(javax.swing.JList list)

buildSelectPath

private java.lang.String buildSelectPath(javax.swing.JList list)

pasteActionPerformed

private void pasteActionPerformed(java.awt.event.ActionEvent evt)

copyActionPerformed

private void copyActionPerformed(java.awt.event.ActionEvent evt)

cutActionPerformed

private void cutActionPerformed(java.awt.event.ActionEvent evt)

focusGainedHandler

private void focusGainedHandler(java.awt.event.FocusEvent evt)

classpathUpButtonActionPerformed

private void classpathUpButtonActionPerformed(java.awt.event.ActionEvent evt)

sourceDownButtonActionPerformed

private void sourceDownButtonActionPerformed(java.awt.event.ActionEvent evt)

sourceUpButtonActionPerformed

private void sourceUpButtonActionPerformed(java.awt.event.ActionEvent evt)

classpathDownButtonActionPerformed

private void classpathDownButtonActionPerformed(java.awt.event.ActionEvent evt)

viewBugsItemActionPerformed

private void viewBugsItemActionPerformed(java.awt.event.ActionEvent evt)

viewProjectItemActionPerformed

private void viewProjectItemActionPerformed(java.awt.event.ActionEvent evt)

highPriorityButtonActionPerformed

private void highPriorityButtonActionPerformed(java.awt.event.ActionEvent evt)

mediumPriorityButtonActionPerformed

private void mediumPriorityButtonActionPerformed(java.awt.event.ActionEvent evt)

lowPriorityButtonActionPerformed

private void lowPriorityButtonActionPerformed(java.awt.event.ActionEvent evt)

expPriorityButtonActionPerformed

private void expPriorityButtonActionPerformed(java.awt.event.ActionEvent evt)

saveBugsItemActionPerformed

private void saveBugsItemActionPerformed(java.awt.event.ActionEvent evt)

loadBugsItemActionPerformed

private void loadBugsItemActionPerformed(java.awt.event.ActionEvent evt)

configureDetectorsItemActionPerformed

private void configureDetectorsItemActionPerformed(java.awt.event.ActionEvent evt)

reloadProjectItemActionPerformed

private void reloadProjectItemActionPerformed(java.awt.event.ActionEvent evt)

saveProjectAsItemActionPerformed

private void saveProjectAsItemActionPerformed(java.awt.event.ActionEvent evt)

viewMenuMenuSelected

private void viewMenuMenuSelected(javax.swing.event.MenuEvent evt)

fileMenuMenuSelected

private void fileMenuMenuSelected(javax.swing.event.MenuEvent evt)

closeProjectItemActionPerformed

private void closeProjectItemActionPerformed(java.awt.event.ActionEvent evt)

removeClasspathEntryButtonActionPerformed

private void removeClasspathEntryButtonActionPerformed(java.awt.event.ActionEvent evt)

addClasspathEntryButtonActionPerformed

private void addClasspathEntryButtonActionPerformed(java.awt.event.ActionEvent evt)

browseClasspathEntryButtonActionPerformed

private void browseClasspathEntryButtonActionPerformed(java.awt.event.ActionEvent evt)

fullDescriptionsItemActionPerformed

private void fullDescriptionsItemActionPerformed(java.awt.event.ActionEvent evt)

viewBugDetailsItemActionPerformed

private void viewBugDetailsItemActionPerformed(java.awt.event.ActionEvent evt)

bugTreeBugDetailsSplitterPropertyChange

private void bugTreeBugDetailsSplitterPropertyChange(java.beans.PropertyChangeEvent evt)

openProjectItemActionPerformed

private void openProjectItemActionPerformed(java.awt.event.ActionEvent evt)

saveProjectItemActionPerformed

private void saveProjectItemActionPerformed(java.awt.event.ActionEvent evt)

aboutItemActionPerformed

private void aboutItemActionPerformed(java.awt.event.ActionEvent evt)

consoleSplitterPropertyChange

private void consoleSplitterPropertyChange(java.beans.PropertyChangeEvent evt)

viewConsoleItemActionPerformed

private void viewConsoleItemActionPerformed(java.awt.event.ActionEvent evt)

findBugsButtonActionPerformed

private void findBugsButtonActionPerformed(java.awt.event.ActionEvent evt)

browseSrcDirButtonActionPerformed

private void browseSrcDirButtonActionPerformed(java.awt.event.ActionEvent evt)

srcDirTextFieldActionPerformed

private void srcDirTextFieldActionPerformed(java.awt.event.ActionEvent evt)

jarNameTextFieldActionPerformed

private void jarNameTextFieldActionPerformed(java.awt.event.ActionEvent evt)

browseJarButtonActionPerformed

private void browseJarButtonActionPerformed(java.awt.event.ActionEvent evt)

newProjectItemActionPerformed

private void newProjectItemActionPerformed(java.awt.event.ActionEvent evt)

exitItemActionPerformed

private void exitItemActionPerformed(java.awt.event.ActionEvent evt)

removeSrcDirButtonActionPerformed

private void removeSrcDirButtonActionPerformed(java.awt.event.ActionEvent evt)

removeJarButtonActionPerformed

private void removeJarButtonActionPerformed(java.awt.event.ActionEvent evt)

addSourceDirButtonActionPerformed

private void addSourceDirButtonActionPerformed(java.awt.event.ActionEvent evt)

addJarButtonActionPerformed

private void addJarButtonActionPerformed(java.awt.event.ActionEvent evt)

exitForm

private void exitForm(java.awt.event.WindowEvent evt)
Exit the Application


equalizeControls

private void equalizeControls(javax.swing.JComponent[] components)
This makes the set of controls passed in all the same size, equal to the minimum needed of the largest control.


bugTreeSelectionChanged

private void bugTreeSelectionChanged(javax.swing.event.TreeSelectionEvent e)
This is called whenever the selection is changed in the bug tree.

Parameters:
e - the TreeSelectionEvent

openRecentProjectItemActionPerformed

private void openRecentProjectItemActionPerformed(java.awt.event.ActionEvent evt)

moveEntriesUp

private boolean moveEntriesUp(javax.swing.JList entryList)

moveEntriesDown

private boolean moveEntriesDown(javax.swing.JList entryList)

resyncAuxClasspathEntries

private void resyncAuxClasspathEntries()

resyncSourceEntries

private void resyncSourceEntries()

localiseButton

private void localiseButton(javax.swing.AbstractButton button,
                            java.lang.String key,
                            java.lang.String defaultString,
                            boolean setMnemonic)
Localise the given AbstractButton, setting the text and optionally mnemonic Note that AbstractButton includes menus and menu items.

Parameters:
button - The button to localise
key - The key to look up in resource bundle
defaultString - default String to use if key not found
setMnemonic - whether or not to set the mnemonic. According to Sun's guidelines, default/cancel buttons should not have mnemonics but instead should use Return/Escape

postInitComponents

private void postInitComponents()
This is called from the constructor to perform post-initialization of the components in the form.


rebuildRecentProjectsMenu

private void rebuildRecentProjectsMenu()

getTreeSelectionOf

private static java.lang.Object getTreeSelectionOf(javax.swing.JTree tree,
                                                   java.lang.Class c)
Based on the current tree selection path, get a user object whose class is the same as the given class.

Parameters:
tree - the tree
c - the class
Returns:
an instance of the given kind of object which is in the current selection, or null if there is no matching object

getCurrentProject

private Project getCurrentProject()
Get the current project.


getCurrentAnalysisRun

private AnalysisRun getCurrentAnalysisRun()
Get the current analysis run.


getCurrentBugInstance

private BugInstance getCurrentBugInstance()
Get the bug instance currently selected in the bug tree.


isSplitterMaximized

private boolean isSplitterMaximized(javax.swing.JSplitPane splitter,
                                    java.beans.PropertyChangeEvent evt)
Return whether or not the given splitter is "maximized", meaning that the top window of the split has been given all of the space. Note that this window assumes that the split is vertical (meaning that we have top and bottom components).

Parameters:
splitter - the JSplitPane
evt - the event that is changing the splitter value

checkBugDetailsVisibility

private void checkBugDetailsVisibility()

getCurrentBugTree

private javax.swing.JTree getCurrentBugTree()

setPriorityThreshold

private void setPriorityThreshold(int threshold)
Set the priority threshold for display of bugs in the bug tree.

Parameters:
threshold - the threshold

ableEditMenu

private void ableEditMenu()

setProject

private void setProject(Project project)

updateTitle

private void updateTitle(Project project)

saveProject

private boolean saveProject(Project project,
                            java.lang.String dialogTitle)
Save given project. If the project already has a valid filename, use that filename. Otherwise, prompt for one.

Parameters:
project - the Project to save
dialogTitle - the title for the save dialog (if needed)

saveProject

private boolean saveProject(Project project,
                            java.lang.String dialogTitle,
                            boolean chooseFilename)
Offer to save the current Project to a file.

Parameters:
project - the Project to save
dialogTitle - the title for the save dialog (if needed)
chooseFilename - if true, force a dialog to prompt the user for a filename
Returns:
true if the project is saved successfully, false if the user cancels or an error occurs

closeProjectHook

private boolean closeProjectHook(Project project,
                                 java.lang.String savePromptTitle)
Hook to call before closing a project.

Parameters:
project - the project being closed
savePromptTitle - title to use for the "Save project?" dialog
Returns:
true if user has confirmed that the project should be closed, false if the close is cancelled

synchProject

private void synchProject(Project project)
Synchronize the edit project dialog with given project.

Parameters:
project - the selected project

synchAnalysisRun

private void synchAnalysisRun(AnalysisRun analysisRun)
Synchronize the bug trees with the given analysisRun object.

Parameters:
analysisRun - the selected analysis run

setSummary

private void setSummary(java.lang.String summaryXML)

populateAnalysisRunTreeModel

private void populateAnalysisRunTreeModel(AnalysisRun analysisRun,
                                          java.lang.String groupBy)
Populate an analysis run's tree model for given sort order.


getBugInstanceComparator

private java.util.Comparator<BugInstance> getBugInstanceComparator(java.lang.String sortOrder)
Get a BugInstance Comparator for given sort order.


getGroupComparator

private java.util.Comparator<BugInstance> getGroupComparator(java.lang.String groupBy)
Get a Grouper for a given sort order.


setView

private void setView(java.lang.String viewName)
Set the view panel to display the named view.


getView

private java.lang.String getView()
Get which view is displayed currently.


addJarToList

private void addJarToList()
Called to add the jar file in the jarNameTextField to the Jar file list (and the project it represents).


addSrcToProject

private void addSrcToProject(java.lang.String srcFile)
Add a Src file to the current project.

Parameters:
srcFile - the jar file to add to the project

addJarToProject

private void addJarToProject(java.lang.String jarFile)
Add a Jar file to the current project.

Parameters:
jarFile - the jar file to add to the project

parsePaths

private java.lang.String[] parsePaths(java.lang.String paths)
Parses a classpath into it's sub paths

Parameters:
path - the classpath
Returns:
an array of paths

addSourceDirToList

private void addSourceDirToList()
Called to add the source directory in the sourceDirTextField to the source directory list (and the project it represents).


addClasspathEntryToList

private void addClasspathEntryToList()
Called to add the classpath entry in the classpathEntryTextField to the classpath entry list (and the project it represents).


addClasspathEntryToProject

private void addClasspathEntryToProject(java.lang.String classpathEntry)
Add a classpath entry to the current project.

Parameters:
classpathEntry - the classpath entry to add

synchBugInstance

private void synchBugInstance()
Synchronize current bug instance with the bug detail window (source view, details window, etc.)


viewSource

private boolean viewSource(Project project,
                           AnalysisRun analysisRun,
                           SourceLineAnnotation srcLine)
                    throws java.io.IOException
Update the source view window.

Parameters:
project - the project (containing the source directories to search)
analysisRun - the analysis run (containing the mapping of classes to source files)
srcLine - the source line annotation (specifying source file to load and which lines to highlight)
Returns:
true if the source was shown successfully, false otherwise
Throws:
java.io.IOException

showBugInfo

private void showBugInfo(BugInstance bugInstance)
Show descriptive text about the type of bug

Parameters:
bugInstance - the bug instance

synchBugAnnotation

private void synchBugAnnotation(BugInstance selected)
Synchronize the bug annotation text with the current bug instance, and update the annotation text with the new bug instance.

Parameters:
selected - the new BugInstance

toggleBugCategory

private void toggleBugCategory(javax.swing.JCheckBoxMenuItem checkBox)
Toggle a bug category checkbox. Changes are reflected in the displayed bug trees (if any) and also in the user preferences.

Parameters:
checkBox - the bug category checkbox

about

void about()
Show About


exitFindBugs

void exitFindBugs()
Exit the application.


createFileChooser

private javax.swing.JFileChooser createFileChooser()
Create a file chooser dialog. Ensures that the dialog will start in the current directory.

Returns:
the file chooser

createFileChooser

private javax.swing.JFileChooser createFileChooser(javax.swing.JComponent extraComp)
Create a file chooser dialog. Ensures that the dialog will start in the current directory.

Parameters:
extraComp - The extra component to append to the dialog
Returns:
the file chooser

chooseFile

private int chooseFile(javax.swing.JFileChooser dialog,
                       java.lang.String dialogTitle)
Run a file chooser dialog. If a file is chosen, then the current directory is updated.

Parameters:
dialog - the file chooser dialog
dialogTitle - the dialog title
Returns:
the outcome

chooseFileToOpen

private int chooseFileToOpen(javax.swing.JFileChooser dialog)
Run a file chooser dialog to choose a file to open. If a file is chosen, then the current directory is updated.

Parameters:
dialog - the file chooser dialog
Returns:
the outcome

updateCurrentDirectoryFromDialog

private int updateCurrentDirectoryFromDialog(javax.swing.JFileChooser dialog,
                                             int outcome)

getLogger

public ConsoleLogger getLogger()
Get the ConsoleLogger.


error

public void error(java.lang.String message)
Show an error dialog.


writeToConsole

public void writeToConsole(java.lang.String message)
Write a message to the console window.


verifyFileSelection

public java.io.File verifyFileSelection(java.io.File pickedFile)
Fix up the path that is received from JFileChooser, if necessary Double clicking a directory causes a repeated name, for some reason such as a:\b\c\c when a:\b\c was chosen


getFilterSettings

public ProjectFilterSettings getFilterSettings()
Get the current ProjectFilterSettings.


getPriorityThreshold

public int getPriorityThreshold()
Get the current priority threshold.


main

public static void main(java.lang.String[] args)
Invoke from the command line.

Parameters:
args - the command line arguments