Skip to content

Commit

Permalink
Changed query for DS discovery to include ds.models.r feature
Browse files Browse the repository at this point in the history
  • Loading branch information
goglepox committed Jun 21, 2012
1 parent 1909992 commit e104407
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -32,8 +32,8 @@ protected void queryInstallableUnits( SubMonitor monitor,
monitor.setWorkRemaining(repositories.size());
for (final IMetadataRepository repository : repositories) {
checkCancelled(monitor);
Object[] features = new Object[] { "net.bioclipse.ds.models_feature.feature.group",
"net.bioclipse.ds.models.r_feature.feature.group"};
Object[] features = new Object[] { "net.bioclipse.ds.models_feature.feature.group" };// ,"net.bioclipse.ds.models.r_feature.feature.group"
// };
IQuery<IInstallableUnit> cQuery = QueryUtil
.createQuery( "select( iu | $0.exists( id | id == iu.id)) ",
new Object[]{features} );
Expand All @@ -55,10 +55,10 @@ protected void queryInstallableUnits( SubMonitor monitor,
}
logger.debug("Found features: "+sb.toString());
}
IInstallableUnit iu = cResult.iterator().next();
// IInstallableUnit iu = cResult.iterator().next();

IQuery<IInstallableUnit> query = QueryUtil
.createQuery( "select( iu | $0.collect( su | su.requirements).flatten().exists( rc | iu ~= rc) && iu.providedCapabilities.exists( pc | pc.namespace == 'org.eclipse.equinox.p2.eclipse.type' && pc.name == 'bundle'))", new Object[] { resultIUnits.toArray()} ); //$NON-NLS-1$
.createQuery( "select( iu | ( $0.collect( su | su.requirements).flatten().exists( rc | iu ~= rc) && iu.providedCapabilities.exists( pc | pc.namespace == 'org.eclipse.equinox.p2.eclipse.type' && pc.name == 'bundle') ) || iu.id == 'net.bioclipse.ds.models.r_feature.feature.group' )", new Object[] { resultIUnits.toArray() } ); //$NON-NLS-1$
IQueryResult<IInstallableUnit> result = repository.query(query, monitor.newChild(1));
for (Iterator<IInstallableUnit> iter = result.iterator(); iter.hasNext();) {
process(repository, iter.next());
Expand Down

0 comments on commit e104407

Please sign in to comment.