private int addElementsForOperand(Instruction inst, List<OperandFieldElement> elements,
			int opIndex, OperandRepresentationList opRepList, int characterOffset) {
		int subOpIndex = 0;
		if (opRepList == null || opRepList.hasError()) {
			AttributedString as =
				new AttributedString(opRepList != null ? opRepList.toString() : "<UNSUPPORTED>",
					badRefAttributes.colorAttribute, getMetrics(badRefAttributes.styleAttribute),
					false, ListingColors.UNDERLINE);
			elements.add(new OperandFieldElement(as, opIndex, subOpIndex, characterOffset));
			characterOffset += as.length();
		}
		else {
			boolean underline = isUnderlined(inst, opIndex, opRepList.isPrimaryReferenceHidden());
			for (; subOpIndex < opRepList.size(); subOpIndex++) {
				characterOffset = addElement(inst, elements, opRepList.get(subOpIndex), underline,
					opIndex, subOpIndex, characterOffset);
			}
		}
		//  add in any separator after this operand
		return createSeparatorFieldElement(inst, opIndex + 1, opIndex, subOpIndex - 1,
			characterOffset, elements);
	}
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