@Override
  public @NotNull IntentionPreviewInfo generatePreview(@NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file) {
    final GrTypeDefinition containingClass = PsiTreeUtil.getParentOfType(myClass, GrTypeDefinition.class);
    PsiNamedElement target;
    if (containingClass != null) {
      target = containingClass;
    }
    else {
      target = myClass.getContainingFile();
    }
    return IntentionPreviewInfo.movePsi(myClass, target);
  }
@Override
  public @NotNull IntentionPreviewInfo generatePreview(@NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file)