@ApiStatus.Experimental
  public static @NotNull ActionGroup forceHideDisabledChildren(@NotNull ActionGroup actionGroup) {
    final class Compact extends ActionGroupWrapper implements TransparentWrapper {

      Compact(@NotNull ActionGroup action) {
        super(action);
      }

      @Override
      @NotNull Presentation createTemplatePresentation() {
        Presentation presentation = super.createTemplatePresentation();
        presentation.putClientProperty(ActionUtil.HIDE_INVISIBLE_CHILDREN, true);
        return presentation;
      }
    }
    return actionGroup instanceof CompactActionGroup ? actionGroup : new Compact(actionGroup);
  }
@ApiStatus.Experimental
  public static @NotNull ActionGroup forceHideDisabledChildren(@NotNull ActionGroup actionGroup)