Hi Thomas Thanks for the great support! These examples work fine for me.
Best regards Rado From: [email protected] [mailto:[email protected]] On Behalf Of Thomas Hallgren Sent: Tuesday, February 01, 2011 4:20 PM To: [email protected] Subject: Re: [p2-dev] p2ql: query parent ius Yes, of course. That method was removed, sorry. The only way to check if a requirement has a specific namespace is to write an IU that satisfies all requirements with that namespace, regardless of name and version. You should be able to write something like: IInstallableUnit myPackageMatchingIU = new InstallableUnit() { @Override public boolean satisfies(IRequirement r) { return r instanceof RequiredCapability && "java.package".equals(((RequiredCapability)r).getNamespace()); } }; and then use that UI in the query like this: QueryUtil.createQuery("select(x | x.requirements.exists(r | $0 ~= r && exists(y | y ~= r)))", myPackageMatchingIU) Looking at your example, I think I misinterpreted your question. I thought of a "known installable unit" as "some unit in a known queried set". I guess you already have an explicitly known unit. In that case, the query should be written: QueryUtil.createMatchQuery("requirements.exists(r | $0 ~= r && $1 ~= r))", myPackageMatchingIU, myKnownIU) Dropping the need for the specific "java.package" requirement makes it even simpler. Now you don't need the special IU. Just write: QueryUtil.createMatchQuery("requirements.exists(r | $1 ~= r)", myKnownIU) HTH, Thomas Hallgren On 2011-02-01 14:27, Thomas Hallgren wrote: Hi Ivanov, How about this: "select(x | x.requirements.exists(r | r.namespace = "java.package" && exists(y | y ~= r)))" HTH, Thomas Hallgren On 2011-02-01 12:58, Ivanov, Radoslav wrote: Hello I am writing with regards to p2QL. I would like to select all installable units that require any package provided by an known installable unit. I would be grateful if you could provide help for this query. Thanks Rado _______________________________________________ p2-dev mailing list [email protected]<mailto:[email protected]> https://dev.eclipse.org/mailman/listinfo/p2-dev _______________________________________________ p2-dev mailing list [email protected]<mailto:[email protected]> https://dev.eclipse.org/mailman/listinfo/p2-dev
_______________________________________________ p2-dev mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/p2-dev
