boolean (PsiClass targetClass) { if (targetClass.isInterface() && !PsiUtil.isLanguageLevel8OrHigher(targetClass)) { final Project project = getProject(); if (ClassInheritorsSearch.search(targetClass, false).findFirst() == null) { final String message = JavaRefactoringBundle.message("0.is.an.interface.that.has.no.implementing.classes", DescriptiveNameUtil .getDescriptiveName(targetClass)); Messages.showErrorDialog(project, message, myRefactoringName); return false; } final String message = JavaRefactoringBundle.message("0.is.an.interface.method.implementation.will.be.added.to.all.directly.implementing.classes", DescriptiveNameUtil.getDescriptiveName(targetClass)); final int result = Messages.showYesNoDialog(project, message, myRefactoringName, Messages.getQuestionIcon()); if (result != Messages.YES) return false; } return true; }