void (@NotNull PsiClass subClass, @NotNull PsiClass superClass) { String superClassName = superClass.getName(); String className = (subClass).getName(); String createdString = superClass.isInterface() ? JavaRefactoringBundle.message("interface.has.been.successfully.created", superClassName) : JavaRefactoringBundle.message("class.has.been.successfully.created", superClassName); String message = createdString + "\n" + JavaRefactoringBundle.message("use.super.references.prompt", ApplicationNamesInfo.getInstance().getProductName(), className, superClassName); YesNoPreviewUsagesDialog dialog = new YesNoPreviewUsagesDialog( JavaRefactoringBundle.message("analyze.and.replace.usages"), message, JavaRefactoringSettings.getInstance().EXTRACT_INTERFACE_PREVIEW_USAGES, /*HelpID.TURN_REFS_TO_SUPER*/null, subClass.getProject()); if (dialog.showAndGet()) { final boolean isPreviewUsages = dialog.isPreviewUsages(); JavaRefactoringSettings.getInstance().EXTRACT_INTERFACE_PREVIEW_USAGES = isPreviewUsages; TurnRefsToSuperProcessor processor = new TurnRefsToSuperProcessor(subClass.getProject(), subClass, superClass, false); processor.setPreviewUsages(isPreviewUsages); processor.run(); } }