java - 在 Eclipse RCP 应用程序 (Eclipse e4) 中隐藏 Coolbar/Toolbar items/Preference pages

标签 java eclipse eclipse-plugin eclipse-rcp xtext

在我们的 Eclipse RCP 应用程序(使用 Eclipse 3.7)中,我覆盖了 WorkbenchWindowAdvisor.postWindowCreate() 方法,以隐藏不需要的 Coolbar/Toolbar 项目,例如 File Run 等菜单和Run Last ToolSearch 等工具栏按钮,一切正常。现在,我已将我的代码移至 Eclipse e4 4.1.2,当我运行我的 RCP 应用程序时,它现在已启动,但它显示了这些不需要的 Coolbar/Toolbar 项目。

在深入研究这个问题后,我发现 WorkbenchWindowAdvisor.postWindowCreate() 方法没有在 e4 中使用,而且根本没有被调用。那么在 Eclipse e4 中执行此操作的替代方法是什么?

编辑: 我还想提一下,在我的 RCP 应用程序中,我有 Xtext 插件。

最佳答案

替代方法是使用 Eclipse Activity 。 在这里检查我的问题: RCP exportWizard remove unnecesary items

关于java - 在 Eclipse RCP 应用程序 (Eclipse e4) 中隐藏 Coolbar/Toolbar items/Preference pages,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10043190/

相关文章:

java - Android C++ 上的 Qt 与 Java 的互操作性因 SIGSEGV 无效或原始返回类型而失败

java - mksdcard(android SDK工具)创建的SD卡镜像已损坏?

java - log4j2 java.lang.NoClassDefFoundError : org/apache/logging/log4j/LogManager 错误

java - 如何在 Eclipse 编辑器中查看日志文件,就像在控制台窗口中一样?

java - Android Button 在 Activity 中找不到方法

java - 如何让 Google 路线保持在指定路线上到达某个地方?

java - Eclipse RCP 应用程序 Activity 标题栏

Eclipse 插件 : How to show a menu contribution only when a persective is active?

android - 在 Eclipse 上集成 Realm.io

java - 如何修复 "java.lang.NoClassDefFoundError: com/google/api/client/http/HttpRequestInitializer"运行时错误?