public static void doRename(final PsiElement element, String newName, UsageInfo[] usages, final Project project,
                              @Nullable final RefactoringElementListener listener) throws IncorrectOperationException{
    registerUndoableRename(element, listener);
    RenamePsiElementProcessorBase processor = RenamePsiElementProcessorBase.forPsiElement(element);
    processor.renameElement(element, newName, usages, listener);
  }
public static void doRename(final PsiElement element, String newName, UsageInfo[] usages, final Project project,
                              @Nullable final RefactoringElementListener listener)