@NotNull final PsiNonJavaFileReferenceProcessor processor,
@NotNull final GlobalSearchScope initialScope) {
if (qName.isEmpty()) {
throw new IllegalArgumentException("Cannot search for elements with empty text. Element: "+originalElement+ "; "+(originalElement == null ? null : originalElement.getClass()));
}
<BUG>final ProgressIndicator progress = ProgressIndicatorProvider.getGlobalProgressIndicator();
int dotIndex = qName.lastIndexOf('.');</BUG>
int dollarIndex = qName.lastIndexOf('$');
int maxIndex = Math.max(dotIndex, dollarIndex);
final String wordToSearch = maxIndex >= 0 ? qName.substring(maxIndex + 1) : qName;

@NotNull final PsiNonJavaFileReferenceProcessor processor,
@NotNull final GlobalSearchScope initialScope) {
if (qName.isEmpty()) {
throw new IllegalArgumentException("Cannot search for elements with empty text. Element: "+originalElement+ "; "+(originalElement == null ? null : originalElement.getClass()));
}
final ProgressIndicator progress = getOrCreateIndicator();
int dotIndex = qName.lastIndexOf('.');
int dollarIndex = qName.lastIndexOf('$');
int maxIndex = Math.max(dotIndex, dollarIndex);
final String wordToSearch = maxIndex >= 0 ? qName.substring(maxIndex + 1) : qName;
