@Override
	public boolean handleMouseClick(String[] annotationParts, Navigatable sourceNavigatable,
			ServiceProvider serviceProvider) {

		String symbolText = annotationParts[1];
		Program program = sourceNavigatable.getProgram();
		List<Symbol> symbols = CommentUtils.getSymbols(symbolText, program);

		GoToService goToService = serviceProvider.getService(GoToService.class);

		// try going to the symbol first
		if (!symbols.isEmpty()) {
			Symbol s = symbols.get(0);
			return goToService.goTo(s.getProgramLocation());
		}

		// try going to the address
		Address address = program.getAddressFactory().getAddress(symbolText);
		if (address != null) {
			return goToService.goTo(sourceNavigatable, address);
		}

		Msg.showInfo(getClass(), null, "Invalid symbol text: " + symbolText,
			"Unable to locate a symbol for \"" + symbolText + "\"");

		return false;
	}
An annotated string handler that handles annotations that begin with
{@link #SUPPORTED_ANNOTATIONS}.  This class expects one string following the annotation
text that is the address or a symbol name.  The display text will be that of the symbol that
is referred to by the address or symbol name.
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/SymbolAnnotatedStringHandler.java