@Override
	public FieldLocation getFieldLocation(ListingField listingField, BigInteger index, int fieldNum,
			ProgramLocation programLoc) {

		// Only handle this if it's the right kind of location object.
		if (!(programLoc instanceof MemoryBlockStartFieldLocation)) {
			return null;
		}
		MemoryBlockStartFieldLocation blockLocation = (MemoryBlockStartFieldLocation) programLoc;

		Object obj = listingField.getProxy().getObject();
		if (obj instanceof CodeUnit) {
			CodeUnit cu = (CodeUnit) obj;

			MemoryBlock block = cu.getMemory().getBlock(cu.getAddress());
			if (block == null) {
				return null;
			}

			// If the code unit does NOT rest at the beginning of a memory block, no need
			// to handle this.
			if (cu.getMinAddress().equals(block.getStart())) {

				if (listingField instanceof ListingTextField) {
					ListingTextField listingTextField = (ListingTextField) listingField;

					RowColLocation location = listingTextField.dataToScreenLocation(
						blockLocation.getRow(), blockLocation.getCharOffset());

					return new FieldLocation(index, fieldNum, location.row(), location.col());
				}
			}
		}

		return null;
	}
Overridden to ensure that we only place block comments on the first {@link CodeUnit} of 
the block.

@see ghidra.app.util.viewer.field.FieldFactory#getFieldLocation(ghidra.app.util.viewer.field.ListingField, BigInteger, int, ghidra.program.util.ProgramLocation)
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/MemoryBlockStartFieldFactory.java