Bug 59591 - Need shortcuts to certain queries through context menu actions
Summary: Need shortcuts to certain queries through context menu actions
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: CME (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Matt Chapman CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-22 04:15 EDT by Andrew Clement CLA
Modified: 2004-05-28 08:37 EDT (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 Andrew Clement CLA 2004-04-22 04:15:01 EDT
It should be possible to provide shortcuts to some queries by contributing 
context menu actions across the workbench.  For example, rather than entering 
the query:

relationship implements(*,interface Operator)

I could right click the interface 'Operator' (anywhere I see it? Or maybe just 
in package/concern explorer?) and get a new menu option

...
...
CMEQuery  >
...

Following the CMEQuery option I get a submenu which would contain (probably 
amongst other options) something like "Find implementors"

By selecting that, the query view would be updated and the query evaluated.

Things to consider:
- How do we determine the scope for the query?
- What is the set of queries that make sensible shortcuts for resources?
- what else?
Comment 1 Matt Chapman CLA 2004-05-28 08:37:05 EDT
As sent to cme-dev:

This is still in progress, but I've checked what I have so far into CVS so
people can try it out for themselves. There is now a "Search for" entry on the
popup menu that appears when you right-click an element in the concern explorer
view, with a few sample queries in the submenu.

The queries are currently stored in the CMEPluginResources.properties file under
org.eclipse.cme.ui.core.resources (this will probably change in the future). The
"QueryList" property defines the list of queries to include. Everything in this
list has "Context_" added to the front, and either "_name" or "_query" added to
the end, to get the name of the property which contains either the name to give
the query, or the query itself, respectively. The query strings contain "%s",
which is replaced by the name of the selected concern model element.

Issues and remaining items include:

- Names might not be unique in the concern model, so the generated queries may
return more results than expected
- The queries appear on all elements in the explorer which may not always be
appropriate
- There is no way to set scope yet - the workspace is always the scope used
- The query menu doesn't yet appear anywhere else, such as in the search results
view
- There are no "call" based queries as yet - will probably need to be able to
set the scope for these

Please send me (or just check in) any useful queries you define, or any other
feedback.