test fix
authorMaxim Medvedev <maxim.medvedev@jetbrains.com>
Mon, 13 Sep 2010 13:14:35 +0000 (17:14 +0400)
committerMaxim Medvedev <maxim.medvedev@jetbrains.com>
Mon, 13 Sep 2010 13:17:18 +0000 (17:17 +0400)
plugins/groovy/src/org/jetbrains/plugins/groovy/refactoring/move/MoveGroovyClassHandler.java
plugins/groovy/src/org/jetbrains/plugins/groovy/refactoring/move/MoveGroovyClassUtil.java

index 3991fe8ba11c1612de9fc5e32a2a9a2a7be9be34..16458a4934ee49243a109c64a3e25e967c39ad01 100644 (file)
@@ -25,14 +25,13 @@ import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 import org.jetbrains.plugins.groovy.GroovyFileType;
 import org.jetbrains.plugins.groovy.lang.psi.GroovyFile;
-import org.jetbrains.plugins.groovy.lang.psi.api.statements.typedef.GrTypeDefinition;
 
 /**
  * @author Maxim.Medvedev
  */
 public class MoveGroovyClassHandler implements MoveClassHandler {
   public PsiClass doMoveClass(@NotNull PsiClass aClass, @NotNull PsiDirectory moveDestination) throws IncorrectOperationException {
-    return MoveGroovyClassUtil.moveGroovyClass((GrTypeDefinition)aClass, moveDestination);
+    return MoveGroovyClassUtil.moveGroovyClass(aClass, moveDestination);
   }
 
   @Nullable
index 0d8e6c7c2ca1b8fa7e321ef47a5ba2a70f706676..4d0a9aff5bdddbefc39899b1690a141cbe59bd1d 100644 (file)
@@ -40,7 +40,7 @@ public class MoveGroovyClassUtil {
   }
 
   @Nullable
-  public static PsiClass moveGroovyClass(@NotNull GrTypeDefinition aClass, @NotNull PsiDirectory moveDestination) {
+  public static PsiClass moveGroovyClass(@NotNull PsiClass aClass, @NotNull PsiDirectory moveDestination) {
     if (!aClass.getLanguage().equals(GroovyFileType.GROOVY_LANGUAGE)) return null;
     PsiFile file = aClass.getContainingFile();
     final PsiPackage newPackage = JavaDirectoryService.getInstance().getPackage(moveDestination);