void (@NotNull AnActionEvent e) { final DataContext dataContext = e.getDataContext(); final Module[] modules = e.getRequiredData(LangDataKeys.MODULE_CONTEXT_ARRAY); final List<String> newGroup; if (myModuleGroup != null) { String message = IdeBundle.message("prompt.specify.name.of.module.subgroup", myModuleGroup.presentableText(), whatToMove(modules)); String subgroup = Messages.showInputDialog(message, IdeBundle.message("title.module.sub.group"), Messages.getQuestionIcon()); if (subgroup == null || subgroup.trim().isEmpty()) return; newGroup = ContainerUtil.append(myModuleGroup.getGroupPathList(), subgroup); } else { String message = IdeBundle.message("prompt.specify.module.group.name", whatToMove(modules)); String group = Messages.showInputDialog(message, IdeBundle.message("title.module.group"), Messages.getQuestionIcon()); if (group == null || group.trim().isEmpty()) return; newGroup = Collections.singletonList(group); } doMove(modules, new ModuleGroup(newGroup), dataContext); }