mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
groovy method usage search: use effective scope
This commit is contained in:
+2
-2
@@ -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();
|
||||
|
||||
+1
-1
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user