[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] classes deleted from provisional API

I'm not an expert on the p2ql, but I'll give this a shot. (Thomas Hallgren feel free to jump in here).

From bottom to top
1. Yes, the collector was removed.  We are trying to separated the notation of "what you are querying" from "processing the results".  Queries are for querying, collectors were for processing.  If you had "query logic" in the collector, it should be moved to an appropriate query. What in particular did you have in the collector?

2. IUPropertyQuery. We're not sure what's going to happen to this yet, that's why it's still internal.  But you should be able to use the p2ql for this.

 QLMatchQuery qlMatchQuery = new QLMatchQuery(IInstallableUnit.class, "properties['foo'] == 'true'");
This will match all IUs with a property key == foo, with a value == true.  Or, more generally:
QLMatchQuery qlMatchQuery = new QLMatchQuery(IInstallableUnit.class, "properties[$0] == $1", new String[] {"foo", "true"});

Notice the use of parameters here.

3. CapabilityQuery. This one I'm not so sure about. Pascal was doing some work using Expressions & queries to compute capabilities.  Pascal, can you help out here?


On Fri, Jan 22, 2010 at 2:18 PM, Thomas M Houser <tmhouser@xxxxxxxxxx> wrote:

We are using following classes in the Eclipse 3.5 provisional API that, in 3.6, are now either missing or have been made internal:

CapabilityQuery (missing)
IUPropertyQuery (internal)

These seemed generally useful.  Any reason why these are gone?  What should we use instead?

Also we have several customized Collector subclasses.  Since IQueryable.query() no longer has a Collector parameter, I assume that means we should move the customized Collector code into a customized query subclass.  Correct?

p2-dev mailing list

R. Ian Bull | EclipseSource Victoria | +1 250 477 7484
http://eclipsesource.com | http://twitter.com/eclipsesource