Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Added menuitem doesn't showup
Added menuitem doesn't showup [message #45274] Fri, 23 May 2003 11:42
Taeke Kooiker is currently offline Taeke KooikerFriend
Messages: 8
Registered: July 2009
Junior Member
I have to create menu's in the menubar which are not known at design time
(menunames and itemnames are received from another thread which
communicates with an external program). Using the following code I can
create the menuname and 1 item in it, but next time I use this function
the new menuitem will not be added (at least it doesn't show up). Any help
is appreciated.

Display.getDefault().asyncExec(new Runnable() {
public void run() {
IMenuManager parentMenu =
getEditorSite().getActionBars().getMenuManager();
IMenuManager m = parentMenu.findMenuUsingPath(str0);
if (m == null) {
m = new MenuManager(str0, str0);
parentMenu.add(m);
parentMenu.update(true);
}
m.add(new AddMetaEditorAction(str0, str1));
m.update(true);
}
}
Previous Topic:Threads and Monitors view does not work...
Next Topic:WizardPage Refresh
Goto Forum:
  


Current Time: Sat Oct 19 19:40:43 GMT 2024

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

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

Back to the top