如何将菜单项添加到“运行方式”? [英] How to add menu entry to "Run As"?
本文介绍了如何将菜单项添加到“运行方式”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Eclipse的插件开发环境中,如何为特定编辑器添加菜单项运行方式?
In Plugin Developpment Environnement of Eclipse, How ca i add an menu entry to "Run As" for a specific Editor?
推荐答案
p>您可以在Eclipse文章中获得一些提示:
You can get some tips in the Eclipse article:
声明启动配置类型
创建我们的小程序启动器的第一步是声明配置类型,如下所示我们的插件的plugin.xml文件中的XML片段:
非UI声明
The first step in creating our applet launcher is declaring a config type, as shown in the following snippet of XML from our plug-in's plugin.xml file:
Non-UI declaration
<extension point="org.eclipse.debug.core.launchConfigurationTypes">
<launchConfigurationType
name="Java Applet"
delegate="org.eclipse.jdt.internal.launching.JavaAppletLaunchConfigurationDelegate"
modes="run, debug"
id="org.eclipse.jdt.launching.javaApplet">
</launchConfigurationType>
</extension>
此声明中最重要的部分是委托属性,实现接口的类的完全限定名称
org.eclipse.debug.core.model.ILaunchConfigurationDelegate
。
代表是启动器的大脑,并实现启动指定配置的launch()
方法。
这篇关于如何将菜单项添加到“运行方式”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文