mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Add diagnostic attachments for commit document assertion
simplify logging
This commit is contained in:
@@ -194,20 +194,13 @@ public abstract class DocumentCommitProcessor {
|
||||
if (myTreeElementBeingReparsedSoItWontBeCollected.getTextLength() != document.getTextLength()) {
|
||||
final String documentText = document.getText();
|
||||
String fileText = file.getText();
|
||||
if (ApplicationManager.getApplication().isInternal()) {
|
||||
LOG.error("commitDocument left PSI inconsistent; file len=" + myTreeElementBeingReparsedSoItWontBeCollected.getTextLength() +
|
||||
"; doc len=" + document.getTextLength() +
|
||||
"; doc.getText() == file.getText(): " + Comparing.equal(fileText, documentText) +
|
||||
";\n file psi text=" + fileText +
|
||||
";\n doc text=" + documentText +
|
||||
";\n old psi file text=" + oldPsiText);
|
||||
}
|
||||
else {
|
||||
LOG.error("commitDocument left PSI inconsistent: " + file,
|
||||
new Attachment("file psi text", fileText),
|
||||
new Attachment("old text", documentText),
|
||||
new Attachment("old psi file text", oldPsiText));
|
||||
}
|
||||
LOG.error("commitDocument left PSI inconsistent: " + file +
|
||||
"; file len=" + myTreeElementBeingReparsedSoItWontBeCollected.getTextLength() +
|
||||
"; doc len=" + document.getTextLength() +
|
||||
"; doc.getText() == file.getText(): " + Comparing.equal(fileText, documentText),
|
||||
new Attachment("file psi text", fileText),
|
||||
new Attachment("old text", documentText),
|
||||
new Attachment("old psi file text", oldPsiText));
|
||||
|
||||
file.putUserData(BlockSupport.DO_NOT_REPARSE_INCREMENTALLY, Boolean.TRUE);
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user