private boolean checkMemReferences(CodeUnit codeUnit, ServiceProvider serviceProvider) {

		if (codeUnit == null) {
			return false;
		}

		Reference[] refs = codeUnit.getMnemonicReferences();
		if (refs.length > 1) {
			List<OutgoingReferenceEndpoint> outgoingReferences = new ArrayList<>();
			for (Reference reference : refs) {
				outgoingReferences.add(new OutgoingReferenceEndpoint(reference,
					ReferenceUtils.isOffcut(codeUnit.getProgram(), reference.getToAddress())));
			}

			IncomingReferencesTableModel model =
				new IncomingReferencesTableModel("Mnemonic", serviceProvider,
					codeUnit.getProgram(), outgoingReferences, null);

			TableService service = serviceProvider.getService(TableService.class);
			if (service != null) {
				Navigatable nav = NavigationUtils.getActiveNavigatable();
				service.showTable("Mnemonic References", "Mnemonic", model, "References", nav);
				return true;
			}
		}
		else if (refs.length == 1) {
			SymbolTable st = codeUnit.getProgram().getSymbolTable();
			Symbol symbol = st.getSymbol(refs[0]);

			ProgramLocation loc = null;
			if (symbol != null) {
				loc = symbol.getProgramLocation();
			}
			else {
				loc = new AddressFieldLocation(codeUnit.getProgram(), refs[0].getToAddress());
			}

			GoToService goToService = serviceProvider.getService(GoToService.class);
			if (goToService != null) {
				return goToService.goTo(loc);
			}
		}

		return false;
	}
A handler to process {@link MnemonicFieldLocation} clicks.
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/MnemonicFieldMouseHandler.java