Bug 7152 - runWithEvent support for contributed actions
Summary: runWithEvent support for contributed actions
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nick Edgar CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-12-20 17:16 EST by Joe Szurszewski CLA
Modified: 2001-12-21 11:05 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 Joe Szurszewski CLA 2001-12-20 17:16:32 EST
I would like to take advantage of the new support in IAction for the 
runWithEvent(Event) method.  I want to do this so I can access the state 
mask of the event, and determine if a key like Shift or Ctrl was held 
down when the action was invoked.  The problem is that since my action is 
a contributed drop down action on the toolbar, my overridden version of 
runWithEvent is never called.  The action contribution item's action is a 
WWinPluginPulldown, and this class does not override runWithEvent, but 
just uses the default supplied by Action, which just calls run().  The 
run() method defined by PluginPulldown creates the delegate and calls 
run(IAction) on it.  Thus, the runWithEvent() I've defined in the delegate 
gets ignored.  I realize this support is new and subject to change, but 
couldn't WWinPluginPulldown override runWithEvent to call runWithEvent on 
the delegate, passing in the event?  I haven't tried it, but I suspect that 
regular (non-drop down) contributed actions might have the same issue.
Comment 1 Nick Edgar CLA 2001-12-21 11:05:23 EST
Added org.eclipse.ui.IActionDelegate2, which adds run(IAction, Event).
This gets called instead of run(IAction) if the delegate implements 
IActionDelegate2.
This change applies to all action delegates.