From fcd048f919964d6d1ab35c22c728d5be60c770c2 Mon Sep 17 00:00:00 2001 From: nik Date: Mon, 12 Jun 2017 10:30:56 +0200 Subject: [PATCH] SearchForUsagesRunnable: names corrected (IDEA-CR-21752) --- .../com/intellij/usages/impl/SearchForUsagesRunnable.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/usageView/src/com/intellij/usages/impl/SearchForUsagesRunnable.java b/platform/usageView/src/com/intellij/usages/impl/SearchForUsagesRunnable.java index 5fb2900e8a0f..70b4a097d35a 100644 --- a/platform/usageView/src/com/intellij/usages/impl/SearchForUsagesRunnable.java +++ b/platform/usageView/src/com/intellij/usages/impl/SearchForUsagesRunnable.java @@ -170,17 +170,17 @@ class SearchForUsagesRunnable implements Runnable { if (!(mySearchScopeToWarnOfFallingOutOf instanceof GlobalSearchScope)) return Collections.emptySet(); Collection unloadedInSearchScope = ((GlobalSearchScope)mySearchScopeToWarnOfFallingOutOf).getUnloadedModulesBelongingToScope(); - Set unloadedInResolveScope = getCombinedUseScope(); - if (unloadedInResolveScope != null) { + Set unloadedInUseScope = getUnloadedModulesBelongingToUseScopes(); + if (unloadedInUseScope != null) { //when searching for usages of PsiElements return only those unloaded modules which may contain references to the elements, this way // we won't show a warning if e.g. 'find usages' for a private method is invoked - return ContainerUtil.intersection(unloadedInSearchScope, unloadedInResolveScope); + return ContainerUtil.intersection(unloadedInSearchScope, unloadedInUseScope); } return unloadedInSearchScope; }); } - private Set getCombinedUseScope() { + private Set getUnloadedModulesBelongingToUseScopes() { Set resolveScope = new LinkedHashSet<>(); for (UsageTarget target : mySearchFor) { if (!(target instanceof PsiElementUsageTarget)) return null;