private void maybeCreateEquate(Program program, Data data) {

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

		Object val = data.getValue();
		if (!(val instanceof Scalar)) {
			return;
		}

		Scalar scalar = (Scalar) val;
		if (scalar.getValue() != targetScalarValue) {
			return;
		}

		int opIndex = getOperandIndex();
		createEquate(program, data, 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