boolean (PsiNamedElement element, List<? super UsageInfo> result, final boolean searchInStringsAndComments, final boolean searchInNonJavaFiles, List<? super UnresolvableCollisionUsageInfo> unresolvedUsages, Map<PsiElement, String> allRenames) { final String newName = getNewName(element); if (newName != null) { final LinkedHashMap<PsiNamedElement, String> renames = new LinkedHashMap<>(myRenames); if (allRenames != null) { for (PsiElement psiElement : allRenames.keySet()) { if (psiElement instanceof PsiNamedElement) { renames.put((PsiNamedElement)psiElement, allRenames.get(psiElement)); } } } final UsageInfo[] usages = RenameUtil.findUsages(element, newName, searchInStringsAndComments, searchInNonJavaFiles, renames); for (final UsageInfo usage : usages) { if (usage instanceof UnresolvableCollisionUsageInfo) { if (unresolvedUsages != null) { unresolvedUsages.add((UnresolvableCollisionUsageInfo)usage); } return false; } } ContainerUtil.addAll(result, usages); } return true; }