void (List<UsageInfo> usageInfos, Map<PsiElement, PsiElement> oldToNewMap) { for (UsageInfo usage : usageInfos) { if (usage instanceof MoveRenameUsageInfo moveRenameUsage) { final PsiElement oldElement = moveRenameUsage.getReferencedElement(); final PsiElement newElement = oldToNewMap.get(oldElement); final PsiReference reference = moveRenameUsage.getReference(); if (reference != null) { try { LOG.assertTrue(newElement != null, "old element:" + (oldElement != null ? oldElement : reference) + "; contains: " + oldToNewMap.containsKey(oldElement)); reference.bindToElement(newElement); } catch (IncorrectOperationException ex) { LOG.error(ex); } } } } }