public static void renameTargets(AliasingPsiTarget target, @NotNull String newDelegateName) {
    final PsiNamedElement namedElement = (PsiNamedElement)target.getNavigationElement();
    if (!newDelegateName.equals(namedElement.getName())) {
      final RenameRefactoring refactoring =
        RefactoringFactory.getInstance(namedElement.getProject()).createRename(namedElement, newDelegateName);
      refactoring.run();

    }
  }
public static void renameTargets(AliasingPsiTarget target, @NotNull String newDelegateName)