void (@NotNull final Map<PsiElement, PsiElement> oldToNewElementMap, final NonCodeUsageInfo @NotNull [] nonCodeUsages) { for (PsiElement newClass : oldToNewElementMap.values()) { if (!(newClass instanceof GrTypeDefinition)) continue; newClass.accept(new PsiRecursiveElementVisitor() { @Override public void visitElement(@NotNull final PsiElement element) { super.visitElement(element); List<NonCodeUsageInfo> list = element.getCopyableUserData(MoveClassToInnerProcessor.ourNonCodeUsageKey); if (list != null) { for (NonCodeUsageInfo info : list) { for (int i = 0; i < nonCodeUsages.length; i++) { if (nonCodeUsages[i] == info) { nonCodeUsages[i] = info.replaceElement(element); break; } } } element.putCopyableUserData(MoveClassToInnerProcessor.ourNonCodeUsageKey, null); } } }); } }