RenameProcessor (@NotNull String newName) { return new RenameProcessor( getProject(), getPsiElement(), newName, getRefactoringScope(), isSearchInComments(), isSearchInNonJavaFiles() ) { @Override public void performRefactoring(UsageInfo @NotNull [] usages) { renameModule(myModule, newName); super.performRefactoring(usages); } @NotNull @Override protected String getCommandName() { return JavaRefactoringBundle.message("rename.module.directory.command", newName); } }; }