How can a handler learn what is its command
Is it开发者_JS百科 possible for an eclipse command handler to get the command and key sequence it is associated with?
I have a group of command handlers which all extend a common ancestor. This ancestor would have some generic methods which depends only on the command and key sequence. Is it possible for these generic methods to get hold on the command which is associated with a derived handler when they are called from a derived handler?
Thanks, Toba
There is no API for what you are asking. Your derived class should pass on the information to the super class about which command its going to handle.
And don't depend on the keybindings, as the user can change it to any other keybinding.
精彩评论