boolean (@NotNull PsiElement element, @NotNull Editor editor, @NotNull PsiFile file, @NotNull DataContext context) { if (!super.isAvailableOnElementInEditorAndFile(element, editor, file, context)) return false; return getSelectedElementAndTextRange(editor, file) != null; }