String () { Editor editor = myFixture.getEditor(); EditorHighlighter highlighter = editor.getHighlighter(); StringBuilder result = new StringBuilder(); for (HighlighterIterator it = highlighter.createIterator(0); !it.atEnd(); it.advance()) { IElementType type = it.getTokenType(); result.append(type.toString()); result.append('\n'); } return result.toString(); }