private @NotNull AnAction createRunConfigurationFolderActions(
    @NotNull Project project,
    @NotNull Collection<Map<String, List<RunnerAndConfigurationSettings>>> folderMaps) {
    return new ActionGroup() {
      @Override
      public AnAction @NotNull [] getChildren(@Nullable AnActionEvent e) {
        List<AnAction> result = new ArrayList<>();
        for (Map<String, List<RunnerAndConfigurationSettings>> folderMap : folderMaps) {
          result.add(new ActionGroup() {
            @Override
            public AnAction @NotNull [] getChildren(@Nullable AnActionEvent e) {
              List<AnAction> result = new ArrayList<>();
              for (Map.Entry<String, List<RunnerAndConfigurationSettings>> folderEntry : folderMap.entrySet()) {
                @NlsSafe String folderName = folderEntry.getKey();
                if (folderName == null) {
                  result.addAll(ContainerUtil.map(folderEntry.getValue(), o -> createFinalAction(project, o)));
                }
                else {
                  result.add(new ActionGroup() {
                    {
                      getTemplatePresentation().setPopupGroup(true);
                      getTemplatePresentation().setText(folderName);
                      getTemplatePresentation().setIcon(AllIcons.Nodes.Folder);
                    }

                    @Override
                    public AnAction @NotNull [] getChildren(@Nullable AnActionEvent e) {
                      return ContainerUtil.map(folderEntry.getValue(),
                                               o -> createFinalAction(project, o)).toArray(AnAction.EMPTY_ARRAY);
                    }
                  });
                }
              }
              return result.toArray(AnAction.EMPTY_ARRAY);
            }
          });
          result.add(Separator.getInstance());
        }
        return result.toArray(AnAction.EMPTY_ARRAY);
      }
    };
  }
private @NotNull AnAction createRunConfigurationFolderActions(
    @NotNull Project project,
    @NotNull Collection<Map<String, List<RunnerAndConfigurationSettings>>> folderMaps)