List<TextRange> (@NotNull PsiElement e, @NotNull CharSequence editorText, int cursorOffset, @NotNull Editor editor) { List<TextRange> result = new ArrayList<>(); ASTNode node = BasicJavaAstTreeUtil.toNode(e); if (node == null) { return null; } final ASTNode parent = node.getTreeParent(); if (BasicJavaAstTreeUtil.is(parent, BASIC_TRY_STATEMENT)) { final ASTNode finallyBlock = BasicJavaAstTreeUtil.getFinallyBlock(parent); if (finallyBlock != null) { result.add(new TextRange(e.getTextRange().getStartOffset(), finallyBlock.getTextRange().getEndOffset())); } } return result; }