use extended use scopes (by UseScopeEnlarger)

GitOrigin-RevId: 27b10a3019716a66beaee7101c1ff706caebf757
This commit is contained in:
Dmitry Batkovich
2020-10-21 13:40:13 +03:00
committed by intellij-monorepo-bot
parent 891b3e6675
commit 3065547b80
5 changed files with 17 additions and 16 deletions

View File

@@ -4,6 +4,7 @@ package com.intellij.psi.search.searches;
import com.intellij.openapi.application.ReadAction;
import com.intellij.psi.*;
import com.intellij.psi.search.GlobalSearchScope;
import com.intellij.psi.search.PsiSearchHelper;
import com.intellij.psi.search.SearchScope;
import com.intellij.psi.util.PsiUtilCore;
import com.intellij.util.EmptyQuery;
@@ -28,7 +29,8 @@ public final class FunctionalExpressionSearch extends ExtensibleQueryFactory<Psi
@NotNull
public SearchScope getEffectiveSearchScope () {
return myScope.intersectWith(myElementToSearch.getUseScope());
return myScope
.intersectWith(PsiSearchHelper.getInstance(myElementToSearch.getProject()).getUseScope(myElementToSearch));
}
}