SearchScope (@NotNull SearchScope baseScope, @NotNull List<ScopeOptimizer> optimizers, @NotNull PsiElement element) { SearchScope scopeToRestrict = ScopeOptimizer.calculateOverallRestrictedUseScope(optimizers, element); if (scopeToRestrict != null) { return baseScope.intersectWith(scopeToRestrict); } return baseScope; }