Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » [p2] Querying Babel p2 repository for language packs
[p2] Querying Babel p2 repository for language packs [message #1717216] Thu, 10 December 2015 19:31
Wayne Beaton is currently offline Wayne BeatonFriend
Messages: 554
Registered: December 2017
Senior Member
I'm writing a little plug-in that needs to query the Babel p2 repository for language packs.

I've taken the approach of walking through the installed features and building a potential bundle id by suffixing the feature id to match the expected corresponding Babel feature. (e.g. featureId + ".nl_de" for German). I use the value to build an IQuery using the QueryUtil.createUIQuery and then mash the collection of them together as a compound query. This seems to find the features that I'm looking for.

e.g.

List<IQuery<IInstallableUnit>> featureQueries = new ArrayList<IQuery<IInstallableUnit>>();
featureQueries.add(QueryUtil.createIUQuery("org.eclipse.something.nl_de"));
featureQueries.add(QueryUtil.createIUQuery("org.eclipse.something.else.nl_de"));
...
IQuery<IInstallableUnit> query = QueryUtil.createCompoundQuery(featureQueries, false);

First question... Is this the right way to do this?

Second question... how do I do a more complex query when there are regional translations available (e.g. ".nl_fr_FR" vs. ".nl_fr_CA"). i.e. how do you form a p2 query that prefers "fr_CA" over the "fr"?
Previous Topic:Register Servlet as Service vs using equinox servlet registry
Next Topic:Runtime arguments to verify digitally signed bundles
Goto Forum:
  


Current Time: Thu Oct 03 17:42:02 GMT 2024

Powered by FUDForum. Page generated in 0.03992 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top