@Override
  public AnAction @NotNull [] getChildren(@Nullable AnActionEvent e) {
    if (e == null) return EMPTY_ARRAY;
    Project project = getEventProject(e);
    if (project == null) return EMPTY_ARRAY;

    ModifiableModuleModel modifiableModuleModel = e.getData(LangDataKeys.MODIFIABLE_MODULE_MODEL);
    List<AnAction> result = new ArrayList<>();
    result.add(new MoveModulesToGroupAction(myModuleGroup, IdeBundle.message("action.move.module.to.this.group")));
    result.add(new MoveModulesToSubGroupAction(myModuleGroup));
    result.add(Separator.getInstance());
    ModuleGrouper grouper = ModuleGrouper.instanceFor(project, modifiableModuleModel);
    StreamEx.of(myModuleGroup.childGroups(grouper)).sorted((moduleGroup1, moduleGroup2) -> {
      assert moduleGroup1.getGroupPath().length == moduleGroup2.getGroupPath().length;
      return moduleGroup1.toString().compareToIgnoreCase(moduleGroup2.toString());
    }).map(MoveModuleToGroup::new).into(result);

    return result.toArray(AnAction.EMPTY_ARRAY);
  }
@Override
  public AnAction @NotNull [] getChildren(@Nullable AnActionEvent e)