protected static String generateTypeName(DataType dt, Color color, boolean trim) {

		String[] pointerArraySplit = splitPointerArray(dt);
		if (pointerArraySplit != null) {
			DataType baseDt = DataTypeUtils.getNamedBaseDataType(dt);
			if (baseDt != null && canLinkDataType(baseDt)) {
				dt = baseDt; // ok to split for link
			}
			else {
				pointerArraySplit = null; // do not split/link
			}
		}

		String type = dt.getName();
		if (trim) {
			type = truncateAsNecessary(type);
		}
		type = friendlyEncodeHTML(type);

		if (pointerArraySplit == null && !canLinkDataType(dt)) {
			type = wrapStringInColor(type, color);
			return type;
		}

		//
		// Markup the name with info for later hyperlink capability, as needed by the client
		//
		DataTypeUrl url = new DataTypeUrl(dt);
		String wrapped = HTMLUtilities.wrapWithLinkPlaceholder(type, url.toString());
		if (pointerArraySplit != null) {
			wrapped += friendlyEncodeHTML(pointerArraySplit[1], false);
		}
		wrapped = wrapStringInColor(wrapped, color);
		return wrapped;
	}
Compares this representation and the given representation creates a diff string for both
representations.

@param otherRepresentation the other representation to diff against.
@return An array of two strings: the first is this object's diff value, the second is the
        given objects diff value.
Ghidra/Features/Base/src/main/java/ghidra/app/util/html/HTMLDataTypeRepresentation.java