/**
   * @param extensions the list of fill with actions
   * @param nodes of branch of the tree representation of the plan
   */
  private void fillExtensionActions(
      Set<ExtensionPlanAction> extensions, Collection<ExtensionPlanNode> nodes) {
    for (ExtensionPlanNode node : nodes) {
      fillExtensionActions(extensions, node.getChildren());

      extensions.add(node.getAction());
    }
  }
  protected ExtensionPlanNode getNode(ExtensionId id, Collection<ExtensionPlanNode> nodes) {
    for (ExtensionPlanNode node : nodes) {
      if (node.getAction().getExtension().getId().equals(id)) {
        return node;
      }
    }

    return null;
  }