如何从 eclipse rcp 中的菜单栏中删除菜单项
我正在尝试从菜单栏中动态删除“项目”菜单,这意味着使用代码。请帮帮我。如果有人可以提供确切的代码,那将非常有帮助。
I am trying to remove "project" menu from menubar dynamically, means using code. Please help me out. It will be really helpful if someone can provide the exact code.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您正在编写 RCP 应用程序,您可以控制进入主菜单的内容。如果您添加的插件不是您自己编写的,并且它们使用扩展点来贡献主菜单,您可以使用“活动/功能”来删除它们。
您无法以编程方式从主菜单中删除某些内容,除非您的代码贡献了它。
If you are writing an RCP application you can control what goes into the main menu. If you are adding plugins that you didn't write yourself and they are using extension points to contribute to the main menu, you can use Activities/Capabilities to remove them.
You cannot remove things from the main menu programmatically, unless your code contributed it.