mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 08:51:02 +07:00
optimization: return LocalSearchScope.EMPTY instead of GlobalSearchScope.EMPTY_SCOPE explicitly to avoid unnecessary FileBasedIndex accesses during search
GitOrigin-RevId: b7cf8f4b4dec2f79f2231b97b091cc0ed7978473
This commit is contained in:
committed by
intellij-monorepo-bot
parent
480b4a18eb
commit
a897b7c13c
@@ -86,7 +86,7 @@ public final class MethodReferencesSearch extends ExtensibleQueryFactory<PsiRefe
|
||||
public SearchScope getEffectiveSearchScope () {
|
||||
SearchScope scope = myEffectiveScope;
|
||||
if (scope == null) {
|
||||
if (!myMethod.isValid()) return GlobalSearchScope.EMPTY_SCOPE;
|
||||
if (!myMethod.isValid()) return LocalSearchScope.EMPTY;
|
||||
|
||||
myEffectiveScope = scope = myScope.intersectWith(PsiSearchHelper.getInstance(myMethod.getProject()).getUseScope(myMethod));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user