【问题标题】:Eclipse: Create key shortcut for command/action programaticallyEclipse:以编程方式为命令/操作创建快捷键
【发布时间】:2014-06-13 21:08:41
【问题描述】:

我知道可以使用扩展点 org.eclipse.ui.bindings 为命令注册快捷键。来自Eclipse FAQs的例子:

<extension point="org.eclipse.ui.bindings">
    <key sequence="Ctrl+7"
        commandId="uk.co.example.actions.togglecomment"
        schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
        contextId="uk.co.example.ampleEditorScope"/>
</extension>

但是,是否可以在运行时动态地做同样的事情?

【问题讨论】:

  • org.eclipse.ui.keys.IBindingService是按键绑定代码的主界面,但是好像没有什么可以添加绑定的。

标签: java eclipse eclipse-plugin


【解决方案1】:

流动的主题应该是相关的: http://www.eclipsezone.com/eclipse/forums/t44367.html

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-08-29
    • 2017-01-10
    • 1970-01-01
    • 1970-01-01
    • 2011-09-21
    • 2011-03-15
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多