boolean (@NotNull Project project, Editor editor, PsiFile file) { if (!checkFile(file)) return false; final PsiElement element = editor == null ? null : getElement(editor, file); return element != null && isAvailable(project, editor, element); }