在Eclipse RCP应用程序(Eclipse e4)中隐藏酷派/工具栏项/首选项 [英] Hide Coolbar/Toolbar items/Preference pages in Eclipse RCP application (Eclipse e4)

查看:394
本文介绍了在Eclipse RCP应用程序(Eclipse e4)中隐藏酷派/工具栏项/首选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Eclipse RCP应用程序(使用 Eclipse 3.7 )中,我已经覆盖了 WorkbenchWindowAdvisor.postWindowCreate()方法,以隐藏不需要的Coolbar / Toolbar文件,运行等菜单和运行最后一个工具搜索等工具栏按钮,它正在工作精细。现在我已将代码移到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

I also want to mention that in my RCP application I am having Xtext plugin.

推荐答案

你可以:
a)使用一个没有这些项目
b的自定义Legacy.e4xmi文件)使用模型处理器从模型中以编程方式从模型中删除这些项目

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)中隐藏酷派/工具栏项/首选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆