private ColorStyleAttributes getRefAttributes(CodeUnit cu, int opIndex, Program p) {

		ReferenceManager refMgr = p.getReferenceManager();
		Reference[] refs = refMgr.getReferencesFrom(cu.getMinAddress(), opIndex);
		for (Reference ref : refs) {

			// handle external references
			ColorAndStyle c = inspector.getColorAndStyle(p, ref);
			if (c != null) {
				ColorStyleAttributes newAttributes = new ColorStyleAttributes();
				newAttributes.colorAttribute = c.getColor();
				newAttributes.styleAttribute = c.getStyle();
				return newAttributes;
			}
		}

		Reference mr = refMgr.getPrimaryReferenceFrom(cu.getMinAddress(), opIndex);
		if (mr != null) {
			return getAddressAttributes(cu, mr.getToAddress(), opIndex, p);
		}
		return null;
	}
Constructor
@param name the name of the field.
@param model the model that the field belongs to.
@param hlProvider the HightlightProvider.
@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/OperandFieldHelper.java