boolean (@NotNull Document document,@NotNull PsiFile file) { PsiDocumentManager psiDocumentManager = PsiDocumentManager.getInstance(file.getProject()); return !psiDocumentManager.isUncommited(document) && !psiDocumentManager.isDocumentBlockedByPsi(document) && file.getText().equals(document.getText()); }