void (UsageInfo @NotNull [] usages) { RefactoringTransaction transaction = getTransaction(); final ChangeInfo changeInfo = myChangeInfo; PsiElement method = changeInfo.getMethod(); final RefactoringElementListener elementListener = transaction == null ? null : transaction.getElementListener(method); final String fqn = CopyReferenceAction.elementToFqn(method); SmartPsiElementPointer<PsiElement> pointer = SmartPointerManager.createPointer(method); if (fqn != null) { UndoableAction action = new BasicUndoableAction() { @Override public void undo() { if (elementListener instanceof UndoRefactoringElementListener) { PsiElement element = pointer.getElement(); if (element != null) { ((UndoRefactoringElementListener)elementListener).undoElementMovedOrRenamed(element, fqn); } } } @Override public void redo() { } }; UndoManager.getInstance(myProject).undoableActionPerformed(action); } try { doChangeSignature(changeInfo, usages); method = pointer.getElement(); LOG.assertTrue(method != null && method.isValid()); if (elementListener != null && changeInfo.isNameChanged()) { elementListener.elementRenamed(method); } } catch (IncorrectOperationException e) { LOG.error(e); } }