void (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(); } }