// removed,
// rebuild tree
// from root.
{
Matcher m = mainFrame.getCurrentSelectedBugAspects().getMatcher();
Filter suppressionFilter = MainFrame.getInstance().getProject().getSuppressionFilter();
suppressionFilter.addChild(m);
PreferencesFrame.getInstance().updateFilterPanel();
FilterActivity.notifyListeners(FilterListener.Action.FILTERING, null);
return;
}
count = ((BugAspects) (deletePath.getParentPath().getLastPathComponent())).getCount();
}
/*
* deletePath should now be a path to the highest ancestor
* branch with the same number of elements as the branch to
* be deleted in other words, the branch that we actually
* have to remove in order to correctly remove the selected
* branch.
*/
BugTreeModel model = MainFrame.getInstance().getBugTreeModel();
TreeModelEvent event = new TreeModelEvent(mainFrame, deletePath.getParentPath(),
new int[] { model.getIndexOfChild(deletePath.getParentPath().getLastPathComponent(),
deletePath.getLastPathComponent()) }, new Object[] { deletePath.getLastPathComponent() });
Matcher m = mainFrame.getCurrentSelectedBugAspects().getMatcher();
Filter suppressionFilter = MainFrame.getInstance().getProject().getSuppressionFilter();
suppressionFilter.addChild(m);
PreferencesFrame.getInstance().updateFilterPanel();
model.sendEvent(event, BugTreeModel.TreeModification.REMOVE);
// FilterActivity.notifyListeners(FilterListener.Action.FILTERING,
// null);