protected TreePath[] adjustSelectionPaths(TreePath[] paths) {
		HashSet<GTreeNode> set = new HashSet<>();
		for (TreePath treePath : paths) {
			set.add((GTreeNode) treePath.getLastPathComponent());
		}
		HashSet<GTreeNode> removeSet = new HashSet<>();
		for (GTreeNode node : set) {
			if (anyParentsInSet(set, node)) {
				removeSet.add(node);
			}
		}
		set.removeAll(removeSet);
		TreePath[] newPaths = new TreePath[set.size()];
		int index = 0;
		for (GTreeNode node : set) {
			newPaths[index++] = node.getTreePath();
		}
		return newPaths;
	}
Removes any path that is a descendant of a path in the selection.
@param paths selected paths
@return paths that do not have any descendants
Ghidra/Framework/Project/src/main/java/ghidra/framework/main/projectdata/actions/ProjectDataCopyCutBaseAction.java