boolean (TreePath path, PackagingElementNode<?> node, LayoutTree tree) { while (path != null) { final SimpleNode pathNode = tree.getNodeFor(path); if (pathNode == node) { return true; } path = path.getParentPath(); } return false; }