MyException - 我的异常网
当前位置:我的异常网» Eclipse » 开发Eclipse插件,需给弹出菜单增加快捷键

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

www.MyException.Cn  网友分享于:2013-12-25  浏览:191次
开发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 "

文章评论

软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有