private ProgramModule getSelectedModule(Object contextObj) {
		if (contextObj instanceof ProgramNode) {
			ProgramNode node = (ProgramNode) contextObj;
			if (node.isModule() && node.getTree().getSelectionCount() == 1) {
				return node.getModule();
			}
		}
		return null;
	}
Plugin to sort Modules and Fragments within a selected Module.
Child Module folders are always name-sorted and placed
above child Fragments.  When sorting on address, the minimum
address for each fragment is used, while empty fragments are name-sorted
and placed at the bottom.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/module/ModuleSortPlugin.java