Bug 214645 - [prov] [query] shouldCollector.accept (and therefore Query.perform) take progress monitors?
Summary: [prov] [query] shouldCollector.accept (and therefore Query.perform) take pr...
Status: RESOLVED WONTFIX
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Incubator (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: equinox.incubator-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks:
 
Reported: 2008-01-08 12:51 EST by Susan McCourt CLA
Modified: 2008-01-10 16:18 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Susan McCourt CLA 2008-01-08 12:51:34 EST
The Collector concept in the query API is there to allow clients to do further scoping/checking of query results when an object matches a query.  I'm wondering if Collector.accept should have a progress monitor argument.  There is one passed into the query, and perhaps it could be passed through to the perform/accept?

My case is admittedly a bit weird.  I have a collector that is actually performing a secondary query on the result of the original query.  And so it has no progress monitor to pass to its secondary query.  

The concrete example is that I am querying a metadata repository manager for all public repos, and as I accept each repo, I load it and get all of its categories.
Comment 1 John Arthorne CLA 2008-01-09 16:37:01 EST
Your usage seems a bit odd. Couldn't you just perform two queries - one query to get the list of repositories, and then a second query on each of the repositories to get the categories?  If a collector were to do really long running work, the query would have no way to know how long it is... how many child ticks do I allocate to the collector if it may be just adding an item to a list, or it may be performing arbitrary long running work?
Comment 2 Susan McCourt CLA 2008-01-09 18:10:08 EST
Because of the call chain/code structure, performing two separate queries wasn't going to work.  But...I ended up restructuring some model elements for other reasons, and in the end, this scenario wasn't needed.  (I meant to update this bug to let you know...)

So if you think it doesn't really make sense, you can close this.
Comment 3 John Arthorne CLA 2008-01-10 16:18:43 EST
Ok, I'd like to keep this API as simple as possible, and adding progress monitors for the rare case it may be needed just creates work for all callers.