custom key bindings [message #466987] |
Thu, 26 April 2007 21:10  |
Eclipse User |
|
|
|
Hi,
How do I access the code used for the Eclipse Preferences (General,
Editors, Keys) so that I can use it to set up custom key bindings in my
RCP App?
Thanks,
Jay
|
|
|
Re: custom key bindings [message #467035 is a reply to message #466987] |
Fri, 27 April 2007 07:48  |
Eclipse User |
|
|
|
What are you trying to do?
If you just want to provide keybindings for your RCP app,
use the org.eclipse.ui.bindings extension point.
If you want to allow the user to edit the keybindings, you can use the
workbench key preference editors in your RCP app by include this in your
plugin.xml:
<extension
point="org.eclipse.ui.preferencePages">
<page
name="Keys (Experimental)"
category="org.eclipse.ui.preferencePages.Workbench"
class="org.eclipse.ui.ExtensionFactory:newKeysPreferencePage "
id="org.eclipse.ui.preferencePages.NewKeys">
<keywordReference id="org.eclipse.ui.ide.keys"/>
</page>
</extension>
you can look in org.eclipse.ui/plugin.xml for the other
keysPreferencePage definition.
If you want to write your own key preference editor, check out how
NewKeysPreferencePage does it (BindingManager, IBindingService)
The programmatic interface is not dynamic in nature (i.e. it is not for
enabling or disabling keybindings on the fly).
Later,
PW
|
|
|
Powered by
FUDForum. Page generated in 0.10624 seconds