boolean (@NotNull PsiFile file, @NotNull Document document) { return PsiDocumentManager.getInstance(myProject).isCommitted(myDocument) && file.isValid() && file.getTextLength() == document.getTextLength(); }