IDEA-195542 Inconsistent and partial results in "Occurrences of" Find tool window tab after opening from "Find in Path"

This commit is contained in:
Alexey Kudravtsev
2018-07-14 12:24:18 +03:00
parent 8cc4776985
commit 9acb8dc334
@@ -295,8 +295,9 @@ class SearchForUsagesRunnable implements Runnable {
int usageCount = myUsageCountWithoutDefinition.get();
if (usageCount >= 2 || usageCount == 1 && myProcessPresentation.isShowPanelIfOnlyOneUsage()) {
usageView = myUsageViewManager.createUsageView(mySearchFor, Usage.EMPTY_ARRAY, myPresentation, mySearcherFactory);
usageView.associateProgress(indicator);
if (myUsageViewRef.compareAndSet(null, usageView)) {
// associate progress only if created successfully, otherwise Dispose will cancel the actual progress, see IDEA-195542
usageView.associateProgress(indicator);
if (myProcessPresentation.isShowFindOptionsPrompt()) {
openView(usageView);
}