private static LocationDescriptor createOperandLocationDescriptor(
			OperandFieldLocation location) {

		// this is the 'to' address
		Address refAddress = getReferenceAddress(location);
		if (refAddress == null) {
			//
			// No reference address for this location.  Try to create a generic data descriptor.
			//
			GenericDataTypeLocationDescriptor descriptor =
				createGenericDataTypeLocationDescriptor(location);
			return descriptor;
		}

		Address operandAddress = location.getAddress();
		int operandIndex = location.getOperandIndex();
		Program program = location.getProgram();
		ReferenceManager referenceManager = program.getReferenceManager();
		Reference reference =
			referenceManager.getReference(operandAddress, refAddress, operandIndex);
		if (reference == null) {

			// Prefer using the reference, for consistency.  Without that, the VariableOffset
			// object contains markup and type information we can use.  Having a VariableOffset
			// without a reference occurs when a register variable reference is inferred during
			// instruction operand formatting.
			VariableOffset variableOffset = location.getVariableOffset();
			return createGenericDataTypeLocationDescriptor(program, variableOffset);
		}

		// note: not sure why we are ignoring external references.  It seems like that is a thing
		// you may want to find refs to.  If you figure it out, update this comment.
		// if (reference.isExternalReference()) {
		//	  return null;
		// }

		//
		// Using the reference, we can check for the 'Extended Markup' style reference, such as:
		// 		instruction ...=>Foo.bar.baz
		//                     -------------
		// Note: these references are to labels (not sure why the reference isn't to a data
		//       symbol)
		//

		// check to see if the reference is to a structure member...
		LocationDescriptor dataMemberDescriptor =
			createDataMemberLocationDescriptor(location, refAddress);
		if (dataMemberDescriptor != null) {
			return dataMemberDescriptor;
		}

		// ...how about a function member (variable/param)?
		LocationDescriptor functionMemberDescriptor =
			createFunctionMemberLocationDescriptor(location, reference, operandAddress);
		if (functionMemberDescriptor != null) {
			return functionMemberDescriptor;
		}

		return new OperandLocationDescriptor(location, program);
	}
Gets the data that is contains the given address.
This is in contrast to {@link Listing#getDataContaining(Address)}, which returns
the outer-most data for an address.

@param addr the address potentially contained by some data
@param program the program
@return the data containing the address; null if no data contains the address
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/navigation/locationreferences/ReferenceUtils.java