Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 335047 - QueryBrowser misses the copy queries
Summary: QueryBrowser misses the copy queries
Status: RESOLVED FIXED
Alias: None
Product: MAT
Classification: Tools
Component: GUI (show other bugs)
Version: 1.1   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Andrew Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-21 14:11 EST by Andrew Johnson CLA
Modified: 2011-02-05 13:47 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Johnson CLA 2011-01-21 14:11:50 EST
The query browser doesn't list the copy queries.

These queries have IContextObject arguments.

The problem is to do with whether the query accept the given context (which has most of the arguments) and the whether the policy is suitable. The policy holds the selection and so the IContextObjects etc. and the selected heap objects.

I don't think queries that need a IContextObjectSet are properly filtered either

For a pop-up menu or search on selected row(s):
only queries needing heap objects or context objects (rows) should be shown (i.e. the query should be affected by the selection of items)
if the query requires IContextObjectSet then all the rows should be of that type

For a menu from the tool bar
queries that require a context object should not appear
queries that require heap objects can (the wizard can fill those in)

The solution is to use the policy everywhere, and have a default policy which doesn't provide any IContextObjects.
Comment 1 Andrew Johnson CLA 2011-01-21 18:46:00 EST
The UISnapshotQueryContext needs to say it has an IContextObjectSet then
the policy will determine if there is one.
Comment 2 Andrew Johnson CLA 2011-01-22 08:41:08 EST
I've made the changes, and also added some test queries to check that the right queries appear when a
IContextObject

IContextObject[]

IContextObjectSet

IContextObjectSet[]

are available.
Comment 3 Andrew Johnson CLA 2011-01-23 13:21:20 EST
I've updated the command line for the query browser so that the IObjectContext is filled in for the context browser, but not for the pop up browser.
Comment 4 Andrew Johnson CLA 2011-02-05 13:47:30 EST
The copy queries now appear in the context menus and the context query browser but not in the pop up menus.