Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Dynamically added MenuItem isn't shown
Dynamically added MenuItem isn't shown [message #1052699] Tue, 30 April 2013 12:23
Bastian Wagenfeld is currently offline Bastian Wagenfeld
Messages: 162
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
Previous Topic:e4mf
Next Topic:Remote UI
Goto Forum:
  


Current Time: Wed Sep 17 17:45:35 GMT 2014

Powered by FUDForum. Page generated in 0.08704 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software