Eclipse plugin 我如何使用;org.eclipse.debug.ui.launchShortcuts”是什么;?
我在Eclipse中编写了一个自定义启动器,可以通过工具栏上的“运行方式”和“调试方式”菜单选项访问它。我还希望能够通过PackageExplorer和右键单击要启动的文件编辑器来启动。我按照教程添加了快捷方式,但什么也没有发生,它没有输入我的处理代码,也没有抱怨扩展点的配置 下面是我的Eclipse plugin 我如何使用;org.eclipse.debug.ui.launchShortcuts”是什么;?,eclipse-plugin,eclipse-pde,Eclipse Plugin,Eclipse Pde,我在Eclipse中编写了一个自定义启动器,可以通过工具栏上的“运行方式”和“调试方式”菜单选项访问它。我还希望能够通过PackageExplorer和右键单击要启动的文件编辑器来启动。我按照教程添加了快捷方式,但什么也没有发生,它没有输入我的处理代码,也没有抱怨扩展点的配置 下面是我的plugin.xml <extension point="org.eclipse.debug.ui.launchShortcuts"> <shortcut id =
plugin.xml
<extension point="org.eclipse.debug.ui.launchShortcuts">
<shortcut
id = "org.mylauncher.launchCalcShortcut"
class = "org.mylauncher.LaunchCalcShortcut"
description="Execute calculations"
icon="icons/launch_16_16.png"
label="Calculate"
modes="run, debug" >
<configurationType id="org.mylauncher.launchCalc"/>
</shortcut>
我还尝试了删除(可选)图标属性,并分别验证了图标的路径
我已经修改这个配置好几个小时了,但没有什么好结果,而且调试也不可能,因为它根本没有在我自己的代码中运行
谢谢。这个问题的正确答案似乎是指定上下文启动快捷方式。以下是我的工作配置:
<extension
point="org.eclipse.debug.ui.launchShortcuts">
<shortcut
class="com.xxxx.CalcLaunchShortcut"
icon="calc.png"
id="com.xxxx.CalcLaunchShortcut"
label="Calc"
modes="run, debug">
<contextualLaunch>
<contextLabel mode="run" label="Run Calculator" />
<contextLabel mode="debug" label="Debug Calculator" />
<enablement >
<with variable="selection">
<count value="1"/>
<iterate>
<adapt type="org.eclipse.core.resources.IResource">
<and>
<test property="org.eclipse.core.resources.name" value="*.calc"/>
</and>
</adapt>
</iterate>
</with>
</enablement>
</contextualLaunch>
</shortcut>