boolean (@NotNull PsiElement element) { if (!(element instanceof PsiFile)) { return false; } final VirtualFile virtualFile = ((PsiFile)element).getVirtualFile(); return virtualFile != null && Objects.equals(virtualFile.getExtension(), "ipynb"); }