void (AnActionButton button) { final int selIndex = myMacrosList.getSelectedIndex(); if (selIndex == -1) return; final ActionMacro macro = myMacrosModel.getElementAt(selIndex); String newName; do { newName = Messages.showInputDialog(mySplitter, IdeBundle.message("prompt.enter.new.name"), IdeBundle.message("title.rename.macro"), Messages.getQuestionIcon(), macro.getName(), null); if (newName == null || macro.getName().equals(newName)) return; } while (!canRenameMacro(newName)); myRenamingMap.put(ActionMacro.MACRO_ACTION_PREFIX + macro.getName(), ActionMacro.MACRO_ACTION_PREFIX + newName); macro.setName(newName); myMacrosList.repaint(); }