private void moduleSortCallback(int sortType, Object contextObj) {
		ProgramModule module = getSelectedModule(contextObj);
		if (module == null) {
			return;
		}

		//@formatter:off
		TaskBuilder.withTask(new SortTask(module, sortType))
			.setStatusTextAlignment(SwingConstants.LEADING)
			.launchModal()
			;
		//@formatter:on		
	}
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