use of edu.umd.cs.findbugs.gui2.FilterActivity.FilterActivityNotifier in project spotbugs by spotbugs.
the class MainFrameTree method createBugPopupMenu.
/**
* Creates popup menu for bugs on tree.
*/
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);
// Selects the top of the Jtree so the CommentsArea syncs up.
mainFrame.getTree().setSelectionRow(0);
});
popupMenu.add(filterMenuItem);
return popupMenu;
}
Aggregations