Class MainFrame

  • All Implemented Interfaces:
    LogSync, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants

    public class MainFrame
    extends FBFrame
    implements LogSync
    See Also:
    Serialized Form
    • Field Detail

      • GUI2_DEBUG

        public static final boolean GUI2_DEBUG
      • MAC_OS_X

        public static final boolean MAC_OS_X
      • SEARCH_TEXT_FIELD_SIZE

        private static final int SEARCH_TEXT_FIELD_SIZE
        See Also:
        Constant Field Values
      • instance

        private static MainFrame instance
      • currentSelectedBugAspects

        private BugAspects currentSelectedBugAspects
      • curProject

        private volatile Project curProject
      • newProject

        private volatile boolean newProject
      • logger

        private final Logger logger
      • saveFile

        @CheckForNull
        private java.io.File saveFile
      • backgroundExecutor

        private final java.util.concurrent.ExecutorService backgroundExecutor
      • mainFrameInitialized

        private final java.util.concurrent.CountDownLatch mainFrameInitialized
      • waitCount

        private int waitCount
      • waitLock

        private final java.lang.Object waitLock
      • errorMsg

        private volatile java.lang.String errorMsg
      • projectChanged

        private boolean projectChanged
      • statusBarLabel

        private final javax.swing.JLabel statusBarLabel
      • sourceSearchTextField

        private final javax.swing.JTextField sourceSearchTextField
      • findButton

        private final javax.swing.JButton findButton
      • findNextButton

        private final javax.swing.JButton findNextButton
      • findPreviousButton

        private final javax.swing.JButton findPreviousButton
      • summaryTopPanel

        private javax.swing.JPanel summaryTopPanel
      • summaryHtmlArea

        javax.swing.JEditorPane summaryHtmlArea
      • summaryHtmlScrollPane

        private final javax.swing.JScrollPane summaryHtmlScrollPane
      • previousDecrementToZero

        volatile java.lang.Exception previousDecrementToZero
    • Method Detail

      • getInstance

        public static MainFrame getInstance()
      • showMessageDialog

        public void showMessageDialog​(java.lang.String message)
      • showConfirmDialog

        public int showConfirmDialog​(java.lang.String message,
                                     java.lang.String title,
                                     java.lang.String ok,
                                     java.lang.String cancel)
      • acquireDisplayWait

        public void acquireDisplayWait()
      • releaseDisplayWait

        public void releaseDisplayWait()
      • waitUntilReady

        public void waitUntilReady()
                            throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • getTree

        public javax.swing.JTree getTree()
      • getProject

        @Nonnull
        public Project getProject()
      • setProject

        public void setProject​(Project p)
      • setProjectChanged

        public void setProjectChanged​(boolean b)
        Called when something in the project is changed and the change needs to be saved. This method should be called instead of using projectChanged = b.
      • error

        public void error​(java.lang.String message)
        Show an error dialog.
        Specified by:
        error in interface LogSync
      • writeToLog

        public void writeToLog​(java.lang.String message)
        Write a message to stdout.
        Specified by:
        writeToLog in interface LogSync
      • showConfirmDialog

        public int showConfirmDialog​(java.lang.String message,
                                     java.lang.String title,
                                     int optionType)
      • getAvailableSortables

        public Sortables[] getAvailableSortables()
      • updateStatusBar

        void updateStatusBar()
      • callOnClose

        void callOnClose()
        This method is called when the application is closing. This is either by the exit menuItem or by clicking on the window's system menu.
      • createRecentItem

        javax.swing.JMenuItem createRecentItem​(java.io.File f,
                                               SaveType localSaveType)
      • openAnalysis

        public boolean openAnalysis​(java.io.File f,
                                    SaveType saveType)
        Opens the analysis. Also clears the source and summary panes. Makes comments enabled false. Sets the saveType and adds the file to the recent menu.
        Parameters:
        f -
        Returns:
        whether the operation was successful
      • clearBugCollection

        void clearBugCollection()
      • setBugCollection

        void setBugCollection​(BugCollection bugCollection)
      • setProjectAndBugCollectionInSwingThread

        void setProjectAndBugCollectionInSwingThread​(Project project,
                                                     BugCollection bc)
      • setProjectAndBugCollection

        private void setProjectAndBugCollection​(@CheckForNull
                                                Project project,
                                                @CheckForNull
                                                BugCollection bugCollection)
      • updateProjectAndBugCollection

        void updateProjectAndBugCollection​(BugCollection bugCollection)
      • shouldDisplayIssue

        boolean shouldDisplayIssue​(BugInstance b)
      • createNewProjectFromMenuItem

        public void createNewProjectFromMenuItem()
      • newProject

        void newProject()
      • about

        void about()
      • preferences

        void preferences()
      • redoAnalysis

        void redoAnalysis()
      • syncBugInformation

        void syncBugInformation()
      • clearSourcePane

        void clearSourcePane()
      • initializeGUI

        private void initializeGUI()
      • statusBar

        javax.swing.JPanel statusBar()
      • summaryTab

        javax.swing.JSplitPane summaryTab()
      • createSourceCodePanel

        javax.swing.JPanel createSourceCodePanel()
      • createSourceSearchPanel

        javax.swing.JPanel createSourceSearchPanel()
      • setSourceTab

        void setSourceTab​(java.lang.String title,
                          @CheckForNull
                          BugInstance bug)
        Sets the title of the source tabs for either docking or non-docking versions.
      • getActionWithoutSavingMsg

        private java.lang.String getActionWithoutSavingMsg​(java.lang.String action)
      • updateBugTree

        public void updateBugTree()
      • resetViewCache

        public void resetViewCache()
      • updateTitle

        public void updateTitle()
        Changes the title based on curProject and saveFile.
      • shouldDisplayIssueIgnoringPackagePrefixes

        private boolean shouldDisplayIssueIgnoringPackagePrefixes​(BugInstance b)
      • selectPackagePrefixByProject

        public void selectPackagePrefixByProject()
      • join

        private static java.lang.String join​(java.lang.String s1,
                                             java.lang.String s2)
      • updateSummaryTab

        private void updateSummaryTab​(BugLeafNode node)
      • clearSummaryTab

        public void clearSummaryTab()
      • searchSource

        public void searchSource​(int type)
      • createProjectSettings

        public void createProjectSettings()
      • addFileToRecent

        public void addFileToRecent​(java.io.File xmlFile)
      • setSaveType

        public void setSaveType​(SaveType saveType)
      • getSaveType

        public SaveType getSaveType()
      • getCurrentSelectedBugLeaf

        public BugLeafNode getCurrentSelectedBugLeaf()
      • getCurrentSelectedBugAspects

        public BugAspects getCurrentSelectedBugAspects()
      • isProjectChanged

        public boolean isProjectChanged()
      • getSaveFile

        public java.io.File getSaveFile()
      • getCurrentProject

        public Project getCurrentProject()
      • getSaveMenuItem

        public javax.swing.JMenuItem getSaveMenuItem()
      • setSaveFile

        public void setSaveFile​(java.io.File saveFile)
      • getBackgroundExecutor

        public java.util.concurrent.ExecutorService getBackgroundExecutor()
      • getReconfigMenuItem

        public javax.swing.JMenuItem getReconfigMenuItem()
      • enableRecentMenu

        public void enableRecentMenu​(boolean enable)
      • setCurrentSelectedBugAspects

        public void setCurrentSelectedBugAspects​(BugAspects currentSelectedBugAspects)
      • getViewFilter

        public ViewFilter getViewFilter()
      • getCurProject

        public Project getCurProject()
      • projectChanged

        public boolean projectChanged()
      • getSummaryHtmlArea

        public javax.swing.JEditorPane getSummaryHtmlArea()
      • getStatusBarLabel

        public javax.swing.JLabel getStatusBarLabel()
      • getFindNextButton

        public javax.swing.JButton getFindNextButton()
      • getSummaryHtmlScrollPane

        public javax.swing.JScrollPane getSummaryHtmlScrollPane()
      • getFindPreviousButton

        public javax.swing.JButton getFindPreviousButton()
      • getSourceSearchTextField

        public javax.swing.JTextField getSourceSearchTextField()
      • getFindButton

        public javax.swing.JButton getFindButton()
      • getSummaryTopPanel

        public javax.swing.JPanel getSummaryTopPanel()
      • setSummaryTopPanel

        public void setSummaryTopPanel​(javax.swing.JPanel summaryTopPanel)
      • waitForMainFrameInitialized

        void waitForMainFrameInitialized()