boolean (@Nullable Document document, @NotNull VirtualFile file, @NotNull PsiFile psi) { if (document == null || FileDocumentManager.getInstance().isDocumentUnsaved(document) || !PsiDocumentManager.getInstance(psi.getProject()).isCommitted(document)) { return false; } boolean isFileBinary = file.getFileType().isBinary(); return indexingFileStamp == file.getTimeStamp() && isBinary == isFileBinary && contentLengthMatches(file.getLength(), document.getTextLength()); }