@Override
  public AnAction @NotNull [] getChildren(@Nullable AnActionEvent e) {
    List<AnAction> result = new ArrayList<>();
    for (AnAction action : super.getChildren(e)) {
      if (myExcludes.contains(action)) {
        continue;
      }
      if (action instanceof ActionGroup) {
        result.add(new ExcludingActionGroup((ActionGroup)action, myExcludes));
      }
      else {
        result.add(action);
      }
    }
    return result.toArray(AnAction.EMPTY_ARRAY);
  }
@Override
  public AnAction @NotNull [] getChildren(@Nullable AnActionEvent e)