3

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.

Kuldeep Jain
  • 8,409
  • 8
  • 48
  • 73

2 Answers2

1

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

Community
  • 1
  • 1
execc
  • 1,083
  • 12
  • 25
1

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

tomsontom
  • 5,856
  • 2
  • 23
  • 21
  • Thanks for our reply @tomsontom. I have tried using a custom `Legacy.e4xmi` file, but have no clue about how to edit that, neither found any documentation about it. I tried to modify it but still seeing `Run` and `Search` menus. Could you please let me know about what to change in `Legacy.e4xmi` file to remove the menubar all together and some of the toolbar items. I also want to mention that in my RCP application I am having an `Xtext` plugin. – Kuldeep Jain Apr 13 '12 at 12:53
  • I installed `e4 tools` on my Eclipse 4.2 and was able to change stuff in `Legacy.e4xmi` file. But even if I make the menu bar `invisible` of mark `toBeRendered` as false, and then first time when I launch the Application, it does not show the Menu bar, which is correct, but when I relaunch it without making any change then it starts showing the Menu bar with `Search` and `Run` menu items. – Kuldeep Jain Apr 17 '12 at 06:28