PsiFile (@NotNull Project project, @NotNull VirtualFile file) { Document document = FileDocumentManager.getInstance().getDocument(file); if (document != null) { return PsiDocumentManager.getInstance(project).getPsiFile(document); } return null; }