当前位置: 代码迷 >> Eclipse >> 开发Eclipse插件,需给弹出菜单增加快捷键
  详细解决方案

开发Eclipse插件,需给弹出菜单增加快捷键

热度:214   发布时间:2016-04-23 18:53:22.0
开发Eclipse插件,需要给弹出菜单增加快捷键
开发Eclipse插件,需要给弹出菜单增加快捷键
查询Eclipse的帮助需要设置commands和bindings两个扩展点。

但是无法设置成功

谁能给一个成功的sample


------解决方案--------------------
eclipse自己的一个例子,你看一下就明白

popup的action
<action
label= "%StepIntoAction.label "
icon= "$nl$/icons/full/elcl16/stepinto_co.gif "
helpContextId= "step_into_action_context "
definitionId= "org.eclipse.debug.ui.commands.StepInto "
class= "org.eclipse.debug.internal.ui.actions.StepIntoActionDelegate "
menubarPath= "stepIntoGroup "
enablesFor= "1 "
id= "org.eclipse.debug.ui.debugview.popupMenu.stepInto ">
<selection
class= "org.eclipse.debug.core.model.IStep ">
</selection>
</action>

<!-- commands and their bindings
NOTE:
M1 = CTRL/COMMAND
M2 = SHIFT
M3 = ALT
M4 = Platform-specific fourth key
-->
commands:
<command
name= "%ActionDefinition.stepInto.name "
categoryId= "org.eclipse.debug.ui.category.run "
description= "%ActionDefinition.stepInto.description "
id= "org.eclipse.debug.ui.commands.StepInto ">
</command>

快捷键:
<extension point= "org.eclipse.ui.bindings ">
<key
sequence= "F5 "
contextId= "org.eclipse.debug.ui.debugging "
commandId= "org.eclipse.debug.ui.commands.StepInto "
schemeId= "org.eclipse.ui.defaultAcceleratorConfiguration "/>

------解决方案--------------------
mark
------解决方案--------------------
re
探讨
eclipse自己的一个例子,你看一下就明白

popup的action
<action
label= "%StepIntoAction.label "
icon= "$nl$/icons/full/elcl16/stepinto_co.gif "
helpContextId= "step_into_action_context "
definitionId= "org.eclipse.debug.ui.commands.StepInto "

  相关解决方案