@Override
	public ProgramLocation getProgramLocation(int row, int col, ListingField bf) {
		Object obj = bf.getProxy().getObject();
		if (!(obj instanceof Variable)) {
			return null;
		}

		ListingTextField field = (ListingTextField) getField(bf.getProxy(), 0);

		if (field != null) {
			RowColLocation loc = field.screenToDataLocation(row, col);
			int index = loc.row();

			Variable var = (Variable) obj;
			List<Reference> xrefs = new ArrayList<>();
			List<Reference> offcuts = new ArrayList<>();
			XReferenceUtils.getVariableRefs(var, xrefs, offcuts, maxXRefs);

			Reference ref = null;
			if (index < xrefs.size()) {
				ref = xrefs.get(index);
			}
			else if (index < xrefs.size() + offcuts.size()) {
				ref = offcuts.get(index - xrefs.size());
			}
			if (ref != null) {
				Address refAddr = ref.getFromAddress();
				return new VariableXRefFieldLocation(var.getProgram(), var, refAddr, index,
					loc.col());
			}
		}
		return null;
	}
Constructor
@param model the model that the field belongs to.
@param hlProvider the HighlightProvider.
@param displayOptions the Options for display properties.
@param fieldOptions the Options for field specific properties.
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/VariableXRefFieldFactory.java