From e30a87c1f8a10822f7428a9bd321b130193e51de Mon Sep 17 00:00:00 2001 From: peter Date: Mon, 1 Dec 2014 19:01:09 +0100 Subject: [PATCH] groovy method usage search: use effective scope --- .../groovy/findUsages/GroovyConstructorUsagesSearcher.java | 4 ++-- .../findUsages/GroovyReflectedMethodReferenceSearcher.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/findUsages/GroovyConstructorUsagesSearcher.java b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/findUsages/GroovyConstructorUsagesSearcher.java index 06a9c0aec6d9..aaff6d89ae9a 100644 --- a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/findUsages/GroovyConstructorUsagesSearcher.java +++ b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/findUsages/GroovyConstructorUsagesSearcher.java @@ -75,7 +75,7 @@ public class GroovyConstructorUsagesSearcher extends QueryExecutorBase 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> LITERALLY_CONSTRUCTED_CLASSES = Key.create("LITERALLY_CONSTRUCTED_CLASSES"); @@ -144,7 +144,7 @@ public class GroovyConstructorUsagesSearcher extends QueryExecutorBase processedMethods = ContainerUtil.newConcurrentSet(); - ReferencesSearch.searchOptimized(clazz, scope, true, collector, true, new PairProcessor() { + ReferencesSearch.searchOptimized(clazz, scope, false, collector, true, new PairProcessor() { @Override public boolean process(PsiReference ref, SearchRequestCollector collector) { final PsiElement element = ref.getElement(); diff --git a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/findUsages/GroovyReflectedMethodReferenceSearcher.java b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/findUsages/GroovyReflectedMethodReferenceSearcher.java index 9295182ba75d..2245ef2f781e 100644 --- a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/findUsages/GroovyReflectedMethodReferenceSearcher.java +++ b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/findUsages/GroovyReflectedMethodReferenceSearcher.java @@ -37,7 +37,7 @@ public class GroovyReflectedMethodReferenceSearcher extends QueryExecutorBase