Search in sources :

Example 31 with RenameProcessor

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

the class RenameFieldTest method perform.

protected static void perform(String newName) {
    PsiElement element = TargetElementUtil.findTargetElement(myEditor, TargetElementUtil.ELEMENT_NAME_ACCEPTED | TargetElementUtil.REFERENCED_ELEMENT_ACCEPTED);
    new RenameProcessor(getProject(), element, newName, false, false).run();
}
Also used : RenameProcessor(com.intellij.refactoring.rename.RenameProcessor) PsiElement(com.intellij.psi.PsiElement)

Example 32 with RenameProcessor

use of com.intellij.refactoring.rename.RenameProcessor in project kotlin by JetBrains.

the class KdocRenameTest method doTest.

private void doTest(String newName) throws Exception {
    configureByFile(getTestName(false) + ".kt");
    PsiElement element = TargetElementUtilBase.findTargetElement(myEditor, TargetElementUtilBase.ELEMENT_NAME_ACCEPTED | TargetElementUtilBase.REFERENCED_ELEMENT_ACCEPTED);
    assertNotNull(element);
    new RenameProcessor(getProject(), element, newName, true, true).run();
    checkResultByFile(getTestName(false) + ".kt.after");
}
Also used : RenameProcessor(com.intellij.refactoring.rename.RenameProcessor) PsiElement(com.intellij.psi.PsiElement)

Aggregations

RenameProcessor (com.intellij.refactoring.rename.RenameProcessor)32 PsiElement (com.intellij.psi.PsiElement)10 PsiClass (com.intellij.psi.PsiClass)7 AutomaticRenamerFactory (com.intellij.refactoring.rename.naming.AutomaticRenamerFactory)5 PsiMethod (com.intellij.psi.PsiMethod)3 Project (com.intellij.openapi.project.Project)2 VirtualFile (com.intellij.openapi.vfs.VirtualFile)2 JavaPsiFacade (com.intellij.psi.JavaPsiFacade)2 BuildFile (com.google.idea.blaze.base.lang.buildfile.psi.BuildFile)1 WorkspacePath (com.google.idea.blaze.base.model.primitives.WorkspacePath)1 AbstractProjectViewPSIPane (com.intellij.ide.projectView.impl.AbstractProjectViewPSIPane)1 ClassesTreeStructureProvider (com.intellij.ide.projectView.impl.ClassesTreeStructureProvider)1 FlexMxmlNSDescriptor (com.intellij.javascript.flex.mxml.schema.FlexMxmlNSDescriptor)1 ResourceBundleRenamerFactory (com.intellij.lang.properties.refactoring.rename.ResourceBundleRenamerFactory)1 Editor (com.intellij.openapi.editor.Editor)1 Module (com.intellij.openapi.module.Module)1 DialogBuilder (com.intellij.openapi.ui.DialogBuilder)1 ProperTextRange (com.intellij.openapi.util.ProperTextRange)1 TextRange (com.intellij.openapi.util.TextRange)1 PsiField (com.intellij.psi.PsiField)1