@Override
	public ListingField getField(ProxyObj<?> proxy, int varWidth) {
		Object obj = proxy.getObject();

		if (!enabled || !(obj instanceof CodeUnit)) {
			return null;
		}
		CodeUnit cu = (CodeUnit) obj;
		boolean invalidInstrProto = false;
		if (cu instanceof Instruction) {
			invalidInstrProto = (((Instruction) cu).getPrototype() instanceof InvalidPrototype);
		}

		boolean underline = underliningEnabled && (cu.getMnemonicReferences().length > 0);
		String mnemonic = codeUnitFormat.getMnemonicRepresentation(cu);
		Color c = MnemonicColors.NORMAL;
		if (invalidInstrProto) {
			c = BAD_PROTOTYPE_COLOR;
		}
		else if (cu instanceof Instruction) {
			Instruction instr = (Instruction) cu;
			if (instr.getFlowOverride() != FlowOverride.NONE || instr.isFallThroughOverridden() ||
				instr.isLengthOverridden()) {
				c = MnemonicColors.OVERRIDE;
			}
		}
		else {
			Data data = (Data) cu;
			if (data.isDefined() && data.getDataType().isNotYetDefined()) {
				c = Messages.ERROR;
			}
		}
		AttributedString as =
			new AttributedString(mnemonic, c, getMetrics(), underline, ListingColors.UNDERLINE);
		FieldElement text = new TextFieldElement(as, 0, 0);
		return ListingTextField.createSingleLineTextField(this, proxy, text, startX + varWidth,
			width, hlProvider);
	}
Returns the FactoryField for the given object at index index.
@param varWidth the amount of variable width spacing for any fields
before this one.
@param proxy the object whose properties should be displayed.
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/MnemonicFieldFactory.java