private void removeEquateForCodeUnit(ListingActionContext context, Equate equate,
			CompoundBackgroundCommand<Program> bckCmd, CodeUnit cu) {
		// A code unit can be either an instruction or data; we need to handle each
		// separately.
		if (cu instanceof Instruction) {
			Instruction instr = (Instruction) cu;

			Program program = context.getProgram();
			List<Integer> opIndexes = getInstructionMatches(program, instr, equate);
			for (Integer opIndexe : opIndexes) {
				bckCmd.add(new ClearEquateCmd(equate.getName(), instr.getAddress(), opIndexe));
			}
		}
		else if (cu instanceof Data) {
			Data data = (Data) cu;

			if (isDataMatch(data, context, equate)) {
				bckCmd.add(new ClearEquateCmd(equate.getName(), data.getAddress(),
					getOperandIndex(context)));
			}
		}
	}
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