private void selectAllChildren(DataTree tree, GTreeNode node) {
		List<TreePath> paths = new ArrayList<TreePath>();

		tree.runTask(monitor -> {

			GTreeExpandAllTask task = new GTreeExpandAllTask(tree, node);
			task.run(monitor);

			getAllTreePaths(node, paths);
			tree.setSelectionPaths(paths);
		});

	}
Select all descendants for the first selected node; called from an action
listener on a menu.
Ghidra/Framework/Project/src/main/java/ghidra/framework/main/projectdata/actions/ProjectDataSelectAction.java