/**
  * Creates a new site feature instance with the same settings as the given source feature.
  *
  * @param model site model to create the feature from
  * @param sourceFeature the feature to copy settings out of
  * @return a new site feature instance
  * @throws CoreException
  */
 private ISiteFeature copySiteFeature(ISiteModel model, ISiteFeature sourceFeature)
     throws CoreException {
   ISiteFeature sfeature = model.getFactory().createFeature();
   sfeature.setId(sourceFeature.getId());
   sfeature.setVersion(sourceFeature.getVersion());
   sfeature.setURL(sourceFeature.getURL());
   sfeature.setOS(sourceFeature.getOS());
   sfeature.setWS(sourceFeature.getWS());
   sfeature.setArch(sourceFeature.getArch());
   sfeature.setNL(sourceFeature.getNL());
   sfeature.setIsPatch(sourceFeature.isPatch());
   return sfeature;
 }
 public static ISiteFeature createSiteFeature(ISiteModel model, IFeatureModel featureModel)
     throws CoreException {
   IFeature feature = featureModel.getFeature();
   ISiteFeature sfeature = model.getFactory().createFeature();
   sfeature.setId(feature.getId());
   sfeature.setVersion(feature.getVersion());
   // sfeature.setURL(model.getBuildModel().getSiteBuild().getFeatureLocation()
   // + "/" + feature.getId() + "_" + feature.getVersion() + ".jar");
   // //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
   sfeature.setURL(
       "features/"
           + feature.getId()
           + "_"
           + formatVersion(feature.getVersion())
           + ".jar"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
   sfeature.setOS(feature.getOS());
   sfeature.setWS(feature.getWS());
   sfeature.setArch(feature.getArch());
   sfeature.setNL(feature.getNL());
   sfeature.setIsPatch(isFeaturePatch(feature));
   return sfeature;
 }