private ListingTextField getTextField(String[] comments, String[] autoComment,
			List<String> offcutComments, ProxyObj<?> proxy, int xStart,
			boolean useLinesAfterBlock) {

		if (comments == null) {
			comments = EMPTY_STRING_ARRAY;
		}
		if (autoComment == null) {
			autoComment = EMPTY_STRING_ARRAY;
		}
		// TODO: convoluted logic since str will not be user comment if useLinesAfterBlock is true
		int nLinesAutoComment =
			((comments.length == 0 && !useLinesAfterBlock) || alwaysShowAutomatic)
					? autoComment.length
					: 0;
		if (!useLinesAfterBlock && comments.length == 0 && nLinesAutoComment == 0 &&
			offcutComments.isEmpty()) {
			return null;
		}

		CodeUnit cu = (CodeUnit) proxy.getObject();
		Program program = cu.getProgram();
		AttributedString prototypeString =
			new AttributedString("prototype", CommentColors.POST, getMetrics());
		List<FieldElement> fields = new ArrayList<>();
		for (int i = 0; i < nLinesAutoComment; i++) {
			AttributedString as = new AttributedString(autoComment[i], CommentColors.AUTO,
				getMetrics(automaticCommentStyle), false, null);
			fields.add(new TextFieldElement(as, i, 0));
		}
		for (String comment : comments) {
			fields.add(CommentUtils.parseTextForAnnotations(comment, program, prototypeString,
				fields.size()));
		}
		for (String offcutComment : offcutComments) {
			AttributedString as = new AttributedString(offcutComment, CommentColors.OFFCUT,
				getMetrics(style), false, null);
			fields.add(new TextFieldElement(as, fields.size(), 0));
		}
		if (isWordWrap) {
			fields = FieldUtils.wrap(fields, width);
		}
		if (useLinesAfterBlock) {
			for (int i = 0; i < nLinesAfterBlocks; i++) {
				AttributedString as = new AttributedString("", CommentColors.POST, getMetrics());
				fields.add(new TextFieldElement(as, fields.size(), 0));
			}
		}

		return ListingTextField.createMultilineTextField(this, proxy, fields, xStart, width,
			hlProvider);
	}
Adjust the Automatic Comment display options if the associated options changed.
@param options the Display Options object that changed.
@param optionName the name of the property that changed.
@param oldValue the old value of the property.
@param newValue the new value of the property.
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/PostCommentFieldFactory.java