Dynamic View Menu [message #792691] |
Tue, 07 February 2012 04:38  |
Eclipse User |
|
|
|
I'm trying to offer a view menu for a part which allows to save the current configuration of the part under a given name. Later, I'd like to be able to recall that configuration. The view menu looks like this:
Save...
-----------
Load > Config 1
Config 2
Config 3
I'm building the Load submenu from the configurations I get from a backend service. This works when I'm initially building the part, but when I change the part menu from the Save... DirectMenuItem handler, the Load submenu is not properly rebuilt.
I've tracked the problem down to the this code in StackRenderer:
Object obj = menuModel.getWidget();
if (obj instanceof Menu) {
menu = (Menu) obj;
}
if (menu == null || menu.isDisposed()) {
...build the menu from the model
, so the menu is never rebuilt. As I understand the "modeled workbench" concept, it should be sufficient to update the model, correct?
Any suggestions are welcome.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.13140 seconds