private static IntentionAction findNonDelegatedAction(IntentionAction action) {
    while (action instanceof IntentionActionDelegate && !(action instanceof PriorityAction)) {
      action = ((IntentionActionDelegate)action).getDelegate();
    }
    return action;
  }
private static IntentionAction findNonDelegatedAction(IntentionAction action)