@Override
	protected void actionPerformed(ProgramLocationActionContext context) {
		ListingModel model = getModel();
		ProgramSelection selection = context.getSelection();
		if (selection != null && !selection.isEmpty()) {
			TaskLauncher.launchModal("Collapse Data In Selection",
				monitor -> model.closeAllData(selection, monitor));
			return;
		}

		ProgramLocation location = context.getLocation();
		Data data = getTopLevelComponentData(location);
		TaskLauncher.launchModal("Collapse Data", monitor -> model.closeAllData(data, monitor));
	}
Action for recursively collapsing an expandable data element in the listing.  This action
can be invoked on an expandable data element or any sub element and will close the
outer most data element and all child elements of that structure.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/codebrowser/actions/CollapseAllDataAction.java