[usageView] IJPL-194470 JBC: Confilcts window looks broken

(cherry picked from commit 00d8451c35ea7697c89ebdef210bb9d3ba3663a6)

IJ-CR-181041

GitOrigin-RevId: ffc36f4678d04f2882f45f7e384feb601ee5f9c7
This commit is contained in:
Dmitry Batrak
2025-11-05 12:10:56 +00:00
committed by intellij-monorepo-bot
parent 8fadc8ff96
commit 798bbf238c
@@ -1086,6 +1086,9 @@ public class UsageViewImpl implements UsageViewEx {
appendUsagesInBulk(allUsages).thenRun(() -> SwingUtilities.invokeLater(() -> {
if (isDisposed()) return;
if (myTree != null) {
if (!myPresentation.isDetachedMode()) {
expandTreeAfterReset();
}
excludeUsages(excludedUsages.toArray(Usage.EMPTY_ARRAY));
restoreUsageExpandState(states);
updateImmediately();
@@ -1150,6 +1153,10 @@ public class UsageViewImpl implements UsageViewEx {
doExpandingCollapsing(() -> TreeUtil.expand(myTree, levels));
}
private void expandTreeAfterReset() {
expandTree(2);
}
private void doExpandingCollapsing(@NotNull Runnable task) {
if (isDisposed()) return;
ThreadingAssertions.assertEventDispatchThread();
@@ -1247,6 +1254,9 @@ public class UsageViewImpl implements UsageViewEx {
public void refreshUsages() {
reset();
if (!myPresentation.isDetachedMode()) {
SwingUtilities.invokeLater(() -> expandTreeAfterReset());
}
doReRun();
}
@@ -1279,10 +1289,6 @@ public class UsageViewImpl implements UsageViewEx {
synchronized (modelToSwingNodeChanges) {
modelToSwingNodeChanges.clear();
}
if (!myPresentation.isDetachedMode()) {
SwingUtilities.invokeLater(() -> expandTree(2));
}
}
@ApiStatus.Internal