boolean (int offset, Editor editor, KtToken tokenType) { HighlighterIterator iterator = editor.getHighlighter().createIterator(offset); if (iterator.atEnd()) { return false; } if (iterator.getStart() > 0) { iterator.retreat(); } if (iterator.getTokenType() == KtTokens.WHITE_SPACE && iterator.getStart() > 0) { iterator.retreat(); } return iterator.getTokenType() == tokenType; }