在 Eclipse RCP 应用程序中重用 Eclipse Run 菜单
我想为自定义语言创建 eclipse RCP 应用程序。当用户单击“运行”按钮时,应运行使用自定义语言编写的程序并显示其输出。
当我们使用 ActionFactory 创建新菜单项时,是否可以将 eclipse RCP 应用程序中的 eclipse Run 菜单与其默认功能集成?如果可以的话该怎么做?
提前致谢。
I want to create an eclipse RCP application for a custom language. A programs which is written using the cutom language should be run and show it's output when the user click on the Run button.
Is it possible to integrate eclipse Run menu in eclipse RCP application with it's default features as we create NEW menu item by using ActionFactory? If it is possible how to do that?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您“只是”想要运行菜单以及默认条目,只需包含对 org.eclipse.debug.ui 的依赖项即可。
然后,您需要使用插件 org.eclipse.debug.core 和 org.eclipse.debug.ui 中的各种扩展点为您的特定语言添加启动配置类型。
与往常一样,当谈到 Eclipse 的更高级功能时,访问这些功能的最简单方法是通过资源和示例。虽然有点过时,但文章“We Have Lift-off” (http://www.eclipse.org/articles/Article-Launch-Framework/launch.html) 是最好的起点。查看对 org.eclipse.debug.core.launchConfigurationTypes 的各种引用,找到使用作为起点的最佳示例 - 特别是 ANT Build 内容,因为这非常简单
......一般来说,您可以使用 PDE 菜单间谍(MacOS 上的
Alt-Shift-F2
)找到提供特定条目的插件...If you "just" want the Run menu along with the default entries, just include a dependency to
org.eclipse.debug.ui
.You will then need to add launch configuration types for your specific language using the various extension point from the plugins
org.eclipse.debug.core
andorg.eclipse.debug.ui
.As always, when it comes to the more advanced functionality of Eclipse, the easiest way to get access to the functionality is via resources and examples. Although it is a bit dated, the article "We Have Lift-off" (http://www.eclipse.org/articles/Article-Launch-Framework/launch.html) is the best starting point for this. Have a look at the various references to
org.eclipse.debug.core.launchConfigurationTypes
to find the best example to use asa starting point - in particular the ANT Build stuff as this is pretty simple...In general you can find the plug-in that contributes a specific entry using the PDE Menu Spy (
Alt-Shift-F2
on MacOS)...