SearchScope () { if (myIgnoreAccessScope) { return myScope; } SearchScope scope = myEffectiveScope; if (scope == null) { if (!myElementToSearch.isValid()) return LocalSearchScope.EMPTY; SearchScope useScope = PsiSearchHelper.getInstance(myElementToSearch.getProject()).getUseScope(myElementToSearch); myEffectiveScope = scope = myScope.intersectWith(useScope); } return scope; }