void (@NotNull PsiElement element, @NotNull SearchScope searchScope, String stringToSearch, boolean searchInStringsAndComments, boolean searchInNonJavaFiles, String newQName, Collection<? super UsageInfo> results) { if (searchInStringsAndComments || searchInNonJavaFiles) { UsageInfoFactory factory = createUsageInfoFactory(element, newQName); if (searchInStringsAndComments) { addUsagesInStringsAndComments(element, searchScope, stringToSearch, results, factory); } if (searchInNonJavaFiles && searchScope instanceof GlobalSearchScope) { addTextOccurrences(element, stringToSearch, (GlobalSearchScope)searchScope, results, factory); } } }