don't use getScope in method usage search at all

This commit is contained in:
peter
2014-12-02 16:05:07 +01:00
parent c9c958ae5a
commit aa77cca14b
3 changed files with 3 additions and 3 deletions
@@ -55,7 +55,7 @@ public class AccessorMethodReferencesSearcher extends QueryExecutorBase<PsiRefer
if (propertyName == null) return;
final SearchScope onlyGroovyFiles = GroovyScopeUtil.restrictScopeToGroovyFiles(queryParameters.getScope(), GroovyScopeUtil.getEffectiveScope(method));
final SearchScope onlyGroovyFiles = GroovyScopeUtil.restrictScopeToGroovyFiles(queryParameters.getEffectiveSearchScope(), GroovyScopeUtil.getEffectiveScope(method));
queryParameters.getOptimizer().searchWord(propertyName, onlyGroovyFiles, UsageSearchContext.IN_CODE, true, method);
@@ -46,7 +46,7 @@ public class GrLiteralMethodSearcher extends QueryExecutorBase<PsiReference, Met
final PsiMethod[] methods = strictSignatureSearch ? new PsiMethod[]{method} : aClass.findMethodsByName(name, false);
SearchScope accessScope = GroovyScopeUtil.getEffectiveScope(methods);
final SearchScope restrictedByAccess = GroovyScopeUtil.restrictScopeToGroovyFiles(p.getScope(), accessScope);
final SearchScope restrictedByAccess = GroovyScopeUtil.restrictScopeToGroovyFiles(p.getEffectiveSearchScope(), accessScope);
final String textToSearch = findLongestWord(name);
@@ -46,7 +46,7 @@ public class MethodLateBoundReferencesSearcher extends QueryExecutorBase<PsiRefe
@Override
public void processQuery(@NotNull MethodReferencesSearch.SearchParameters queryParameters, @NotNull Processor<PsiReference> consumer) {
final PsiMethod method = queryParameters.getMethod();
SearchScope searchScope = GroovyScopeUtil.restrictScopeToGroovyFiles(queryParameters.getScope()).intersectWith(getUseScope(method));
SearchScope searchScope = GroovyScopeUtil.restrictScopeToGroovyFiles(queryParameters.getEffectiveSearchScope()).intersectWith(getUseScope(method));
PsiClass aClass = method.getContainingClass();
String className = aClass == null ? null : aClass.getName();
orderSearching(searchScope, method.getName(), method, queryParameters.getOptimizer(), method.getParameterList().getParametersCount());