Hide Coolbar/Toolbar items/Preference pages in Eclipse RCP application (Eclipse e4)

删除回忆录丶 提交于 2019-12-20 02:37:13

问题


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.

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?

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


回答1:


Alternative way is using Eclipse Activities. Check my question here: RCP exportWizard remove unnecesary items




回答2:


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



来源:https://stackoverflow.com/questions/10043190/hide-coolbar-toolbar-items-preference-pages-in-eclipse-rcp-application-eclipse

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!