boolean (@NotNull final PsiElement element, int offsetInElement, @NotNull Processor<? super PsiReference> consumer) { String alias = getAlias(element); if (alias == null) return true; final PsiReference reference = element.getReference(); if (reference == null) { return true; } if (!reference.isReferenceTo(myTarget instanceof GrAccessorMethod ? ((GrAccessorMethod)myTarget).getProperty() : myTarget)) { return true; } final SearchRequestCollector collector = new SearchRequestCollector(mySession); final SearchScope fileScope = new LocalSearchScope(element.getContainingFile()); collector.searchWord(alias, fileScope, UsageSearchContext.IN_CODE, true, myTarget); if (prefix != null) { collector.searchWord(prefix + GroovyPropertyUtils.capitalize(alias), fileScope, UsageSearchContext.IN_CODE, true, myTarget); } return PsiSearchHelper.getInstance(element.getProject()).processRequests(collector, consumer); }