private static void invoke(@NotNull Project project,
                             PsiElement @NotNull [] roots,
                             @Nullable Editor editor) {
    if (Util.canBeMigrated(roots)) {
      TypeMigrationDialog dialog = new TypeMigrationDialog.SingleElement(project, roots);
      dialog.show();
      return;
    }

    CommonRefactoringUtil.showErrorHint(project, editor, JavaRefactoringBundle.message("only.fields.variables.of.methods.of.valid.type.can.be.considered"),
                                   JavaRefactoringBundle.message("unable.to.start.type.migration"), null);

  }
private static void invoke(@NotNull Project project,
                             PsiElement @NotNull [] roots,
                             @Nullable Editor editor)