boolean (final String name) { final Enumeration<ActionMacro> elements = myMacrosModel.elements(); while (elements.hasMoreElements()) { final ActionMacro macro = elements.nextElement(); if (macro.getName().equals(name)) { if (!MessageDialogBuilder .yesNo(IdeBundle.message("title.macro.name.already.used"), IdeBundle.message("message.macro.exists", name)) .icon(Messages.getWarningIcon()).ask(mySplitter)) { return false; } myMacrosModel.removeElement(macro); break; } } return true; }