Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » dynamic items in a views toolbar
dynamic items in a views toolbar [message #727501] Wed, 21 September 2011 09:20 Go to next message
Christian Stellwag is currently offline Christian Stellwag
Messages: 48
Registered: July 2009
Location: Munich
Member
Hi,

i'd like to programmatically add IContributionItems to a ViewParts Toolbar.
And let them be dynamic, i.e. show them or not.
Any way/idea to achieve that behavior is appreciated.

1) I tried with setVisible(y/n) which causes 'empty space' in the toolbar - not so nice.
2) I tried to add / remove, prepend / append, prependToGroup / appendToGroup, but unfortunately it's not possible to create a item _before_ (left side of) another IContributionItem that is always there
3) I didn't try setWidth = 0 due to missing layout manager

-> only way i can achieve it is 1) or create on the right side of other item.

Any good ideas on that are appreciated.

Thanks in advance,
Chris
Re: dynamic items in a views toolbar [message #727522 is a reply to message #727501] Wed, 21 September 2011 09:54 Go to previous messageGo to next message
witz cs is currently offline witz cs
Messages: 2
Registered: September 2010
Junior Member
Have you tried to use activities to display/hide ui contributions you added ?
Re: dynamic items in a views toolbar [message #727596 is a reply to message #727522] Wed, 21 September 2011 11:35 Go to previous message
Christian Stellwag is currently offline Christian Stellwag
Messages: 48
Registered: July 2009
Location: Munich
Member
not yet.
Do you know if they delegate to setVisible(.)?
Previous Topic:Odd enablement of menu vs. toolbar
Next Topic:Expand Toolbar Menu programatically
Goto Forum:
  


Current Time: Mon Apr 21 00:44:36 EDT 2014

Powered by FUDForum. Page generated in 0.01495 seconds