use of org.eclipse.equinox.p2.metadata.IVersionedId in project tycho by eclipse.
the class ModuleMetadataRepositoryTest method unitsIn.
private static List<IVersionedId> unitsIn(IMetadataRepository repo) {
IQueryResult<IInstallableUnit> units = repo.query(QueryUtil.ALL_UNITS, null);
List<IVersionedId> unitIds = new ArrayList<>();
for (Iterator<IInstallableUnit> unitIterator = units.iterator(); unitIterator.hasNext(); ) {
IInstallableUnit unit = unitIterator.next();
VersionedId unitId = new VersionedId(unit.getId(), unit.getVersion());
unitIds.add(unitId);
}
return unitIds;
}
use of org.eclipse.equinox.p2.metadata.IVersionedId in project tycho by eclipse.
the class ProductDependenciesAction method getRequiredCapabilities.
@Override
protected Set<IRequirement> getRequiredCapabilities() {
Set<IRequirement> required = new LinkedHashSet<>();
if (product.useFeatures()) {
for (IVersionedId feature : product.getFeatures()) {
// $NON-NLS-1$
String id = feature.getId() + FEATURE_GROUP_IU_SUFFIX;
Version version = feature.getVersion();
addRequiredCapability(required, id, version, null, false);
}
} else {
for (FeatureEntry plugin : ((ProductFile) product).getProductEntries()) {
addRequiredCapability(required, plugin.getId(), Version.parseVersion(plugin.getVersion()), null, true);
}
}
if (product.includeLaunchers()) {
addRequiredCapability(required, "org.eclipse.equinox.executable.feature.group", null, null, false);
}
return required;
}
use of org.eclipse.equinox.p2.metadata.IVersionedId in project tycho by eclipse.
the class ModuleMetadataRepositoryTest method createIUs.
private static List<IInstallableUnit> createIUs(IVersionedId... unitIds) {
List<IInstallableUnit> result = new ArrayList<>();
for (IVersionedId unitId : unitIds) {
InstallableUnitDescription iuDescr = new InstallableUnitDescription();
iuDescr.setId(unitId.getId());
iuDescr.setVersion(unitId.getVersion());
result.add(MetadataFactory.createInstallableUnit(iuDescr));
}
return result;
}
Aggregations