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

Bug 95588

Summary: [Contributions] Global handlers, objectContributions and selection determination for resources
Product: [Eclipse Project] Platform Reporter: Michael Valenta <Michael.Valenta>
Component: UIAssignee: Paul Webster <pwebster>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P5 Keywords: helpwanted
Version: 3.1   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Michael Valenta CLA 2005-05-17 11:48:52 EDT
When providing a selection to popup menus that are contributed to IResource or 
ResourceMapping with adaptable set to true, the workbench has some logic (in 
LegacyResourceSupport), for determining the selection that should be provided 
to the registered action delegate. This logic ensures that the selection 
adapts to the desired classes or interfaces and also adapts the seleciton to 
these classes and provides them to the action delegate (which is all good).

The problem is that it is reasonable to expect a tool to use these same 
actions as handlers for global actions. We do this for CVS where we have a 
main menu that contains the commonly used commands. The problem is that the 
workbench does not adapt the selection in these cases so it is left to the 
action to duplicate the logic that the workbench uses for popup menus to 
translate the selection appropriatly. The logic to do the translation is 
complicated enough to warrant API somewhere that allows clients to make a 
single call to get the same translation.
Comment 1 Michael Van Meekeren CLA 2006-04-21 13:56:23 EDT
Moving Dougs bugs
Comment 2 Paul Webster CLA 2007-04-05 19:04:20 EDT
Assigning to component owner
PW
Comment 3 Michael Valenta CLA 2007-06-21 11:53:12 EDT
I don't think this is relevant anymore given the new menu story.