private FieldLocation getFieldLocation(Address address, ProgramLocation location,
			boolean useDefaultLocation) {

		BigInteger index = addressToIndexMap.getIndex(address);
		Layout layout = getLayout(index);
		if (layout == null) {
			index = getLayoutWithinCodeUnit(address);
			layout = getLayout(index);
		}

		if (layout == null) {
			return null;
		}

		if (layout.getNumFields() == 0) {
			return null;
		}

		int defaultFieldIndex = 0;
		for (int i = 0; i < layout.getNumFields(); i++) {
			Field f = layout.getField(i);
			if (!(f instanceof ListingField field)) {
				continue;
			}
			FieldFactory factory = field.getFieldFactory();
			if (factory.getClass() == defaultFieldFactoryClass) {
				defaultFieldIndex = i;
			}

			// this method only returns a location if all information matches.
			FieldLocation floc = factory.getFieldLocation(field, index, i, location);
			if (floc != null) {
				return floc;
			}
		}

		// if no exact match and using defaults is on, just return a basic location for the
		// default field
		if (useDefaultLocation) {
			return new FieldLocation(index, defaultFieldIndex, 0, 0);
		}
		return null;
	}
Attempts to find a field location for the given address from the given program location
@param address the address to try and get a layout for.
@param location the location contains other information needed to generate a field
location
@param useDefaultLocation if true, will return a generic location for this address
if no field has a specific match.  Otherwise, will return null if no fields have
an exact match.
@return a field location for the given address.
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/listingpanel/ListingModelAdapter.java