void setGroupSelection(GroupPath[] groupPaths) {
		// sort the groups
		ArrayList<TreePath> list = new ArrayList<>(groupPaths.length);
		for (GroupPath groupPath : groupPaths) {
			TreePath p = getTreePathFromGroup(groupPath);
			if (p != null) {
				list.add(p);
			}
		}
		TreePath[] paths = new TreePath[list.size()];

		setSelectionPaths(list.toArray(paths));
		if (paths.length > 0) {
			this.scrollPathToVisible(paths[0]);
		}
	}
Change the tree selection for the given group paths
@param groupPaths group paths to set to the selection
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/programtree/ProgramDnDTree.java