@Override
	public AttributedString createAnnotatedString(AttributedString prototypeString, String[] text,
			Program program) throws AnnotationException {

		// if the text is not of adequate size, then show an error string
		if (text.length <= 1) {
			throw new AnnotationException(INVALID_SYMBOL_TEXT);
		}

		URL url = getURLForString(text[1]);

		if (url == null) {
			return new AttributedString("Invalid URL annotations - not a URL: " + text[1],
				Messages.ERROR, prototypeString.getFontMetrics(0), false, Messages.ERROR);
		}

		String displayText = url.toExternalForm();
		if (text.length > 2) { // URL and display text
			StringBuffer buffer = new StringBuffer();
			for (int i = 2; i < text.length; i++) {
				buffer.append(text[i]).append(" ");
			}
			buffer.deleteCharAt(buffer.length() - 1); // remove last space
			displayText = buffer.toString();
		}

		return new AttributedString(displayText, prototypeString.getColor(0),
			prototypeString.getFontMetrics(0), true, prototypeString.getColor(0));
	}
An annotated string handler that allows handles annotations that begin with
{@link #SUPPORTED_ANNOTATIONS}.  This class expects one or two strings following the annotation.
The first string will be treated as a Java {@link URL} and the optional second string will
be treated as display text.  If there is not display text, then the URL will be
displayed.
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/URLAnnotatedStringHandler.java