IJPL-158388 IJI-2040 suppress error for documents with event-system-disabled PSI

GitOrigin-RevId: d2aa8c4a4214e4223d3ea0969609a2c093b94208
This commit is contained in:
Dmitry Batkovich
2024-07-15 19:53:03 +02:00
committed by intellij-monorepo-bot
parent 2dbae840d3
commit ed074b32e9

View File

@@ -224,7 +224,7 @@ public abstract class PsiDocumentManagerBase extends PsiDocumentManager implemen
}
LOG.error("Committed document in uncommitted set: " + document);
}
else if (!doCommit(document)) {
if (!doCommit(document) && isEventSystemEnabled(document)) {
LOG.error("Couldn't commit " + document);
}
}
@@ -481,7 +481,9 @@ public abstract class PsiDocumentManagerBase extends PsiDocumentManager implemen
assert !isCommitInProgress() : "Do not call commitDocument() from inside PSI change listener";
// otherwise there are many clients calling commitAllDocs() on PSI childrenChanged()
if (getSynchronizer().isDocumentAffectedByTransactions(document)) return false;
if (getSynchronizer().isDocumentAffectedByTransactions(document)) {
return false;
}
PsiFile psiFile = getPsiFile(document);
if (psiFile == null) {