Search in sources :

Example 6 with BaseRefactoringProcessor

use of com.intellij.refactoring.BaseRefactoringProcessor in project intellij-community by JetBrains.

the class DirectoryAsPackageRenameHandlerBase method renameDirs.

private void renameDirs(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();
}
Also used : BaseRefactoringProcessor(com.intellij.refactoring.BaseRefactoringProcessor)

Aggregations

BaseRefactoringProcessor (com.intellij.refactoring.BaseRefactoringProcessor)6 IncorrectOperationException (com.intellij.util.IncorrectOperationException)3 DefineParamsDefaultValueAction (com.intellij.codeInsight.daemon.impl.quickfix.DefineParamsDefaultValueAction)1 DescriptiveNameUtil (com.intellij.lang.findUsages.DescriptiveNameUtil)1 JSChangeSignatureDialog (com.intellij.lang.javascript.refactoring.changeSignature.JSChangeSignatureDialog)1 JSMethodDescriptor (com.intellij.lang.javascript.refactoring.changeSignature.JSMethodDescriptor)1 JSParameterInfo (com.intellij.lang.javascript.refactoring.changeSignature.JSParameterInfo)1 ApplicationManager (com.intellij.openapi.application.ApplicationManager)1 CommandProcessor (com.intellij.openapi.command.CommandProcessor)1 WriteCommandAction (com.intellij.openapi.command.WriteCommandAction)1 Document (com.intellij.openapi.editor.Document)1 Editor (com.intellij.openapi.editor.Editor)1 Project (com.intellij.openapi.project.Project)1 Comparing (com.intellij.openapi.util.Comparing)1 TextRange (com.intellij.openapi.util.TextRange)1 com.intellij.psi (com.intellij.psi)1 PsiDirectory (com.intellij.psi.PsiDirectory)1 PsiElement (com.intellij.psi.PsiElement)1 RefactoringBundle (com.intellij.refactoring.RefactoringBundle)1 InplaceChangeSignature (com.intellij.refactoring.changeSignature.inplace.InplaceChangeSignature)1