Community
Participate
Working Groups
We have an Action as AS_DROP_DOWN_MENU that implements IMenuCreator and is used to create a submenu for a popup menu (Entry 3). The submenu first shows "Loading..." to resolve its entries and then populates the entries from the background: Entry 1 Entry 2 Entry 3 > Loading... Entry 4 This worked in 3.3 and is now broken in > 3.4.2 It seems, ActionContributionItem introduced the notion of proxys for menus. I can see that ActionContributionItem.handleShowProxy(Menu) is called when I move my mouse over the menu item "Entry 3" and "Loading..." is properly showing. However, the additional items that get created from the background are never showing up in the sub menu as long as I dont move my mouse to a different item and back to the "Entry 3". Looking at the code, I can see that the items from the menu I create from IMenuCreator are filled into a proxy and then displayed. Thus, I can not create additional entries from the background because I dont have any menu to fill them into (only the one I created initially, but thats not used at all). Whats the way to go in 3.4 and 3.5 to lazy fill entries into a popup menu?
sigh. This is a side effect of the fix for bug 136397 and bug 189092 Until the proxy disappears for the first time (and the real menu gets swapped in) the proxy will only show the "first" fill in of the real menu. PW
Dynamically updating a showing popup, using MenuManager instead of IMenuCreator. This is a "general shape" example: MenuManager popup = new MenuManager(); popup.add(new Action("Hello") { }); popup.add(new Action("Hi") { }); final MenuManager toFill = new MenuManager("To Fill"); toFill.add(new Action("Loading...") { }); toFill.addMenuListener(new IMenuListener() { public void menuAboutToShow(IMenuManager manager) { display.timerExec(5000, new Runnable() { public void run() { toFill.removeAll(); toFill.add(new Action("Added one") { }); toFill.add(new Action("Added two") { }); toFill.add(new Action("Added three") { }); toFill.update(true); } }); } }); popup.add(toFill); popup.add(new Action("Howdy") { });
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.