void () { TableUtil.stopEditing(myTable); final String className; final String packageName; if (myCreateBuilderClassRadioButton.isSelected()) { className = myNewClassName.getText().trim(); packageName = myPackageTextField.getText().trim(); } else { final String fqName = myExistentClassTF.getText().trim(); className = StringUtil.getShortName(fqName); packageName = StringUtil.getPackageName(fqName); final PsiClass builderClass = JavaPsiFacade.getInstance(myProject).findClass(StringUtil.getQualifiedName(packageName, className), GlobalSearchScope.projectScope(myProject)); if (builderClass != null && !CommonRefactoringUtil.checkReadOnlyStatus(myProject, builderClass)) return; } invokeRefactoring(new ReplaceConstructorWithBuilderProcessor(getProject(), myConstructors, myParametersMap, className, packageName, ((DestinationFolderComboBox)myDestinationCb).selectDirectory(new PackageWrapper(myConstructors[0].getManager(), packageName), false), myCreateBuilderClassRadioButton.isSelected())); }