Hide Coolbar/Toolbar items/Preference pages in Eclipse RCP application (Eclipse e4)(在 Eclipse RCP 应用程序 (Eclipse e4) 中隐藏 Coolbar/Toolbar 项/Preference 页面)
问题描述
在我们的 Eclipse RCP 应用程序(使用 Eclipse 3.7)中,我重写了 WorkbenchWindowAdvisor.postWindowCreate() 方法,以隐藏不需要的 Coolbar/Toolbar 项目,例如 File、运行等菜单和运行最后一个工具、搜索等工具栏按钮,它工作正常.现在我已将代码移至 Eclipse e4 4.1.2,当我运行我的 RCP 应用程序时,它会启动,但会显示这些不需要的 Coolbar/Toolbar 项目.
In our Eclipse RCP application (using Eclipse 3.7) I had overridden WorkbenchWindowAdvisor.postWindowCreate() method, to hide the unwanted Coolbar/Toolbar items like File, Run etc. menus and Run Last Tool, Search etc. toolbar buttons and it was working fine. Now I have moved my code to Eclipse e4 4.1.2 and when I run my RCP application now it gets launched but it is showing these unwanted Coolbar/Toolbar items.
在深入研究该问题时,我发现 WorkbenchWindowAdvisor.postWindowCreate() 方法未在 e4 中使用,并且根本没有被调用.那么在 Eclipse e4 中执行此操作的替代方法是什么?
On some digging into the issue I found out that WorkbenchWindowAdvisor.postWindowCreate() method is not used in e4 and it does not get called at all. So what is the alternative way of doing this in Eclipse e4?
我还想提一下,在我的 RCP 应用程序中,我有 Xtext 插件.
I also want to mention that in my RCP application I am having Xtext plugin.
推荐答案
您可以:a) 使用没有这些项目的自定义 Legacy.e4xmi 文件b) 使用模型处理器以编程方式从模型中删除这些项目
You can: a) use a custom Legacy.e4xmi file which has none of those items b) use a model processor to remove those items programmatically from the model
这篇关于在 Eclipse RCP 应用程序 (Eclipse e4) 中隐藏 Coolbar/Toolbar 项/Preference 页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 Eclipse RCP 应用程序 (Eclipse e4) 中隐藏 Coolbar/Toolbar 项/Preference 页面
基础教程推荐
- 修改 void 函数的输入参数,然后读取 2022-01-01
- 无法复制:“比较方法违反了它的一般约定!" 2022-01-01
- 问题http://apache.org/xml/features/xinclude测试日志4j 2 2022-01-01
- 存储 20 位数字的数据类型 2022-01-01
- REST Web 服务返回 415 - 不支持的媒体类型 2022-01-01
- Struts2 URL 无法访问 2022-01-01
- 使用堆栈算法进行括号/括号匹配 2022-01-01
- Spring AOP错误无法懒惰地为此建议构建thisJoinPoin 2022-09-13
- 如何对 Java Hashmap 中的值求和 2022-01-01
- RabbitMQ:消息保持“未确认"; 2022-01-01
