private boolean isDataMatch(Data data, ListingActionContext context, Equate equate) {

		if (!data.isDefined()) {
			return false;
		}

		// First make sure the data is defined - otherwise we don't know what to do with it.
		Object val = data.getValue();
		if (val == null || !(val instanceof Scalar)) {
			return false;
		}

		Scalar scalar = (Scalar) val;
		int opIndex = getOperandIndex(context);

		// Check to see if the scalar value is equal to the value we are searching for, AND
		// that it has the same equate name we're trying to rename.
		Program program = context.getProgram();
		EquateTable equateTable = program.getEquateTable();
		Address address = data.getAddress();
		List<Equate> equates = equateTable.getEquates(address, opIndex);
		for (Equate eq : equates) {
			if (eq.getName().equals(equate.getName()) && isEquateEqualScalar(equate, scalar)) {
				return true;
			}
		}

		return false;
	}
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