ReplaceConfiguration (Configuration template) { final ReplaceConfiguration result = template == null ? new ReplaceConfiguration(SSRBundle.message("new.template.defaultname"), SSRBundle.message("user.defined.category")) : new ReplaceConfiguration(template); if (!myEditConfigOnly) { final MatchOptions matchOptions = result.getMatchOptions(); matchOptions.setSearchInjectedCode(myInjected.isSelected()); matchOptions.setCaseSensitiveMatch(myMatchCase.isSelected()); final ReplaceOptions replaceOptions = result.getReplaceOptions(); replaceOptions.setToShortenFQN(myShortenFqn.isSelected()); replaceOptions.setToUseStaticImport(myStaticImport.isSelected()); replaceOptions.setToReformatAccordingToStyle(myReformat.isSelected()); } return result; }