@Override
	public void fieldLocationChanged(FieldLocation location, Field field, EventTrigger trigger) {

		if (!(field instanceof ClangTextField)) {
			return;
		}

		// Get the token for the location so we can highlight its token bin.
		// Also we will use it when notifying the other panel to highlight.
		ClangToken tok = ((ClangTextField) field).getToken(location);
		if (SystemUtilities.isEqual(locationToken, tok)) {
			return; // Current location's token hasn't changed.
		}

		// Undo any highlight of the previous matching tokenBin.
		if (matchingTokenBin != null && matchingTokenBin.getMatch() != null) {
			clearTokenBinHighlight(matchingTokenBin.getMatch());
			matchingTokenBin = null;
		}

		clearCurrentLocationHighlight();

		clearPrimaryHighlights();
		addPrimaryHighlight(tok, defaultHighlightColor);
		if (tok instanceof ClangSyntaxToken) {
			List<ClangToken> tokens = addPrimaryHighlightToTokensForParenthesis(
				(ClangSyntaxToken) tok, defaultParenColor);
			reHighlightDiffs(tokens);
			addPrimaryHighlightToTokensForBrace((ClangSyntaxToken) tok, defaultParenColor);
		}

		TokenBin tokenBin = null;
		if (tok != null) {
			Color highlightColor = comparisonOptions.getFocusedTokenIneligibleHighlightColor(); // Don't know
			if (highlightBins != null) {
				tokenBin = TokenBin.getBinContainingToken(highlightBins, tok);
				if (tokenBin != null) {
					if (tokenBin.getMatch() != null) {
						highlightColor = comparisonOptions.getFocusedTokenMatchHighlightColor();
					}
					else if (tokenBin.getMatch() == null) {
						highlightColor = comparisonOptions.getFocusedTokenUnmatchedHighlightColor();
					}
					else {
						// All the tokens that didn't fall into the "has a match" or "no match"
						// categories above are in a single token bin.
						// We don't want all these highlighted at the same time, so set the
						// tokenBin to null. By doing this, only the current token gets highlighted.
						tokenBin = null;
					}
				}
			}
			locationToken = tok;
			locationTokenBin = tokenBin;
			if (tokenBin == null) {
				addPrimaryHighlight(tok, highlightColor);
			}
			else {
				addTokenBinHighlight(tokenBin, highlightColor);
			}
		}

		// Notify other decompiler panel highlight controller we have a new location token.
		for (DiffClangHighlightListener listener : listenerList) {
			listener.locationTokenChanged(tok, tokenBin);
		}
	}
Class to handle Function Difference highlights for a decompiled function.
Ghidra/Features/CodeCompare/src/main/java/ghidra/features/codecompare/decompile/DiffClangHighlightController.java