boolean (@NotNull Project project, Editor editor, PsiFile file) { if (!myToken.isValid()) { return false; } final PsiFile psiFile = myToken.getContainingFile(); assert psiFile != null; final PsiElement context = psiFile.getContext(); return context != null && context.isValid(); }