boolean (AutomaticRenamer automaticVariableRenamer) { if (!RefactoringSettings.getInstance().RENAME_SHOW_AUTOMATIC_RENAMING_DIALOG) return false; if (ApplicationManager.getApplication().isUnitTestMode()) { for (PsiNamedElement element : automaticVariableRenamer.getElements()) { automaticVariableRenamer.setRename(element, automaticVariableRenamer.getNewName(element)); } return true; } final AutomaticRenamingDialog dialog = new AutomaticRenamingDialog(myProject, automaticVariableRenamer); return dialog.showAndGet(); }