mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
structure view: delay autoscroll until documents are committed (EA-88578 - assert: PsiDocumentManagerBase.commitAllDocuments)
This commit is contained in:
+9
-8
@@ -538,15 +538,16 @@ public class StructureViewComponent extends SimpleToolWindowPanel implements Tre
|
||||
}
|
||||
|
||||
private void scrollToSelectedElementInner() {
|
||||
try {
|
||||
PsiDocumentManager.getInstance(myProject).commitAllDocuments();
|
||||
final Object currentEditorElement = myTreeModel.getCurrentEditorElement();
|
||||
if (currentEditorElement != null) {
|
||||
select(currentEditorElement, false);
|
||||
PsiDocumentManager.getInstance(myProject).performWhenAllCommitted(() -> {
|
||||
try {
|
||||
final Object currentEditorElement = myTreeModel.getCurrentEditorElement();
|
||||
if (currentEditorElement != null) {
|
||||
select(currentEditorElement, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (IndexNotReadyException ignore) {
|
||||
}
|
||||
catch (IndexNotReadyException ignore) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user