TextRange (@NotNull Editor editor, boolean isCamel, boolean handleQuoted) { int endOffset = editor.getCaretModel().getOffset(); int startOffset = getPreviousCaretStopOffset(editor, CaretStopPolicy.WORD_START, isCamel, handleQuoted); return TextRange.create(startOffset, endOffset); }