@Override
  protected boolean preprocessUsages(@NotNull Ref<UsageInfo[]> refUsages) {
    UsageInfo[] usages = refUsages.get();
    List<UsageInfo> filtered = new ArrayList<>();
    for (UsageInfo usage : usages) {
      if (usage instanceof TurnToSuperReferenceUsageInfo) {
        filtered.add(usage);
      }
    }

    if (myClass.getName() != null) {
      final AutomaticVariableRenamer variableRenamer = new AutomaticVariableRenamer(myClass, mySuperClassName, filtered);
      if (!ApplicationManager.getApplication().isUnitTestMode() &&
          variableRenamer.hasAnythingToRename()) {
        final AutomaticRenamingDialog dialog = new AutomaticRenamingDialog(myProject, variableRenamer);
        if (!dialog.showAndGet()) {
          return false;
        }

        final List<PsiNamedElement> variables = variableRenamer.getElements();
        for (final PsiNamedElement namedElement : variables) {
          final PsiVariable variable = (PsiVariable)namedElement;
          final SmartPsiElementPointer pointer = SmartPointerManager.getInstance(myProject).createSmartPsiElementPointer(variable);
          myVariablesRenames.put(pointer, variableRenamer.getNewName(variable));
        }

        Runnable runnable = () -> ApplicationManager.getApplication().runReadAction(() -> variableRenamer.findUsages(myVariablesUsages, false, false));

        if (!ProgressManager.getInstance()
          .runProcessWithProgressSynchronously(runnable, RefactoringBundle.message("searching.for.variables"), true, myProject)) {
          return false;
        }
      }
    }

    prepareSuccessful();
    return true;
  }
@Override
  protected boolean preprocessUsages(@NotNull Ref<UsageInfo[]> refUsages)