IDEA-270766 "Usages of ..." tool window notification is not closed after search is completed

GitOrigin-RevId: f62c177a1f1d15caaffdee06c6cda72ead204d86
This commit is contained in:
Kirill Kirichenko
2021-06-30 19:16:32 +03:00
committed by intellij-monorepo-bot
parent 7c3b56da4b
commit cadbbd12e2

View File

@@ -355,12 +355,14 @@ final class SearchForUsagesRunnable implements Runnable {
CoreProgressManager.assertUnderProgress(indicator);
}
TooManyUsagesStatus.createFor(indicator);
AtomicBoolean showBalloon = new AtomicBoolean(true);
EdtScheduledExecutorService.getInstance().schedule(() -> {
if (!myProject.isDisposed()) {
if (!myProject.isDisposed() && showBalloon.get()) {
notifyByFindBalloon(null, MessageType.WARNING,
Collections.singletonList(StringUtil.escapeXmlEntities(UsageViewManagerImpl.getProgressTitle(myPresentation))));
findStartedBalloonShown.set(true);
}
findStartedBalloonShown.set(true);
}, ModalityState.NON_MODAL, 300, TimeUnit.MILLISECONDS);
UsageSearcher usageSearcher = mySearcherFactory.create();
long startSearchStamp = System.currentTimeMillis();
@@ -406,6 +408,7 @@ final class SearchForUsagesRunnable implements Runnable {
balloon.hide();
}
}
showBalloon.set(false);
}, myProject.getDisposed());
}