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


In the same way that the window registers the built-in actions, it should also register actions added to the editor action bars, and manage them appropriately when opening/switching/closing editors.
This would not necessarily be done via the per-part keybinding service.

In 2.0, any editor actions that had an associated accelerator would get the accelerators.  Actually, this only worked for actions added to the menubar, not the toolbar.  It also was not done for view actions.
Since the preferred way to define accelerators in 2.1 is to use command ids and key bindings, the workbench should at least register editor actions added to the menubar.

We can consider whether we should also do so for editor actions added to the toolbar, and for view actions.  But the backwards-compatibility argument doesn't apply for these cases.

Nick



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

03/11/03 11:36 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



What kind of solution do you envision?

Each editor part may have its own key binding service. The contributor has to register a contributed action with the key binding service of each editor part that gets created. This could happen when an editor is set as the active editor for the first time.  Depending on the concrete implementation this could also imply that the contributor has to track the destruction of the editors in order to clean up.

This could be implemented with the current API but does not really sound attractive.

Thanks, Kai


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

Randy,

This should be done for you.  Please enter a PR.


Nick




Randy Hudson/Raleigh/IBM@IBMUS

Sent by: platform-ui-dev-admin@xxxxxxxxxxx


03/11/03 10:39 AM

Please respond to platform-ui-dev

       
       To:        platform-ui-dev@xxxxxxxxxxx

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





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