groovy method usage search: use effective scope

This commit is contained in:
peter
2014-12-01 19:10:36 +01:00
parent ae03dd9be7
commit e30a87c1f8
2 changed files with 3 additions and 3 deletions
@@ -75,7 +75,7 @@ public class GroovyConstructorUsagesSearcher extends QueryExecutorBase<PsiRefere
@Override
public void processQuery(@NotNull MethodReferencesSearch.SearchParameters p, @NotNull Processor<PsiReference> consumer) {
processConstructorUsages(p.getMethod(), p.getScope(), consumer, p.getOptimizer(), true, !p.isStrictSignatureSearch());
processConstructorUsages(p.getMethod(), p.getEffectiveSearchScope(), consumer, p.getOptimizer(), true, !p.isStrictSignatureSearch());
}
public static final Key<Set<PsiClass>> LITERALLY_CONSTRUCTED_CLASSES = Key.create("LITERALLY_CONSTRUCTED_CLASSES");
@@ -144,7 +144,7 @@ public class GroovyConstructorUsagesSearcher extends QueryExecutorBase<PsiRefere
final LiteralConstructorSearcher literalProcessor) {
final Set<PsiAnchor> processedMethods = ContainerUtil.newConcurrentSet();
ReferencesSearch.searchOptimized(clazz, scope, true, collector, true, new PairProcessor<PsiReference, SearchRequestCollector>() {
ReferencesSearch.searchOptimized(clazz, scope, false, collector, true, new PairProcessor<PsiReference, SearchRequestCollector>() {
@Override
public boolean process(PsiReference ref, SearchRequestCollector collector) {
final PsiElement element = ref.getElement();
@@ -37,7 +37,7 @@ public class GroovyReflectedMethodReferenceSearcher extends QueryExecutorBase<Ps
final PsiMethod method = queryParameters.getMethod();
if (method instanceof GrMethod) {
for (GrReflectedMethod reflectedMethod : ((GrMethod)method).getReflectedMethods()) {
MethodReferencesSearch.search(reflectedMethod, queryParameters.getScope(), true).forEach(consumer);
MethodReferencesSearch.search(reflectedMethod, queryParameters.getEffectiveSearchScope(), true).forEach(consumer);
}
}
}