Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Dynamic toolbar contributions
Dynamic toolbar contributions [message #1752651] Wed, 25 January 2017 19:42 Go to next message
Christian Pontesegger is currently offline Christian PonteseggerFriend
Messages: 197
Registered: July 2009
Location: Graz, Austria
Senior Member
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 19:43]

Report message to a moderator

Re: Dynamic toolbar contributions [message #1752659 is a reply to message #1752651] Wed, 25 January 2017 21:19 Go to previous message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 788
Registered: January 2012
Senior Member

No, not yet. There is some discussion on bugs 378815 and 485454.

Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Previous Topic:RCP 4.x application examples
Next Topic:Inject values into fields when class instantiated in my code
Goto Forum:
  


Current Time: Fri Nov 16 23:12:38 GMT 2018

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

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

Back to the top