View menu with a submenu in an E4 view? [message #1725053] |
Mon, 29 February 2016 11:30 |
Dave Nice Messages: 10 Registered: July 2012 |
Junior Member |
|
|
Hi all,
In our last release we rewrote a number of our views to be E4-style.
Previously we had a view menu with a submenu which we want to recreate in the new views but I'm struggling. It looks like the right approach would be to add a MenuManager within the parent view menu MenuManager but in E4 I don't have access to the parent view menu MenuManager.
This is the kind of code I'm writing (we're updating the E4 menu programmatically rather than through a fragment):
MMenu viewMenu = MMenuFactory.INSTANCE.createMenu();
viewMenu.setElementId(VIEW_MENU_ID);
viewMenu.getTags().add("ViewMenu"); //$NON-NLS-1$
// add menu items here
viewMenu.getChildren().add(/* child item - ideally a submenu here! */);
part.getMenus().add(viewMenu);
I want the contents of the submenu to be dynamic.
Does anyone know how this could be done, please? I haven't yet found an example anywhere of a submenu within a view menu for E4.
Dave
[Updated on: Mon, 29 February 2016 11:31] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03485 seconds