Querying for installed features [message #1404648] |
Mon, 04 August 2014 12:37  |
Eclipse User |
|
|
|
Hello,
I want to search for specific features installed in my product. Reading about p2 Query language I did the following:
IQueryable<IInstallableUnit> queryable = ((IProfileRegistry) provisioningSession.getProvisioningAgent().getService(IProfileRegistry.SERVICE_NAME)).getProfile( profileId );
queryable.query(new IQuery<IInstallableUnit>() {
public IQueryResult<IInstallableUnit> perform(Iterator<IInstallableUnit> iterator) {
while(iterator.hasNext()){
IInstallableUnit next = iterator.next();
System.out.println(next.toString());
}
return null;
}
public IExpression getExpression() {
return null;
}
}, null);
This returns what looks like plugins that are running, what should I use to get features in my product. I am specifically interested in those listed in "Installed Software" section of Installation Details dialog.
Also, when constructing an actual query, how can add regular expression to the query, something like:
QueryUtil.createMatchQuery(select(x | x.id == $0)", "org.eclipse.*");
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.26107 seconds