public static int getPriorityWeight(@NotNull IntentionActionWithTextCaching action) {
    IntentionAction nonDelegatedAction = findNonDelegatedAction(action.getAction());
    Priority priority = nonDelegatedAction instanceof PriorityAction ? ((PriorityAction)nonDelegatedAction).getPriority() : null;
    return getPriorityWeight(priority);
  }
public static int getPriorityWeight(@NotNull IntentionActionWithTextCaching action)