private void removeSelectedEquates(ListingActionContext context) {

		// First, get the equate for this change.
		Equate equate = getEquate(context);

		// Now get an iterator for the selected region (or the single address if that's
		// the case
		CodeUnitIterator iter = null;

		// Get the selected region.  If this is null, then we're just operating on a single address,
		// which is fine.
		ProgramSelection selection = context.getSelection();

		// Show a confirmation dialog to make sure the user knows they're going to be removing
		// all equates within the selection that match the selected equate.
		if (!selection.isEmpty()) {

			String title = "Remove Equate?";
			String msg = "This will remove all equates with the name " + "'" +
				equate.getDisplayName() + "' in the selection.";

			int option = OptionDialog.showOptionDialog(this.getTool().getActiveWindow(), title, msg,
				"Remove", OptionDialog.QUESTION_MESSAGE);

			if (option == OptionDialog.CANCEL_OPTION) {
				return;
			}
			iter = context.getProgram().getListing().getCodeUnits(context.getSelection(), true);
		}
		else {
			AddressSet addrSet = new AddressSet(context.getAddress());
			iter = context.getProgram().getListing().getCodeUnits(addrSet, false);
		}

		// Call the function that will create the background tasks to process the equate removal.
		removeEquateOverRange(context, equate, iter);
	}
Called in response to the user selecting the Apply Enum action from the popup menu. This
action will apply enum values to scalars in a selection.
@param context the action context
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/equate/EquatePlugin.java