@@ -0,0 +1,2123 @@
+/*%0A * Copyright (c) 2000-2006 JetBrains s.r.o. All Rights Reserved.%0A */%0A%0A/*%0A * Created by IntelliJ IDEA.%0A * User: yole%0A * Date: 26.10.2006%0A * Time: 16:44:00%0A */%0Apackage com.intellij.uiDesigner.projectView;%0A%0Aimport com.intellij.refactoring.rename.RenameHandler;%0Aimport com.intellij.refactoring.rename.RenameHandlerRegistry;%0Aimport com.intellij.refactoring.RefactoringActionHandlerFactory;%0Aimport com.intellij.openapi.actionSystem.DataContext;%0Aimport com.intellij.openapi.actionSystem.ex.DataConstantsEx;%0Aimport com.intellij.openapi.project.Project;%0Aimport com.intellij.openapi.editor.Editor;%0Aimport com.intellij.openapi.components.ApplicationComponent;%0Aimport com.intellij.psi.PsiFile;%0Aimport com.intellij.psi.PsiElement;%0Aimport com.intellij.psi.PsiClass;%0Aimport org.jetbrains.annotations.NonNls;%0Aimport org.jetbrains.annotations.NotNull;%0A%0Apublic class FormRenameHandler implements RenameHandler, ApplicationComponent %7B%0A  public boolean isAvailableOnDataContext(DataContext dataContext) %7B%0A    Form%5B%5D forms = (Form%5B%5D) dataContext.getData(DataConstantsEx.GUI_DESIGNER_FORM_ARRAY);%0A    return forms != null && forms.length == 1;%0A  %7D%0A%0A  public boolean isRenaming(DataContext dataContext) %7B%0A    return isAvailableOnDataContext(dataContext);%0A  %7D%0A%0A  public void invoke(Project project, Editor editor, PsiFile file, DataContext dataContext) %7B%0A    Form%5B%5D forms = (Form%5B%5D) dataContext.getData(DataConstantsEx.GUI_DESIGNER_FORM_ARRAY);%0A    if (forms == null %7C%7C forms.length != 1) return;%0A    PsiClass boundClass = forms %5B0%5D.getClassToBind();%0A    RefactoringActionHandlerFactory.getInstance().createRenameHandler().invoke(project, new PsiElement%5B%5D %7B boundClass %7D,%0A                                                                               dataContext);%0A  %7D%0A%0A  public void invoke(Project project, PsiElement%5B%5D elements, DataContext dataContext) %7B%0A    invoke(project, null, null, dataContext);%0A  %7D%0A%0A  @NonNls%0A  @NotNull%0A  public String getComponentName() %7B%0A    return %22FormRenameHandler%22;%0A  %7D%0A%0A  public void initComponent() %7B%0A    RenameHandlerRegistry.getInstance().registerHandler(this);%0A  %7D%0A%0A  public void disposeComponent() %7B%0A  %7D%0A%7D

rename on UI Designer form node delegates to rename class (IDEADEV-9657)