Reputation: 390
The jface.Action class has a setActionDefinitionId method. I would like to know what this is used for.
The following is from the setAccelerator javadoc:
If you set an accelerator using this method, then it will not work in the workbench if it conflicts any existing key binding, or if there is a different key binding defined for this action's definition id. The definition id should be used instead -- referring to the command in the workbench from which the key binding should be retrieved.
I couldn't find any relevant information about the definition id anywhere I looked.
Hope someone can help.
Upvotes: 1
Views: 480
Reputation: 1042
The action definition ID is used to bind an action to a command. If the ID of the command is set as action definition ID of the action, the action is regarded as a handler for the command.
This is useful if you want to migrate your Eclipse application from using actions to using the command framework. It allows to do a smooth migration because you can reuse parts of your existing code without having to convert all actions to command handlers.
See http://wiki.eclipse.org/FAQ_How_do_I_associate_an_action_with_a_command%3F for more information.
Upvotes: 2