mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
update usage preview immediately if everything is committed (IDEA-CR-11111, EA-83054 - assert: PsiDocumentManagerBase.commitAllDocuments)
This commit is contained in:
@@ -58,10 +58,16 @@ public abstract class UsageContextPanelBase extends JPanel implements UsageConte
|
||||
|
||||
@Override
|
||||
public final void updateLayout(@Nullable final List<UsageInfo> infos) {
|
||||
PsiDocumentManager.getInstance(myProject).performLaterWhenAllCommitted(() -> {
|
||||
if (isDisposed || myProject.isDisposed()) return;
|
||||
PsiDocumentManager pdm = PsiDocumentManager.getInstance(myProject);
|
||||
if (!pdm.hasUncommitedDocuments()) {
|
||||
updateLayoutLater(infos);
|
||||
});
|
||||
} else {
|
||||
pdm.performLaterWhenAllCommitted(() -> {
|
||||
if (isDisposed || myProject.isDisposed()) return;
|
||||
updateLayoutLater(infos);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected abstract void updateLayoutLater(@Nullable List<UsageInfo> infos);
|
||||
|
||||
Reference in New Issue
Block a user