List<TextRange> (@NotNull PsiElement e, @NotNull CharSequence editorText, int cursorOffset, @NotNull Editor editor) { ASTNode node = BasicJavaAstTreeUtil.toNode(e); if (node == null) { return null; } ASTNode lParen = BasicJavaAstTreeUtil.getLParenth(node); ASTNode rParen = BasicJavaAstTreeUtil.getRParenth(node); if (lParen == null || rParen == null) return null; TextRange result = new TextRange(lParen.getTextRange().getEndOffset(), rParen.getTextRange().getStartOffset()); return result.containsOffset(cursorOffset) ? Collections.singletonList(result) : null; }