From 9bde06ecc8aedd610b4e40b55060c6ce866a79e1 Mon Sep 17 00:00:00 2001 From: anna Date: Wed, 9 Jun 2010 22:26:11 +0400 Subject: [PATCH] validate type from code fragment --- .../refactoring/typeMigration/ui/TypeMigrationDialog.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/java/java-impl/src/com/intellij/refactoring/typeMigration/ui/TypeMigrationDialog.java b/java/java-impl/src/com/intellij/refactoring/typeMigration/ui/TypeMigrationDialog.java index 17528ab59400..d620d99416d1 100644 --- a/java/java-impl/src/com/intellij/refactoring/typeMigration/ui/TypeMigrationDialog.java +++ b/java/java-impl/src/com/intellij/refactoring/typeMigration/ui/TypeMigrationDialog.java @@ -27,6 +27,7 @@ import com.intellij.refactoring.typeMigration.TypeMigrationProcessor; import com.intellij.refactoring.typeMigration.TypeMigrationRules; import com.intellij.refactoring.ui.RefactoringDialog; import com.intellij.refactoring.ui.TypeSelectorManagerImpl; +import com.intellij.refactoring.util.CanonicalTypes; import com.intellij.ui.EditorComboBox; import com.intellij.util.VisibilityUtil; import org.jetbrains.annotations.NotNull; @@ -164,7 +165,7 @@ public class TypeMigrationDialog extends RefactoringDialog { FindSettings.getInstance().setDefaultScopeName(myScopeChooserCombo.getSelectedScopeName()); final PsiType rootType = getRootType(); - final PsiType migrationType = getMigrationType(); + final PsiType migrationType = CanonicalTypes.createTypeWrapper(getMigrationType()).getType(myRoot, myRoot.getManager()); if (Comparing.equal(rootType, migrationType)){ close(DialogWrapper.OK_EXIT_CODE);