void () { int index = myPatternList.getSelectedIndex(); if (index >= 0) { FileTypeConfigurableInteractions.ignorePatternRemoved.log(); myModel.remove(index); if (myModel.size() > 0) { if (index >= myModel.size()) index = myModel.size() - 1; myPatternList.setSelectedIndex(index); } } }