Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to set default key bindings?
How to set default key bindings? [message #461216] Sat, 06 January 2007 22:15 Go to next message
Eclipse UserFriend
Hi there,

I have an RCP (3.2.1) application that is currently a single feature
comprised of a single plug-in. All actions are linked to commands in my
plugin.xml as follows:

<extension
point="org.eclipse.ui.commands">
<category
id="com.brandonkane.category.x"
name="x"/>
<command
categoryId="com.brandonkane.category.x"
id="com.brandonkane.x.gui.actions.SomeAction"
name="Perform Action"/>
</extension>

I then have a set of key bindings and a scheme like this:

<extension
point="org.eclipse.ui.bindings">
<scheme
id="com.brandonkane.scheme1"
name="scheme1"/>
<key
commandId="com.brandonkane.x.gui.actions.SomeAction"
schemeId="com.brandonkane.scheme1"
sequence="M1+G"/>
</extension>

When the application is run, none of my key bindings are usable for the
actions. If I go into the preference page
"org.eclipse.ui.ExtensionFactory:newKeysPreferencePage" and choose my
custom scheme then all my key bindings work as desired.

So, a number of questions:

How can I force this scheme to be used? Is there a way through a
property? Or can it be set programmatically?
Is there a way to disable the Default and eMacs schemes that are part of
the default setup?

Thanks in advance, any assistance would be greatly appreciated.

Brandon
Re: How to set default key bindings? [message #461225 is a reply to message #461216] Sun, 07 January 2007 09:28 Go to previous messageGo to next message
Eclipse UserFriend
You can set the default scheme using your product's
plugin_customization.ini file.

check out eclipse/plugins/org.eclipse.sdk_<version>/plugin.xml to see
how it's specified and plugin_customization.ini file as an example.

http://magma.ca/~pollockd/despumate/bindingsHowTo.html has the property
under RCP Applications.

Later,
PW
Re: How to set default key bindings? [message #461234 is a reply to message #461225] Sun, 07 January 2007 11:21 Go to previous messageGo to next message
Eclipse UserFriend
Brilliant! I had the customization file for some other properties, it
was just adding the KEY_CONFIGURATION_ID property that I was missing.
My scheme is now the default when the app starts and all is well.

However, the other default Eclipse schemes do still show up in the
preference page, and most of those key bindings are meaningless for my
application. Is there any way to remove Default and Emacs from the list
or hide them from the user somehow?

Brandon

Paul Webster wrote:
> You can set the default scheme using your product's
> plugin_customization.ini file.
>
> check out eclipse/plugins/org.eclipse.sdk_<version>/plugin.xml to see
> how it's specified and plugin_customization.ini file as an example.
>
> http://magma.ca/~pollockd/despumate/bindingsHowTo.html has the
> property under RCP Applications.
>
> Later,
> PW
Re: How to set default key bindings? [message #461239 is a reply to message #461234] Sun, 07 January 2007 13:34 Go to previous message
Eclipse UserFriend
Brandon Kane wrote:
> Brilliant! I had the customization file for some other properties, it
> was just adding the KEY_CONFIGURATION_ID property that I was missing.
> My scheme is now the default when the app starts and all is well.
> However, the other default Eclipse schemes do still show up in the
> preference page, and most of those key bindings are meaningless for my
> application. Is there any way to remove Default and Emacs from the list
> or hide them from the user somehow?

I don't think so ... activities would probably be your best bet, but I
had a quick look and didn't see anything that would indicate the keys
preference page filtered out schemes based on activity IDs.

Later,
PW
Previous Topic:Enabling/Disabling Interdependant Actions
Next Topic:How can I read or write the file in jar?
Goto Forum:
  


Current Time: Mon Apr 14 23:35:44 EDT 2025

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

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

Back to the top