private void maybeCreateEquate(Program program, Instruction instruction) {
		for (int opIndex = 0; opIndex < instruction.getNumOperands(); opIndex++) {
			Object[] opObjects = instruction.getOpObjects(opIndex);
			for (Object opObject : opObjects) {
				if (!(opObject instanceof Scalar)) {
					continue;
				}

				Scalar scalar = (Scalar) opObject;
				if (scalar.getValue() != targetScalarValue) {
					continue;
				}

				createEquate(program, instruction, opIndex, scalar);
			}
		}
	}
@param scalar user defined scalar to search for in program
@param iter the range of code units for which to maybe create equates
@param enoom the enum to use for formatting the equate name
@param overwriteExisting true to rename existing equates
@param context the action context
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/equate/CreateEquateCmd.java