void () { final TemplateGroup templateGroup = getSingleSelectedGroup(); if (templateGroup == null) return; final String oldName = templateGroup.getName(); String newName = Messages.showInputDialog(myTree, CodeInsightBundle.message("label.enter.the.new.group.name"), CodeInsightBundle.message("dialog.title.rename"), null, oldName, new TemplateGroupInputValidator(oldName)); if (newName != null && !newName.equals(oldName)) { templateGroup.setName(newName); ((DefaultTreeModel)myTree.getModel()).nodeChanged(getNode(getSingleSelectedIndex())); } }