void (@NotNull Editor editor) { LexerEditorHighlighter highlighter = (LexerEditorHighlighter)editor.getHighlighter(); CharSequence text = editor.getDocument().getImmutableCharSequence(); String incremental = dumpHighlighterTokens(highlighter, text); highlighter.setText(""); highlighter.setText(text); String full = dumpHighlighterTokens(highlighter, text); if (!full.equals(incremental)) { Assert.assertEquals("Full lexer highlighter:\n" + full, "Incremental lexer highlighter:\n" + incremental); } }