boolean (@NotNull Editor editor, @Nullable JavaLikeQuoteHandler quoteHandler, int offset) { if (offset > 0 && quoteHandler != null) { EditorHighlighter highlighter = editor.getHighlighter(); HighlighterIterator iterator = highlighter.createIterator(offset - 1); final IElementType type = iterator.getTokenType(); if (StringEscapesTokenTypes.STRING_LITERAL_ESCAPES.contains(type) || quoteHandler.isInsideLiteral(iterator)) { return true; } } return false; }