Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Can i define common toolbar contribution across different views?(Toolbar contribution to view)
Can i define common toolbar contribution across different views? [message #653531] Thu, 10 February 2011 07:05 Go to next message
andylau is currently offline andylauFriend
Messages: 3
Registered: February 2011
Junior Member
By using the Command Framework in e3.6, toolbar can be contributed to specific View by defining locationURI as
toolbar:<view-id>.

We came across a problem, if we have muliples views having the same toolbar buttons (e.g. a search button on all views), can i define a common toolbar contribution to multiple views declarativly or programmatically?

Thanks.
Re: Can i define common toolbar contribution across different views? [message #653636 is a reply to message #653531] Thu, 10 February 2011 13:41 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

On 02/10/2011 02:05 AM, andylau@rttc.com.hk wrote:
>
> We came across a problem, if we have muliples views having the same
> toolbar buttons (e.g. a search button on all views), can i define a
> common toolbar contribution to multiple views declarativly or
> programmatically?

There's no API to do this, since a view IActionBars returns an
IToolBarManager but
org.eclipse.ui.menus.IMenuService.populateContributionManage r(ContributionManager,
String) takes a ContributionManager.

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: Can i define common toolbar contribution across different views? [message #655293] Sat, 19 February 2011 01:40 Go to previous messageGo to next message
andylau is currently offline andylauFriend
Messages: 3
Registered: February 2011
Junior Member
thanks, PW.

So is there any way to define a mapping programatically between ui contribution to a specfic (org.eclipse.ui.)command?
Re: Can i define common toolbar contribution across different views? [message #655752 is a reply to message #655293] Tue, 22 February 2011 14:41 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

On 02/18/2011 08:40 PM, andylau@rttc.com.hk wrote:
> thanks, PW.
>
> So is there any way to define a mapping programatically between ui
> contribution to a specfic (org.eclipse.ui.)command?

I'm not sure what you mean here. Programmatically you can place a
CommandContributionItem(CommandContributionItemPamameter) in a view's
actionbar IMenuManager or IToolBarManager. That's the programmatic
equivalent to a menuContribution/command

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Previous Topic:Maximizing application switches to last open editor
Next Topic:IntroPart behind a proxy
Goto Forum:
  


Current Time: Thu Apr 18 07:55:17 GMT 2024

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

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

Back to the top