private boolean goToNexToken(DecompilerPanel panel, TokenIterator it,
			TokenHighlights highlights) {

		while (it.hasNext()) {
			ClangToken nextToken = it.next();
			HighlightToken hlToken = highlights.get(nextToken);
			if (hlToken == null) {
				continue;
			}

			ClangToken token = hlToken.getToken();
			panel.goToToken(token);
			return true;
		}

		return false;
	}
An action to navigate to the next token highlighted by the user via the middle-mouse.
Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/NextHighlightedTokenAction.java