private boolean allPathsCollapsed(ProgramTreeActionContext context) {

		if (!context.hasSingleNodeSelection()) {
			return false;
		}

		ProgramDnDTree tree = context.getTree();
		TreePath[] paths = context.getSelectionPaths();
		TreePath path = paths[0];
		return allPathsCollapsed(tree, path);
	}
Create a TreeTransferable object from the given paths, and
use it set the clipboard contents.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/programtree/ProgramTreeActionManager.java