void expandNode(ProgramNode node) {

		expandPath(node.getTreePath());

		int nchild = node.getChildCount();
		for (int i = 0; i < nchild; i++) {

			ProgramNode child = (ProgramNode) node.getChildAt(i);

			if (child.equals(node) || child.isLeaf()) {
				continue;
			}
			expandNode(child);
		}

	}
Build a list of ProgramNodes in preorder.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/programtree/ProgramDnDTree.java