Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Adding ContributionItem directly to Coolbar causes all Separators to be invisible.
Adding ContributionItem directly to Coolbar causes all Separators to be invisible. [message #332940] Fri, 14 November 2008 19:22 Go to next message
kevin miles is currently offline kevin milesFriend
Messages: 9
Registered: July 2009
Junior Member
After adding a toolbarManager directly to the Coolbar causes all the
Separators in the all toolbars to go invisible. they are still there,
there's still an extra space but they are not visible.

simply doing the following code causes the issue... what am i doing wrong?


CoolBarManager coolBarManager = ( (WorkbenchWindow) window
).getCoolBarManager();

newToolbarManager = new ToolBarManager2();

ToolBarContributionItem tbci = new
ToolBarContributionItem2(newToolbarManager, element.getId());

coolBarManager.insertAfter( element.getId(), tbci );

coolBarManager.markDirty();

((WorkbenchWindow)window).updateActionBars();

kjm
Re: Adding ContributionItem directly to Coolbar causes all Separators to be invisible. [message #333052 is a reply to message #332940] Fri, 21 November 2008 20:00 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

kevin j miles wrote:
>
> CoolBarManager coolBarManager = ( (WorkbenchWindow) window
> ).getCoolBarManager();

Wow, this is so the opposite of supported :-)

>
> newToolbarManager = new ToolBarManager2();
>
> ToolBarContributionItem tbci = new
> ToolBarContributionItem2(newToolbarManager, element.getId());
>
> coolBarManager.insertAfter( element.getId(), tbci );

If your tbci id is element.getId(), then how can you
insertAfter(element.getId, ...) ? What if you pick an ID in the coolbar
that already exists?

Later,
PW

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


Previous Topic:Using eclipse on Windows2003 with multiple users
Next Topic:Active Contexts and Pages in the MultiPageEditorPart
Goto Forum:
  


Current Time: Tue Apr 16 23:01:26 GMT 2024

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

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

Back to the top