private void setAncestorList(Group group, LinkedList<String> list,
			ArrayList<LinkedList<String>> pathNameList) {
		ProgramModule root = program.getListing().getRootModule(group.getTreeName());
		ProgramModule[] parents = group.getParents();
		if (parents != null && parents.length > 0) {
			for (ProgramModule parent : parents) {
				LinkedList<String> myList = new LinkedList<>(list);
				myList.addFirst(parent.getName());
				if (parent == root) {
					pathNameList.add(myList);
				}
				else {
					setAncestorList(parent, myList, pathNameList);
				}
			}
		}
	}
Provides a view of the program tree.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/programtree/TreeViewProvider.java