keybinding problem [message #274560] |
Mon, 25 October 2004 06:30  |
Eclipse User |
|
|
|
Originally posted by: nmoliveira.eid.pt
Hello
I'm trying to create a very simple plugin to make things uppercase and
lowercase. For that purpose, I extended the popupmenu extension point -
using the viewercontribution, which is working through the popupmenu new
item selection. However, I would like to use a key combination to activate
the action, so I extended the command extension point, defined a keybinding
for it and associated the action from the viewer contribution to this
command through the definitionId tag. Doesn't work! Am I forgeting something
? maybe some necessary programming step ?
Any help will be appreciated.
Nuno
|
|
|
|
|
Re: keybinding problem [message #275262 is a reply to message #275090] |
Fri, 05 November 2004 10:31  |
Eclipse User |
|
|
|
Originally posted by: douglas.pollock.magma.ca
By the way, what do you mean by not work? Do you mean the keyboard shortcut
doesn't appear beside the item in the pop-up menu? Do you mean that you
can't use the keyboard shortcut?
In "plugin.xml", you might to use this instead:
<keyBinding
commandId="pt.nuno.eclipse.plugintest3.command.textToUpperCase "
contextId="org.eclipse.ui.contexts.window"
keySequence="M1+B"
keyConfigurationId="org.eclipse.ui.defaultAcceleratorConfiguration ">
</keyBinding>
Also, try moving this line into the constructor of ToUpperCaseAction:
action.setActionDefinitionId("pt.nuno.eclipse.plugintest3.command.textToUpperCase ");
cheers,
d.
|
|
|
Powered by
FUDForum. Page generated in 0.25215 seconds