Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 293997

Summary: Create a NameQuery -- one that searches for IUs that match a specific name
Product: [Eclipse Project] Equinox Reporter: Ian Bull <irbull>
Component: p2Assignee: Thomas Hallgren <thomas>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: pascal, thomas
Version: unspecifiedKeywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug
Bug Depends on: 253203    
Bug Blocks:    

Description Ian Bull CLA 2009-11-02 16:48:41 EST
To help consumers of the p2 API search for IUs that match a particular name, we should provide a NameQuery.  The query should search look at IU Name property, but also remember to translate the name where appropriate.
Comment 1 Thomas Hallgren CLA 2010-04-01 02:50:21 EDT
A QL expression that covers full matching is this:

 translations['org.eclipse.equinox.p2.name'] ~= $0

Execute with argument:

 SimplePattern.compile('*' + name '*')

or if you want an explicit match:

 translations['org.eclipse.equinox.p2.name'] == $0

The built in translation support will keep a cache on the Queryable level. The query string should probably be assembled as:

 "translations['" + IInstallableUnit.PROP_NAME + "'] == $0"

or use two parameters, one for property key and another for the name to be matched.
Comment 2 Ian Bull CLA 2011-04-21 14:17:43 EDT
Yep, I was thinking that it might be nice to have something in QueryUtil (to quickly construct this type of query). I'm moving this out since that would be an API change at this point.
Comment 3 Thomas Watson CLA 2011-06-08 11:30:49 EDT
Move all 3.8 bugs to Juno.
Comment 4 Pascal Rapicault CLA 2011-06-10 21:50:28 EDT
Thomas could you please provide a patch for this in QueryUtil? That would be greatly appreciated. Thx.
Comment 5 Eclipse Genie CLA 2019-09-20 14:37:52 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.