use of org.eclipse.equinox.internal.p2.updatesite.SiteFeature in project tycho by eclipse.
the class AbstractSiteDependenciesAction method getRequiredCapabilities.
@Override
protected Set<IRequirement> getRequiredCapabilities() {
Set<IRequirement> required = new LinkedHashSet<>();
for (SiteFeature feature : getSiteModel().getFeatures()) {
// $NON-NLS-1$
String id = feature.getFeatureIdentifier() + FEATURE_GROUP_IU_SUFFIX;
VersionRange range = getVersionRange(createVersion(feature.getFeatureVersion()));
String filter = new TargetEnvironment(feature.getOS(), feature.getWS(), feature.getOSArch()).toFilterExpression();
// boolean optional = feature.isOptional();
required.add(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, id, range, InstallableUnit.parseFilter(filter), false, false));
}
for (SiteBundle bundle : getSiteModel().getBundles()) {
String id = bundle.getBundleIdentifier();
VersionRange range = getVersionRange(createVersion(bundle.getBundleVersion()));
String filter = new TargetEnvironment(bundle.getOS(), bundle.getWS(), bundle.getOSArch()).toFilterExpression();
// boolean optional = feature.isOptional();
required.add(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, id, range, InstallableUnit.parseFilter(filter), false, false));
}
for (SiteIU iu : getSiteModel().getIUs()) {
IRequirement requirement = getRequirement(iu);
if (requirement != null)
required.add(requirement);
}
return required;
}
Aggregations