Bug 293339 - [api][metadata] Review of the query package
Summary: [api][metadata] Review of the query package
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.5   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.6 M5   Edit
Assignee: Ian Bull CLA
QA Contact:
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks: 291763
  Show dependency tree
 
Reported: 2009-10-26 13:12 EDT by Pascal Rapicault CLA
Modified: 2010-01-11 19:09 EST (History)
1 user (show)

See Also:


Attachments
query patch (93.59 KB, patch)
2009-10-29 19:30 EDT, Ian Bull CLA
no flags Details | Diff
mylyn/context/zip (75.28 KB, application/octet-stream)
2009-10-29 19:30 EDT, Ian Bull CLA
no flags Details
Updated patch (127.63 KB, patch)
2009-11-02 17:21 EST, Ian Bull CLA
no flags Details | Diff
mylyn/context/zip (49.77 KB, application/octet-stream)
2009-11-02 17:22 EST, Ian Bull CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Rapicault CLA 2009-10-26 13:12:47 EDT
- Change Query to IQuery
- Why do we have getProperty() on this?
- Why do we need an id?
- MatchQuery: do we really want the indirection on QueryHelpers?
Comment 1 Ian Bull CLA 2009-10-29 19:30:39 EDT
Created attachment 150886 [details]
query patch

This patch addresses some of the concerns raised:

1. Renames Query to IQuery

2. getProperty:
This is so others can implement their own version of the Query for their repositories without linking to the actual query itself. You can get the id, and properties from the Query (reflectively) and implement your own "optimized" version.

3. getID
See #2.

4. The indirection is so we don't have to clone the implementation in all Abstract Query classes.  I have flagged the methods on QueryHelper as @noreference as nobody should ever call them. (In contrast, we could move the class to an internal package).

I have also added some docs to UpdateQuery since it did not have any.
Comment 2 Ian Bull CLA 2009-10-29 19:30:44 EDT
Created attachment 150887 [details]
mylyn/context/zip
Comment 3 Ian Bull CLA 2009-10-29 19:31:23 EDT
We still need @since tags.
Comment 4 Ian Bull CLA 2009-11-02 17:21:57 EST
Created attachment 151131 [details]
Updated patch

the previous patch did not apply, so I recreated it.
Comment 5 Ian Bull CLA 2009-11-02 17:22:02 EST
Created attachment 151132 [details]
mylyn/context/zip
Comment 6 Ian Bull CLA 2010-01-11 19:09:41 EST
This been released into the branch.