if (newFTS == null) {
ErrorManager.get().displayError(Messages.StyleEditor_error, Messages.StyleEditor_theme_failure);
return;
} else {
//set the FeatureTypeName to the current layer name
newFTS.featureTypeNames().clear();
newFTS.featureTypeNames().add( new NameImpl( SLDs.GENERIC_FEATURE_TYPENAME ));
//get the style
Style style = getStyle();
//ensure the style has an SLD
if (style == null) throw new RuntimeException("Style is null"); //$NON-NLS-1$