JPopupMenu createBugPopupMenu ( ) { JPopupMenu popupMenu = new JPopupMenu ( ) ; JMenuItem filterMenuItem = MainFrameHelper . newJMenuItem ( "menu.filterBugsLikeThis" , "Filter bugs like this" ) ; filterMenuItem . addActionListener ( evt -> { new NewFilterFromBug ( new FilterFromBugPicker ( currentSelectedBugLeaf . getBug ( ) , Arrays . asList ( mainFrame . getAvailableSortables ( ) ) ) , new ApplyNewFilter ( mainFrame . getProject ( ) . getSuppressionFilter ( ) , PreferencesFrame . getInstance ( ) , new FilterActivityNotifier ( ) ) ) ; mainFrame . setProjectChanged ( true ) ; mainFrame . getTree ( ) . setSelectionRow ( 0 ) ; // Selects the top of the Jtree so the CommentsArea syncs up. } ) ; popupMenu . add ( filterMenuItem ) ; return popupMenu ; }
Creates popup menu for bugs on tree .