private void renameEquate(ListingActionContext context, Enum enoom, Equate oldEquate,
			String newEquateName, CodeUnitIterator iter) {

		// First do a sanity check to make sure we're not trying to change to a duplicate
		// name.
		String oldEquateName = oldEquate.getName();
		if (oldEquateName.equals(newEquateName)) {
			return;
		}

		// Set up a background task that we'll populate with all the rename tasks we need
		// to perform.
		CompoundBackgroundCommand<Program> bckCmd =
			new CompoundBackgroundCommand<>("Rename Equates in Selection", false, true);

		// Now loop over all the code units and search for matching scalars...
		while (iter.hasNext()) {
			CodeUnit cu = iter.next();
			renameEquateForCodeUnit(context, enoom, oldEquate, newEquateName, oldEquateName, bckCmd,
				cu);
		}

		// Finally, execute all the rename tasks.
		tool.executeBackgroundCommand(bckCmd, context.getProgram());
	}
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