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

Bug 136090

Summary: Please make KeyHandler call runWithEvent() on registered actions instead of run().
Product: [Tools] GEF Reporter: Thomas Maier <Thomas.Maier>
Component: GEF-Legacy GEF (MVC)Assignee: gef-inbox <gef-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: nyssen, Thomas.Maier
Version: 3.1.1   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Thomas Maier CLA 2006-04-11 07:35:35 EDT
It would be nice if KeyHandler called runWithEvent() on its registered actions.  Currently it calls run().

Use case scenario: I have bound actions that select tools to keys.  Some keys are bound to an action that cycles through a list of tools (e.g. the various marquee flavours).  If my action could distinguish which key activated it, implementing forward and backward cycling within the same action would be easy (right now it only cycles forward).
Comment 1 Alexander Nyßen CLA 2011-02-16 15:38:49 EST
Unfortunately, KeyHandler does not have access to the triggering untyped SWT events when processing typed KeyEvents. As such, all we could do (without changing the API) is to construct a new untyped SWT event locally (from the information contained within KeyEvent) and pass this into runWithEvent(). However, I think this would not seem to be appropriate, as IAction#runWithEvent() seems to expect the triggering SWT event itself (and not a copy). As such, resolving as WONTFIX.