SearchScope () { return ReadAction.compute(() -> { PsiFile file = myElement.getContainingFile(); return myScope.intersectWith( PsiSearchHelper.getInstance(myElement.getProject()).getUseScope(file != null ? file : myElement)); }); }