boolean (@NotNull VirtualFile file, int line, @NotNull Project project) { final Document document = FileDocumentManager.getInstance().getDocument(file); if (document == null) return false; final PsiFile psiFile = PsiDocumentManager.getInstance(project).getPsiFile(document); if (psiFile == null) { return false; } final FileType fileType = psiFile.getFileType(); if (fileType != XmlFileType.INSTANCE || !XsltSupport.isXsltFile(psiFile)) { return false; } return true; }