Hi,
I am playing around with dynamic toolbar contributions using the view model. I am able to dynamically inject an element to a toolbar so far:
element = MMenuFactory.INSTANCE.createHandledToolItem();
((MPart) target).getToolbar().getChildren().add(element);
The element gets rendered and works as expected.
First question:
When rendered, the toolbar does not get updated correctly. Meaning its size is not adjusted and therefore the new item is typically clipped. After resizing/moving the window the toolbar is rendered correctly.
Is there a way to manually trigger size calculation and rendering?
2nd question:
Currently such contributions get stored permanently, so they survive a restart. Is there a way to mark elements as transient, so they do not get persisted in the EMF model?
thanks
Christian
[Updated on: Wed, 25 January 2017 14:43] by Moderator