List<TextRange> (@NotNull PsiElement e, @NotNull CharSequence editorText, int cursorOffset, @NotNull Editor editor) { List<TextRange> result = super.select(e, editorText, cursorOffset, editor); if (e instanceof GrCodeBlock block) { int startOffset = findOpeningBrace(block); int endOffset = findClosingBrace(block, startOffset); TextRange range = new TextRange(startOffset, endOffset); result.addAll(expandToWholeLine(editorText, range)); } return result; }