boolean (@NotNull String newName) { if (StringUtil.isEmpty(newName)) return false; final ListModel listModel = myOptionsList.getModel(); for (int i = 0; i < listModel.getSize(); i++) { final String severityName = ((SeverityBasedTextAttributes)listModel.getElementAt(i)).getSeverity().myName; if (Comparing.strEqual(severityName, newName, false)) return false; } return true; }