|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
edu.umd.cs.findbugs.gui.FindBugsFrame
public class FindBugsFrame
The main GUI frame for FindBugs.
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 |
---|
private static final java.awt.Color HIGH_PRIORITY_COLOR
private static final java.awt.Color NORMAL_PRIORITY_COLOR
private static final java.awt.Color LOW_PRIORITY_COLOR
private static final java.awt.Color EXP_PRIORITY_COLOR
private static final FindBugsFrame.BugCellRenderer bugCellRenderer
private static final java.util.Comparator<BugInstance> bugInstanceClassComparator
private static final java.util.Comparator<BugInstance> bugInstancePackageComparator
private static final java.util.Comparator<BugInstance> bugInstanceTypeComparator
private static final java.util.Comparator<BugInstance> bugInstanceByClassComparator
private static final java.util.Comparator<BugInstance> bugInstanceByPackageComparator
private static final java.util.Comparator<BugInstance> bugInstanceByTypeComparator
private static final javax.swing.filechooser.FileFilter projectFileFilter
private static final javax.swing.filechooser.FileFilter auxClasspathEntryFileFilter
private static final javax.swing.filechooser.FileFilter xmlFileFilter
private static final java.util.HashSet<java.lang.String> archiveExtensionSet
private static final javax.swing.filechooser.FileFilter archiveAndDirectoryFilter
private static final java.lang.String GROUP_BY_CLASS
private static final java.lang.String GROUP_BY_PACKAGE
private static final java.lang.String GROUP_BY_BUG_TYPE
private static final java.lang.String[] GROUP_BY_ORDER_LIST
private static final int DIVIDER_FUDGE
private static final boolean BUG_COUNT
java.awt.Component selectedComponent
private static final int SELECTION_VOFFSET
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 javax.swing.JButton browseClasspathEntryButton
private javax.swing.JButton browseJarButton
private javax.swing.JButton browseSrcDirButton
private javax.swing.JEditorPane bugDescriptionEditorPane
private javax.swing.JScrollPane bugDescriptionScrollPane
private javax.swing.JTabbedPane bugDetailsTabbedPane
private javax.swing.JEditorPane bugSummaryEditorPane
private javax.swing.JSplitPane bugTreeBugDetailsSplitter
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 javax.swing.JMenuItem cutItem
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 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 javax.swing.JTabbedPane groupByTabbedPane
private javax.swing.JLabel growBoxSpacer
private javax.swing.JMenu helpMenu
private javax.swing.JRadioButtonMenuItem highPriorityButton
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.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.JMenuItem loadBugsItem
private javax.swing.JLabel logoLabel
private javax.swing.JRadioButtonMenuItem lowPriorityButton
private javax.swing.JRadioButtonMenuItem mediumPriorityButton
private javax.swing.JMenuItem newProjectItem
private javax.swing.JMenuItem openProjectItem
private javax.swing.JMenuItem pasteItem
private javax.swing.ButtonGroup priorityButtonGroup
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
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 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 javax.swing.JRadioButtonMenuItem viewProjectItem
private ConsoleLogger logger
private java.awt.CardLayout viewPanelLayout
private java.lang.String currentView
private java.io.File currentDirectory
private Project currentProject
private javax.swing.JTree[] bugTreeList
private AnalysisRun currentAnalysisRun
private SourceFinder sourceFinder
private BugInstance currentBugInstance
private SourceLineAnnotation currentSourceLineAnnotation
private java.lang.String currentBugDetailsKey
private javax.swing.JCheckBoxMenuItem[] bugCategoryCheckBoxList
private java.lang.String[] bugCategoryList
private static final boolean MAC_OS_X
private static final int MENU_MASK
Constructor Detail |
---|
public FindBugsFrame()
Method Detail |
---|
private void initComponents()
private void selectAllActionPerformed(java.awt.event.ActionEvent evt)
private void disableEditKeyBindings(javax.swing.JList list)
private java.lang.String buildSelectPath(javax.swing.JList list)
private void pasteActionPerformed(java.awt.event.ActionEvent evt)
private void copyActionPerformed(java.awt.event.ActionEvent evt)
private void cutActionPerformed(java.awt.event.ActionEvent evt)
private void focusGainedHandler(java.awt.event.FocusEvent evt)
private void classpathUpButtonActionPerformed(java.awt.event.ActionEvent evt)
private void sourceDownButtonActionPerformed(java.awt.event.ActionEvent evt)
private void sourceUpButtonActionPerformed(java.awt.event.ActionEvent evt)
private void classpathDownButtonActionPerformed(java.awt.event.ActionEvent evt)
private void viewBugsItemActionPerformed(java.awt.event.ActionEvent evt)
private void viewProjectItemActionPerformed(java.awt.event.ActionEvent evt)
private void highPriorityButtonActionPerformed(java.awt.event.ActionEvent evt)
private void mediumPriorityButtonActionPerformed(java.awt.event.ActionEvent evt)
private void lowPriorityButtonActionPerformed(java.awt.event.ActionEvent evt)
private void expPriorityButtonActionPerformed(java.awt.event.ActionEvent evt)
private void saveBugsItemActionPerformed(java.awt.event.ActionEvent evt)
private void loadBugsItemActionPerformed(java.awt.event.ActionEvent evt)
private void configureDetectorsItemActionPerformed(java.awt.event.ActionEvent evt)
private void reloadProjectItemActionPerformed(java.awt.event.ActionEvent evt)
private void saveProjectAsItemActionPerformed(java.awt.event.ActionEvent evt)
private void viewMenuMenuSelected(javax.swing.event.MenuEvent evt)
private void fileMenuMenuSelected(javax.swing.event.MenuEvent evt)
private void closeProjectItemActionPerformed(java.awt.event.ActionEvent evt)
private void removeClasspathEntryButtonActionPerformed(java.awt.event.ActionEvent evt)
private void addClasspathEntryButtonActionPerformed(java.awt.event.ActionEvent evt)
private void browseClasspathEntryButtonActionPerformed(java.awt.event.ActionEvent evt)
private void fullDescriptionsItemActionPerformed(java.awt.event.ActionEvent evt)
private void viewBugDetailsItemActionPerformed(java.awt.event.ActionEvent evt)
private void bugTreeBugDetailsSplitterPropertyChange(java.beans.PropertyChangeEvent evt)
private void openProjectItemActionPerformed(java.awt.event.ActionEvent evt)
private void saveProjectItemActionPerformed(java.awt.event.ActionEvent evt)
private void aboutItemActionPerformed(java.awt.event.ActionEvent evt)
private void consoleSplitterPropertyChange(java.beans.PropertyChangeEvent evt)
private void viewConsoleItemActionPerformed(java.awt.event.ActionEvent evt)
private void findBugsButtonActionPerformed(java.awt.event.ActionEvent evt)
private void browseSrcDirButtonActionPerformed(java.awt.event.ActionEvent evt)
private void srcDirTextFieldActionPerformed(java.awt.event.ActionEvent evt)
private void jarNameTextFieldActionPerformed(java.awt.event.ActionEvent evt)
private void browseJarButtonActionPerformed(java.awt.event.ActionEvent evt)
private void newProjectItemActionPerformed(java.awt.event.ActionEvent evt)
private void exitItemActionPerformed(java.awt.event.ActionEvent evt)
private void removeSrcDirButtonActionPerformed(java.awt.event.ActionEvent evt)
private void removeJarButtonActionPerformed(java.awt.event.ActionEvent evt)
private void addSourceDirButtonActionPerformed(java.awt.event.ActionEvent evt)
private void addJarButtonActionPerformed(java.awt.event.ActionEvent evt)
private void exitForm(java.awt.event.WindowEvent evt)
private void equalizeControls(javax.swing.JComponent[] components)
private void bugTreeSelectionChanged(javax.swing.event.TreeSelectionEvent e)
e
- the TreeSelectionEventprivate void openRecentProjectItemActionPerformed(java.awt.event.ActionEvent evt)
private boolean moveEntriesUp(javax.swing.JList entryList)
private boolean moveEntriesDown(javax.swing.JList entryList)
private void resyncAuxClasspathEntries()
private void resyncSourceEntries()
private void localiseButton(javax.swing.AbstractButton button, java.lang.String key, java.lang.String defaultString, boolean setMnemonic)
button
- The button to localisekey
- The key to look up in resource bundledefaultString
- default String to use if key not foundsetMnemonic
- whether or not to set the mnemonic. According to Sun's
guidelines, default/cancel buttons should not have mnemonics
but instead should use Return/Escapeprivate void postInitComponents()
private void rebuildRecentProjectsMenu()
private static java.lang.Object getTreeSelectionOf(javax.swing.JTree tree, java.lang.Class c)
tree
- the treec
- the class
private Project getCurrentProject()
private AnalysisRun getCurrentAnalysisRun()
private BugInstance getCurrentBugInstance()
private boolean isSplitterMaximized(javax.swing.JSplitPane splitter, java.beans.PropertyChangeEvent evt)
splitter
- the JSplitPaneevt
- the event that is changing the splitter valueprivate void checkBugDetailsVisibility()
private javax.swing.JTree getCurrentBugTree()
private void setPriorityThreshold(int threshold)
threshold
- the thresholdprivate void ableEditMenu()
private void setProject(Project project)
private void updateTitle(Project project)
private boolean saveProject(Project project, java.lang.String dialogTitle)
project
- the Project to savedialogTitle
- the title for the save dialog (if needed)private boolean saveProject(Project project, java.lang.String dialogTitle, boolean chooseFilename)
project
- the Project to savedialogTitle
- the title for the save dialog (if needed)chooseFilename
- if true, force a dialog to prompt the user
for a filename
private boolean closeProjectHook(Project project, java.lang.String savePromptTitle)
project
- the project being closedsavePromptTitle
- title to use for the "Save project?" dialog
private void synchProject(Project project)
project
- the selected projectprivate void synchAnalysisRun(AnalysisRun analysisRun)
analysisRun
- the selected analysis runprivate void setSummary(java.lang.String summaryXML)
private void populateAnalysisRunTreeModel(AnalysisRun analysisRun, java.lang.String groupBy)
private java.util.Comparator<BugInstance> getBugInstanceComparator(java.lang.String sortOrder)
private java.util.Comparator<BugInstance> getGroupComparator(java.lang.String groupBy)
private void setView(java.lang.String viewName)
private java.lang.String getView()
private void addJarToList()
private void addSrcToProject(java.lang.String srcFile)
srcFile
- the jar file to add to the projectprivate void addJarToProject(java.lang.String jarFile)
jarFile
- the jar file to add to the projectprivate java.lang.String[] parsePaths(java.lang.String paths)
path
- the classpath
private void addSourceDirToList()
private void addClasspathEntryToList()
private void addClasspathEntryToProject(java.lang.String classpathEntry)
classpathEntry
- the classpath entry to addprivate void synchBugInstance()
private boolean viewSource(Project project, AnalysisRun analysisRun, SourceLineAnnotation srcLine) throws java.io.IOException
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)
java.io.IOException
private void showBugInfo(BugInstance bugInstance)
bugInstance
- the bug instanceprivate void synchBugAnnotation(BugInstance selected)
selected
- the new BugInstanceprivate void toggleBugCategory(javax.swing.JCheckBoxMenuItem checkBox)
checkBox
- the bug category checkboxvoid about()
void exitFindBugs()
private javax.swing.JFileChooser createFileChooser()
private javax.swing.JFileChooser createFileChooser(javax.swing.JComponent extraComp)
extraComp
- The extra component to append to the dialog
private int chooseFile(javax.swing.JFileChooser dialog, java.lang.String dialogTitle)
dialog
- the file chooser dialogdialogTitle
- the dialog title
private int chooseFileToOpen(javax.swing.JFileChooser dialog)
dialog
- the file chooser dialog
private int updateCurrentDirectoryFromDialog(javax.swing.JFileChooser dialog, int outcome)
public ConsoleLogger getLogger()
public void error(java.lang.String message)
public void writeToConsole(java.lang.String message)
public java.io.File verifyFileSelection(java.io.File pickedFile)
public ProjectFilterSettings getFilterSettings()
public int getPriorityThreshold()
public static void main(java.lang.String[] args)
args
- the command line arguments
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |