Skip to main content



      Home
Home » Eclipse Projects » Eclipse 4 » Dynamic toolbar contributions
Dynamic toolbar contributions [message #1752651] Wed, 25 January 2017 14:42 Go to next message
Eclipse UserFriend
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

Re: Dynamic toolbar contributions [message #1752659 is a reply to message #1752651] Wed, 25 January 2017 16:19 Go to previous message
Eclipse UserFriend
No, not yet. There is some discussion on bugs 378815 and 485454.
Previous Topic:RCP 4.x application examples
Next Topic:Inject values into fields when class instantiated in my code
Goto Forum:
  


Current Time: Sun Jul 27 02:16:45 EDT 2025

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

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

Back to the top