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:Prevent part from closing
Next Topic:e4 Tools Services ResourceProvider
Goto Forum:

Current Time: Fri Apr 20 09:07:41 GMT 2018

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

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