Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » help needed with key bindings: can anyone send me a simple example?
help needed with key bindings: can anyone send me a simple example? [message #260826] Mon, 12 July 2004 17:41 Go to next message
Dan Winterstein is currently offline Dan WintersteinFriend
Messages: 33
Registered: July 2009
Member
Dear All,
I am having trouble getting key-bindings to work in my plugin (I've gone
through the documentation, but I can't get it to work for me).
Can anyone send me a simple example that shows how to create a
key-binding for an action? (i.e. a mini-plugin or some code snippets)
Thanks in advance,
- Daniel
Re: help needed with key bindings: can anyone send me a simple example? [message #260831 is a reply to message #260826] Mon, 12 July 2004 17:56 Go to previous message
Eclipse UserFriend
Originally posted by: douglas.pollock.magma.ca

Daniel Winterstein wrote:
> I am having trouble getting key-bindings to work in my plugin (I've gone
> through the documentation, but I can't get it to work for me).
> Can anyone send me a simple example that shows how to create a
> key-binding for an action? (i.e. a mini-plugin or some code snippets)

Look at "plugin.xml" for "org.eclipse.ui". Look in the commands extension
point. But, roughly, you want something like

<command
name="Redo"
description="Does the last command again"
categoryId="org.eclipse.ui.category.edit"
id="org.eclipse.ui.edit.redo">
</command>
<keyBinding
commandId="org.eclipse.ui.edit.redo"
keySequence="M1+Y"
keyConfigurationId="org.eclipse.ui.defaultAcceleratorConfiguration ">
</keyBinding>

And then a snippet of code that creates your action and sets its action
definition id. This could either be some XML (e.g., the pop-up menus
extension point), or some Java code.



cheers,
d.
Previous Topic:[Bug?] Feature build errors
Next Topic:Status of plugin.xml in Eclipse 3.0 in respect to OSGi bundle manifest
Goto Forum:
  


Current Time: Sat Jul 27 20:23:05 GMT 2024

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

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

Back to the top