Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » keybinding problem
keybinding problem [message #274560] Mon, 25 October 2004 06:30 Go to next message
Eclipse UserFriend
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 #274893 is a reply to message #274560] Fri, 29 October 2004 16:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: douglas.pollock.magma.ca

new4eclipse wrote:
> 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 ?

Nothing strikes me as being wrong in what you are doing. Could you perhaps
attach a code snippet showing what you are trying to do?



cheers,
d.
Re: keybinding problem [message #275090 is a reply to message #274893] Wed, 03 November 2004 14:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nmoliveira.eid.pt

Thanks for your help

Hope this may help... Apologies for the delayed response.

Nuno


"Douglas Pollock" <douglas.pollock@magma.ca> wrote in message
news:clu7gl$uth$1@eclipse.org...
> new4eclipse wrote:
> > 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 ?
>
> Nothing strikes me as being wrong in what you are doing. Could you
perhaps
> attach a code snippet showing what you are trying to do?
>
>
>
> cheers,
> d.
>




Re: keybinding problem [message #275262 is a reply to message #275090] Fri, 05 November 2004 10:31 Go to previous message
Eclipse UserFriend
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.
Previous Topic:Listener for recently modified
Next Topic:Eclipse hangs while launching run-time workbench
Goto Forum:
  


Current Time: Thu May 08 09:13:41 EDT 2025

Powered by FUDForum. Page generated in 0.25215 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top