private List<Integer> getInstructionMatches(Program program, Instruction instruction,
			Equate equate) {

		// Return list.
		List<Integer> matches = new ArrayList<>();

		// Find out how many operands are listed.
		int numOperands = instruction.getNumOperands();

		for (int opIndex = 0; opIndex <= numOperands; opIndex++) {

			Object[] opObjs = instruction.getOpObjects(opIndex);
			for (Object opObj : opObjs) {

				// Checks to see if the current value is a scalar value
				if (opObj instanceof Scalar) {
					Scalar scalar = (Scalar) opObj;

					// Checks 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.
					EquateTable equateTable = program.getEquateTable();
					Address address = instruction.getAddress();
					List<Equate> equates = equateTable.getEquates(address, opIndex);
					for (Equate eq : equates) {
						if (eq.getName().equals(equate.getName()) &&
							isEquateEqualScalar(equate, scalar)) {
							matches.add(opIndex);
						}
					}
				}
			}
		}

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