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 WagenfeldFriend
Messages: 183
Registered: January 2013
Senior Member

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.setLabel("A Label");

(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.
Previous Topic:e4mf
Next Topic:Remote UI
Goto Forum:

Current Time: Fri May 27 20:30:51 GMT 2016

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

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