boolean isPrincipalGroupAction(@NotNull AnAction action) {
    // 1. check parent group
    ActionGroupInfo groupInfo = myAct2Parent.get(action);
    if (groupInfo != null && groupInfo.hasPrincipalParent()) {
      return true;
    }

    // 2. check action customizations descriptor
    Object descriptor = myAct2Descriptor.get(action);
    return descriptor instanceof TouchbarActionCustomizations && ((TouchbarActionCustomizations)descriptor).isPrincipal();
  }
boolean isPrincipalGroupAction(@NotNull AnAction action)