void () { final boolean useExistingClass = useExistingClassButton.isSelected(); final boolean createInnerClass = myCreateInnerClassButton.isSelected(); final String existingClassName = existingClassField.getText().trim(); final String className; final String packageName; if (useExistingClass) { className = StringUtil.getShortName(existingClassName); packageName = StringUtil.getPackageName(existingClassName); } else if (createInnerClass) { className = getInnerClassName(); packageName = ""; } else { className = getClassName(); packageName = getPackageName(); } invokeRefactoring( new WrapReturnValueProcessor(className, packageName, ((DestinationFolderComboBox)myDestinationCb).selectDirectory(new PackageWrapper(sourceMethod.getManager(), packageName), false), sourceMethod, useExistingClass, createInnerClass, (PsiField)myFieldsCombo.getSelectedItem())); }