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

Bug 80702

Summary: [Contributions] Support notion of default handler on RetargetAction
Product: [Eclipse Project] Platform Reporter: John Arthorne <john.arthorne>
Component: UIAssignee: Douglas Pollock <douglas.pollock>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: jean-michel_lemieux, n.a.edgar
Version: 3.1   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 77871    
Attachments:
Description Flags
Patch to RetargetAction.java none

Description John Arthorne CLA 2004-12-10 11:46:22 EST
Build: I20041207

When the active part does not hook a handler for a RetargetAction, the action
becomes disabled.  It would be useful if a "default handler" could be installed
on RetargetAction for the case where the active part decides not to hook one. 
Such a default handler may infer its selection from the active selection or
editor input, so still needs to be notified when the active part changes.

In bug 77871 I wrote a simple subclass of RetargetAction that adds the ability
to supply a default handler.  This is a very simple extension, so it would be
nice to fold it directly into RetargetAction so all subclasses can use it.

See bug 77871 for further discussion and an example of where this is useful.
Comment 1 John Arthorne CLA 2004-12-10 12:16:21 EST
Created attachment 16520 [details]
Patch to RetargetAction.java

Sample implementation of default handler support, tested with case in bug
77871.
Comment 2 Douglas Pollock CLA 2004-12-14 12:37:00 EST
There are no plans to add further functionality to RetargetAction.  Actions 
will become deprecated.  Commands and a contributions mechanism based on 
commands will replace them. 
 
Please see 
"http://dev.eclipse.org/viewcvs/index.cgi/~checkout~/platform-ui-home/R3_1/dynamic_teams/dynamic_teams.html#actionContributions" 
for more information.