Dynamically added MenuItem isn't shown [message #1052699] |
Tue, 30 April 2013 12:23 |
Bastian Wagenfeld Messages: 183 Registered: January 2013 |
Senior Member |
|
|
Hi,
I've got a context menu (MMenu) that may be extended with further MenuItems (MHandledMenuItem). So I do the following:
MHandledMenuItem item = MMenuFactory.INSTANCE.createHandledMenuItem();
item.setElementId("someId");
item.setLabel("A Label");
mMenu.getChildren().add(item);
(I also add a command and a parameter to this item, but the problem is the same, when I just call the code above.)
The new item isn't shown in the application, but mMenu.getChildren() contains all added items and the generation itself works fine.
The menu is registered to a JFace-Tree via menuService.registerContextMenu(tree, "menuId");.
Do I have to do some refresh anywhere? I tried to re-register the menu after an item was added.
Thank you for your help.
Bastian
|
|
|
Powered by
FUDForum. Page generated in 0.02561 seconds