Hi, I have a RCP application and in it's ActionBarAdvisor I create the "root" menu.
protected void fillMenuBar(IMenuManager menuBar) {
menuBar.add(new MenuManager("File", "file"));
menuBar.add(new MenuManager("Edit", "edit"));
menuBar.add(new MenuManager("Window", "window"));
}
Now I contribute a menuContribution with my command
<menuContribution locationURI="menu:edit?after=additions">
<command commandId="menu.test.rcp.command2" style="push">
<visibleWhen checkEnabled="true"></visibleWhen>
</command>
</menuContribution>
and an handler for that command
<handler class="xxx.MyHandler" commandId="menu.test.rcp.command2">
<activeWhen>
<with variable="activeEditorId">
<equals value="myEditorId">
</equals>
</with>
</activeWhen>
</handler>
The problem is, that this doesn't work. The menu "Edit" doesn't show up unless I add any other command to that menu.
After that it works fine.
Does it mean that I can't have menu with only one menu contribution to that menu?