void (AnActionButton button) { stopEditing(); int selectedIndex = myPatternsTable.getSelectedRow(); if (selectedIndex < 0 || selectedIndex >= myPatternsModel.getRowCount()) { return; } TodoPattern patternToBeRemoved = myPatterns.get(selectedIndex); TableUtil.removeSelectedItems(myPatternsTable); for (int i = 0; i < myFilters.size(); i++) { TodoFilter filter = myFilters.get(i); if (filter.contains(patternToBeRemoved)) { filter.removeTodoPattern(patternToBeRemoved); myFiltersModel.fireTableRowsUpdated(i, i); } } }