Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Dynamic menuitems in partmenu does not show up
Dynamic menuitems in partmenu does not show up [message #998686] Thu, 10 January 2013 14:02
Alexander Lampret is currently offline Alexander LampretFriend
Messages: 1
Registered: January 2013
Junior Member
Hello everyone!

I try to add DirectMenuItems with radio type to a menu inside a part. The label and number of items are determined from a hashmap. The number and names of keys are represented by the menuitems. But the menuitems only show up at first try.
After the second "calculation" of menuitems, only the radio buttons are shown. The number of items is wrong too.

MInputPart input = (MInputPart) modelService.find(ImageEditor.EDITOR_TEMPLATE_ID, application);
		MMenu menu = (MMenu) modelService.find(MENU_ID, input.getMenus().get(0));
		ImagePlaneData data = getScan().getParallelData();
		MDirectMenuItem newElement;
		if (data.scanImageList.keySet().size() > 1) {
			for (String key : data.scanImageList.keySet()) {
				newElement = MMenuFactory.INSTANCE.createDirectMenuItem();
				if (key.equals(getScan().getCurrentGroup())) {
				} else {

Both, input and menu, are found.
Then all children (directmenuitems) should be cleared. If this is the second or higher run, the children are cleared if i take a look at menu in debug mode, but the menu and radio buttons are shown.
if more keys are available, at first run the labels and radios are shown and then only the radio buttons.

is there a function to "redraw" the menu or something like that?


[Updated on: Mon, 14 January 2013 10:30]

Report message to a moderator

Previous Topic:Creating a console view in the RCP Application
Next Topic:How to show upper-left corner icon for a E4 APP
Goto Forum:

Current Time: Sun Apr 22 16:40:31 GMT 2018

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

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