Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-ui-dev] Re: keybinding problem


(sorry if this goes through twice; something weird going on with my email..)
hi jml, i answered this on the newsgroup for you this morning. here is the text:

A couple of points, including what you did wrong :)

For the various ways to create an action (you've used action sets in your
example), the 'key' to making a customizable key binding is:

1. Do not define the accelerator attribute in the action element. This
mechanism is now deprecated.
(you should remove yours)

2. Create an action definition id corresponding to the semantic meaning of
your action, if one doesn't exist already. Ideally, one would try and use
existing action definition id's if there are any that reasonably correspond
to your action.
(you have done this, but perhaps there is already a general 'cvs.commit'
action definition id which you could reuse)

3. Make sure you fill out the name and description attributes of the
actionDefinition element as well. These are used by customization UI's like
the key bindings UI to show the user a readable name for the action
definition (the name attribute, for instance, is used to populate the custom
action combo box in the key bindings UI.)
(you should add name="Commit to CVS" or the equivalent)

4. As for the main reason why your key binding is not working: for the
acceleratorSet, you need to set the configurationId and scopeId to existing
configurations and scopes. You have done this correctly for scopeId.
org.eclipse.ui.globalScope is one of the two scopes eclipse currently
defines. Your configuration, however, is not defined anywhere. You should
change this attribute's value to one of the two configurations eclipse
currently defines - i suggest
configurationId="org.eclipse.ui.defaultAcceleratorConfiguration".
(I strongly advise against adding your own configuration - this is meant for
people wanting to change the overall key bindings system as a whole)

Chris.

Back to the top