public boolean isAncestorOrSelf(NodeDescriptor<?> selectedNode) {
    NodeDescriptor<?> node = selectedNode;
    while (node != null) {
      if (equals(node)) return true;
      node = node.getParentDescriptor();
    }
    return false;
  }
public boolean isAncestorOrSelf(NodeDescriptor<?> selectedNode)