@Override
	public void actionPerformed(ActionContext context) {
		if (!isEnabledForContext(context)) {
			return;
		}

		// If lots of components, verify the user really wants to unpackage.
		int currentRowIndex =
			model.getSelection().getFieldRange(0).getStart().getIndex().intValue();

		int subComps = model.getNumSubComponents(currentRowIndex);
		if (subComps > 1000) {
			String question = "Are you sure you want to unpackage " + subComps + " components?";
			String title = "Continue with unpackage?";
			int response =
				OptionDialog.showYesNoDialog(model.getProvider().getComponent(), title, question);
			if (response != OptionDialog.YES_OPTION) { // User did not select yes.
				return;
			}
		}

		TaskLauncher.launchModal("Unpackaging Component",
			monitor -> doUnpackage(currentRowIndex, monitor));

		requestTableFocus();
	}
Action for use in the composite data type editor.
This action has help associated with it.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/compositeeditor/UnpackageAction.java