public boolean hasFullNodeMultiSelection() {

		ProgramDnDTree tree = getTree();
		if (tree == null) {
			return false;
		}
		TreePath[] paths = tree.getSelectionPaths();
		if (paths == null) {
			return false;
		}

		DefaultTreeModel treeModel = (DefaultTreeModel) tree.getModel();
		ProgramNode root = (ProgramNode) treeModel.getRoot();
		for (TreePath path : paths) {
			ProgramNode node = (ProgramNode) path.getLastPathComponent();

			if (node == root) {
				return false;
			}

			if (hasMixedChildSelection(node, paths)) {
				return false;
			}
		}

		return true;
	}
Returns true if the selected paths: 1) do not contain the root node and 2) for each folder,
either all children are selected or no children are selected.

@return true if the criteria above are met
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/programtree/ProgramTreeActionContext.java