private GTreeNode[] getPathToRoot(GTreeNode node, int depth) {
		GTreeNode[] returnNodes;

		/* Check for null, in case someone passed in a null node, or
		   they passed in an element that isn't rooted at root. */
		if (node == null || node instanceof GTreeRootParentNode) {
			if (depth == 0) {
				return null;
			}
			returnNodes = new GTreeNode[depth];
		}
		else {
			depth++;
			returnNodes = getPathToRoot(node.getParent(), depth);
			returnNodes[returnNodes.length - depth] = node;
		}
		return returnNodes;
	}
Convenience method determining if this node is expanded in a tree. If the node is not
currently attached to a visible tree, then this call returns false

@return true if the node is expanded in a currently visible tree.
Ghidra/Framework/Docking/src/main/java/docking/widgets/tree/GTreeNode.java