要回答我的问题,你可以使用org.eclipse.ui.bindings扩展点来彻底解决问题。
首先,您设置一个键绑定像往常一样,然后你就可以取消设置在单一语言环境特定的键绑定。仅对于该语言环境,您可以将绑定重新设置为不同的内容。
这工作,但不幸的是非常详细的,如果你有很多键绑定,解除绑定,然后再重新绑定。
下面是一个例子:
<!-- set binding globally -->
<key
commandId="com.foo.myCommandId"
contextId="org.eclipse.ui.contexts.window"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
sequence="M3+G T"/>
<!-- un-set binding for Swiss German -->
<key
commandId="com.foo.myCommandId"
contextId="org.eclipse.ui.contexts.window"
locale="de_CH"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
sequence="M3+G C"/>
<!-- re-set binding for Swiss German with a new key combo -->
<key
commandId="com.foo.myCommandId"
contextId="org.eclipse.ui.contexts.window"
locale="de_CH"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
sequence="M1+M3+G C"/>
我应该看着/一点点/困难之前,我问的问题。看起来好像org.eclipse.ui.bindings扩展点确实提供了'locale'属性。使用这个,我可以指定键绑定只适用于特定的语言环境,但我仍然不知道如何使键绑定适用于除*之外的* all *语言环境。 – 2010-08-06 03:41:26