private boolean generateFormattedPlateComment(List<FieldElement> elements, String[] comments,
			List<String> offcutComments, Program p) {
		if (offcutComments.isEmpty() && CollectionUtils.isBlank(comments)) {
			return false;
		}

		AttributedString prototype =
			new AttributedString(EMPTY_STRING, CommentColors.PLATE, getMetrics());

		AttributedString asteriscs = getStarsString();
		int row = elements.size();

		// add top border
		elements.add(new TextFieldElement(asteriscs, row++, 0));

		// add and word wrap the comments
		List<FieldElement> commentsList = new ArrayList<>();
		for (String c : comments) {
			commentsList.add(CommentUtils.parseTextForAnnotations(c, p, prototype, row++));
		}
		for (String offcut : offcutComments) {
			AttributedString as =
				new AttributedString(offcut, CommentColors.OFFCUT, getMetrics(style), false, null);
			commentsList.add(new TextFieldElement(as, commentsList.size(), 0));
		}

		if (isWordWrap) {
			int spaceWidth = getMetrics().charWidth(' ');
			int starWidth = getMetrics().charWidth('*');
			int charWidth = Math.max(spaceWidth, starWidth);
			int paddingWidth = CONTENT_PADDING * charWidth;
			commentsList = FieldUtils.wrap(commentsList, Math.max(width - paddingWidth, charWidth));
		}

		boolean isClipped = addSideBorders(commentsList);
		elements.addAll(commentsList);

		// add bottom border
		elements.add(new TextFieldElement(asteriscs, row++, 0));

		return isClipped;
	}
Constructor
@param model the model that the field belongs to.
@param hlProvider the HightLightStringProvider.
@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/PlateFieldFactory.java