Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ui-dev] Actionbar contributor doesn't have access to keybinding service


RetargetActions are perfect most of the time, for more reasons than just keybindings.  But some actions might not be associated with the editor instance.  For example, a global preference shared accross all instances of the same editor.  If "Show Source of Selected Element Only" were a global toggle (I wish!), it would probably not be a retarget action.



Kai-Uwe Maetzel <maetzel@xxxxxxx>
Sent by: platform-ui-dev-admin@xxxxxxxxxxx

03/11/2003 10:58 AM
Please respond to platform-ui-dev

       
        To:        platform-ui-dev@xxxxxxxxxxx
        cc:        
        Subject:        Re: [platform-ui-dev] Actionbar contributor doesn't have  access to keybinding service



The way I found around that is to let the editor action bar contributor place retarget actions into the tool/menu bar that are bound by the actions of the active editor. This reduces the responsibility of the editor action bar contributor from contributing the "real" actions to defining the structure of the action contribution.

Kai


At 10:39 AM 3/11/2003 -0500, you wrote:

I noticed that an EditorPart can get to the keybinding service via IWorkbenchPartSite.getKeybindingService().   But, an EditorActionBarContributor cannot obtain the keybinding service.  Is this intentional?  How is the contributor supposed to register an action that it places on the menu?  Or, maybe it doesn't need to.

Currently, I am not registering my action that the contributor places on the menubar, but I am setting the definition ID.  The result is that the accelerator is displayed for free, but the accelerator doesn't work.


Randy Hudson



Back to the top