private static void validateAutoCloseActions(@NotNull ActionGroup actionGroup, @NotNull Collection<AnAction> autoCloseActions) {
    Collection<AnAction> actionsFromGroup = new HashSet<>();
    Helpers.collectLeafActions(actionGroup, actionsFromGroup);
    if (!actionsFromGroup.containsAll(autoCloseActions)) {
      autoCloseActions.removeIf(a -> !actionsFromGroup.contains(a));
    }
  }
private static void validateAutoCloseActions(@NotNull ActionGroup actionGroup, @NotNull Collection<AnAction> autoCloseActions)