private void addAllToSortedList(@NotNull Function<@NotNull AnAction, @Nullable String> actionToId) {
    outer:
    while (!myPendingActions.isEmpty()) {
      for (int i = 0; i < myPendingActions.size(); i++) {
        AnAction pendingAction = myPendingActions.get(i);
        Constraints constraints = myConstraints.get(pendingAction);
        if (constraints != null && addToSortedList(pendingAction, constraints, actionToId)) {
          myPendingActions.remove(i);
          continue outer;
        }
      }
      break;
    }
  }
private void addAllToSortedList(@NotNull Function<@NotNull AnAction, @Nullable String> actionToId)