private boolean hasMixedChildSelection(ProgramNode node, TreePath[] selectedPaths) {

		if (!node.getAllowsChildren()) {
			return false;
		}

		int nchild = node.getChildCount();
		int numberSelected = 0;

		for (int i = 0; i < nchild; i++) {
			ProgramNode child = (ProgramNode) node.getChildAt(i);
			TreePath childPath = child.getTreePath();

			// see if childPath is in selected list
			for (TreePath element : selectedPaths) {
				if (childPath.equals(element)) {
					++numberSelected;
					break;
				}
			}
		}
		if (numberSelected == 0 || numberSelected == nchild) {
			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