@Override
  public void invoke(@NotNull final Project project, PsiElement @NotNull [] elements, DataContext dataContext) {
    if (elements.length != 1) return;

    PsiClass subClass = (PsiClass)elements[0];
    List<PsiClass> basesList = RefactoringHierarchyUtil.createBasesList(subClass, true, true);
    if (basesList.isEmpty()) {
      String message = RefactoringBundle.getCannotRefactorMessage(JavaRefactoringBundle.message("interface.does.not.have.base.interfaces", subClass.getQualifiedName()));
      Editor editor = CommonDataKeys.EDITOR.getData(dataContext);
      CommonRefactoringUtil.showErrorHint(project, editor, message, getRefactoringName(), HelpID.TURN_REFS_TO_SUPER);
      return;
    }

    new TurnRefsToSuperDialog(project, subClass, basesList).show();
  }
@Override
  public void invoke(@NotNull final Project project, PsiElement @NotNull [] elements, DataContext dataContext)