@Override
	public ProgramLocation getProgramLocation(int row, int col, ListingField bf) {
		ProxyObj<?> proxy = bf.getProxy();
		if (proxy instanceof VariableProxy) {

			VariableProxy variableProxy = (VariableProxy) proxy;
			Variable sv = variableProxy.getObject();
			ListingTextField btf = (ListingTextField) bf;

			String cmt = sv.getComment();

			// Loop through each line of the comment
			// and store the length of the line.
			// Additionally, we need to store the length of
			// the delimiter between the lines. Otherwise,
			// the index in the ProgramLocation will be off.
			//
			int pos = 0;
			int tmp = 0;
			for (int i = 0; i <= row; ++i) {
				String str = btf.getFieldElement(i, 0).getText();
				int len = 0;
				if (i < row) {
					len = str.length();
				}
				else {
					len = col;
				}
				pos += len;

				int index = cmt.indexOf(str, tmp);
				if (tmp != 0) {
					pos += (index - tmp);
				}
				tmp = index + len;
			}

			return new VariableCommentFieldLocation(sv.getProgram(),
				variableProxy.getLocationAddress(), sv, pos);
		}
		return null;
	}
@see ghidra.app.util.viewer.field.FieldFactory#getProgramLocation(int,
     int, ghidra.app.util.viewer.field.ListingField)
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/VariableCommentFieldFactory.java