void (UsageInfo @NotNull [] usages) { if (myRenameProcessor != null) { for (final PsiElement element : myRenameProcessor.getElements()) { try { RenameUtil.doRename(element, myRenameProcessor.getNewName(element), extractUsagesForElement(element, usages), myProject, null); } catch (final IncorrectOperationException e) { RenameUtil.showErrorMessage(e, element, myProject); return; } } } for (UsageInfo usage : usages) { final SmartPsiElementPointer pointerToInvert = myToInvert.get(usage); if (pointerToInvert != null) { PsiElement element = pointerToInvert.getElement(); LOG.assertTrue(element != null); InvertBooleanDelegate delegate = InvertBooleanDelegate.findInvertBooleanDelegate(element); try { (delegate != null ? delegate : myDelegate).replaceWithNegatedExpression(element); } catch (IncorrectOperationException e) { LOG.error(e); } } } myDelegate.invertElementInitializer(myElement); }