Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Dynamic toolbar contribution
Dynamic toolbar contribution [message #1248527] Mon, 17 February 2014 11:07
Christian Pontesegger is currently offline Christian Pontesegger
Messages: 65
Registered: July 2009
Location: Graz, Austria
Member
I want to create a dynamic contribution to a toolbar of a given view.
As I do not know the view ID beforehand, I cannot implement it in the plugin.xml as a dynamic contribution.

If I add a AbstractContributionFactory at runtime it will be used to render view toolbars for views that were not rendered before. Eg a view that will be opened by the user at a later time or a view that is hidden within a stack and was not displayed before.

Unfortunately my factory is not used for views already displayed.
In that case I use
view.getViewSite().getActionBars().getToolBarManager().add(item);
which works fine.

The problem I see is for views that are open, but hidden within a stack (and not rendered before): there both my factory and toolbarmanager.add() will be applied.

Is there a way to resolve this (at best one that also works for 3.x)?

thanks
Christian

Previous Topic:How can I trace KeyBindings in RCP 4.3.1
Next Topic:dynamic command parameter and converter
Goto Forum:
  


Current Time: Sat Oct 25 10:24:02 GMT 2014

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

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