boolean hasAncestorsInView(ProgramNode node) {

		TreePath path = node.getTreePath();

		for (TreePath viewPath : viewList) {
			if (viewPath.isDescendant(path) && !viewPath.equals(path)) {
				return true;
			}
		}
		return false;
	}
Return true if the given node has an ancestor in the view.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/programtree/ProgramDnDTree.java