mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 06:50:54 +07:00
IJPL-172840 Use Tree's suspend expand/collapse accessibility announcements API in the Structure tree
This fixes a crash when opening the File Structure popup in very large files (JBR-7655) (cherry picked from commit 9f497ecbf584fe8596630ab86245a0835a6eb3f4) IJ-CR-151182 GitOrigin-RevId: 243ba2314b173347983aeea2299efdede60b2baa
This commit is contained in:
committed by
intellij-monorepo-bot
parent
0adecf1134
commit
473efbed32
@@ -1162,7 +1162,17 @@ public class StructureViewComponent extends SimpleToolWindowPanel implements Tre
|
||||
void expandLater(@NotNull TreePath parentPath, @NotNull Object o) {
|
||||
ApplicationManager.getApplication().invokeLater(() -> {
|
||||
if (!tree.isVisible(parentPath) || !tree.isExpanded(parentPath)) return;
|
||||
tree.expandPath(parentPath.pathByAddingChild(o));
|
||||
try {
|
||||
if (tree instanceof Tree jbTree) {
|
||||
jbTree.suspendExpandCollapseAccessibilityAnnouncements();
|
||||
}
|
||||
tree.expandPath(parentPath.pathByAddingChild(o));
|
||||
}
|
||||
finally {
|
||||
if (tree instanceof Tree jbTree) {
|
||||
jbTree.resumeExpandCollapseAccessibilityAnnouncements();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user