private boolean isMergeEnabled(ProgramTreeActionContext context) {
		TreePath[] paths = context.getSelectionPaths();
		if (paths == null) {
			return false;
		}

		for (TreePath element : paths) {
			ProgramNode node = (ProgramNode) element.getLastPathComponent();
			if (node.isModule()) {
				return true;
			}
		}
		return false;
	}
Update the view list if the given path is an ancestor of any of the paths currently 
in the view; remove the descendant and add the ancestor path. 
@param tree the tree
@param path path the check against the view list
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/programtree/ProgramTreeActionManager.java