This commit is contained in:
Alexey Kudravtsev
2011-11-24 13:28:10 +04:00
parent 548df0c9b1
commit 9e71e9a033
@@ -93,8 +93,8 @@ public class TextOccurrencesUtil {
final boolean ignoreReferences,
@NotNull final PairProcessor<PsiElement, TextRange> processor) {
PsiSearchHelper helper = PsiSearchHelper.SERVICE.getInstance(element.getProject());
SearchScope scope = PsiSearchHelper.SERVICE.getInstance(element.getProject()).getUseScope(element);
scope = scope.intersectWith(GlobalSearchScope.projectScope(element.getProject()));
SearchScope scope = helper.getUseScope(element);
scope = GlobalSearchScope.projectScope(element.getProject()).intersectWith(scope);
Processor<PsiElement> commentOrLiteralProcessor = new Processor<PsiElement>() {
public boolean process(PsiElement literal) {
return processTextIn(literal, stringToSearch, ignoreReferences, processor);