mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-51538 - assert: PsiDocumentManagerBase.cancelAndRunWhenAllCommitted
This commit is contained in:
@@ -243,7 +243,9 @@ public abstract class PsiDocumentManagerBase extends PsiDocumentManager implemen
|
||||
}
|
||||
if (myUncommittedDocuments.isEmpty()) {
|
||||
action.run();
|
||||
assert actionsWhenAllDocumentsAreCommitted.isEmpty() : actionsWhenAllDocumentsAreCommitted;
|
||||
if (!hasUncommitedDocuments()) {
|
||||
assert actionsWhenAllDocumentsAreCommitted.isEmpty() : actionsWhenAllDocumentsAreCommitted;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
actionsWhenAllDocumentsAreCommitted.put(key, action);
|
||||
@@ -496,9 +498,14 @@ public abstract class PsiDocumentManagerBase extends PsiDocumentManager implemen
|
||||
if (!hasUncommitedDocuments() && !actionsWhenAllDocumentsAreCommitted.isEmpty()) {
|
||||
List<Object> keys = new ArrayList<Object>(actionsWhenAllDocumentsAreCommitted.keySet());
|
||||
for (Object key : keys) {
|
||||
Runnable action = actionsWhenAllDocumentsAreCommitted.remove(key);
|
||||
myDocumentCommitProcessor.log("Running after commit runnable: ", null, false, key, action);
|
||||
action.run();
|
||||
try {
|
||||
Runnable action = actionsWhenAllDocumentsAreCommitted.remove(key);
|
||||
myDocumentCommitProcessor.log("Running after commit runnable: ", null, false, key, action);
|
||||
action.run();
|
||||
}
|
||||
catch (Throwable e) {
|
||||
LOG.error(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user