void (final Project project, final PsiElement nameSuggestionContext, final Editor editor, final PsiDirectory contextDirectory, final T aPackage, final PsiDirectory... dirsToRename) { final RenameDialog dialog = new RenameDialog(project, contextDirectory, nameSuggestionContext, editor) { @Override protected void doAction() { String newQName = StringUtil.getQualifiedName(StringUtil.getPackageName(getQualifiedName(aPackage)), getNewName()); BaseRefactoringProcessor moveProcessor = createProcessor(newQName, project, dirsToRename, isSearchInComments(), isSearchInNonJavaFiles()); invokeRefactoring(moveProcessor); } }; dialog.show(); }