Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Customizing Toolbar Views
Customizing Toolbar Views [message #819467] Tue, 13 March 2012 00:05 Go to next message
Christopher Riley is currently offline Christopher RileyFriend
Messages: 9
Registered: March 2012
Junior Member
Hello everyone!

I've started a new project in Eclipse 4 RCP and am wondering how to build my own customized toolbar (trimbar). We want control over the layout (multiple rows), button sizes and display of the toolbar.

I've tried a few things, but nothing seems to do the trick. Removing the trimbar entirely and replacing the view with our own customized SWT part in its place will work, but I can't seem to get the layout correct for doing this, as the parts default to stacking horizontally. It always ends up as a toolbar on the left side of the screen and a Partstack on the right side.
Re: Customizing Toolbar Views [message #821208 is a reply to message #819467] Thu, 15 March 2012 03:48 Go to previous messageGo to next message
Christopher Riley is currently offline Christopher RileyFriend
Messages: 9
Registered: March 2012
Junior Member
I'm still working on this issue. I've come up with something that is close to what I want to do by completely removing trimbars and trying to create a toolbar completely in SWT layouts, but am still having problems with creating something that will match building a toolbar for a main view.

Is there some way to extend the Eclipse Trimbar and provide our own implementation of its construction via DI?

Anyone's input on this would be greatly appreciated, thanks!
Re: Customizing Toolbar Views [message #821438 is a reply to message #821208] Thu, 15 March 2012 10:56 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
You can replace the complete renders in e4 by contributing your custom
IRendererFactory (which typically derives from WorkbenchRendererFactory).

You can replace the default one by setting a bundleclass://-URI in your
product-extension point with the key "rendererFactoryUri".

Please note we currently don't have a highlevel API in this area so you
are working at a low level but TrimBars (TrimBarRenderer) are easier areas.

Tom

Am 15.03.12 04:48, schrieb Christopher Riley:
> I'm still working on this issue. I've come up with something that is
> close to what I want to do by completely removing trimbars and trying to
> create a toolbar completely in SWT layouts, but am still having problems
> with creating something that will match building a toolbar for a main view.
>
> Is there some way to extend the Eclipse Trimbar and provide our own
> implementation of its construction via DI?
> Anyone's input on this would be greatly appreciated, thanks!
Re: Customizing Toolbar Views [message #824228 is a reply to message #821438] Mon, 19 March 2012 12:15 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 242
Registered: July 2009
Senior Member
If you're looking for something quick and somewhat dirty, you can make your own Tool Control. It's contribution object is responsible for rendering the representation.
Re: Customizing Toolbar Views [message #882821 is a reply to message #824228] Thu, 07 June 2012 09:11 Go to previous message
Tom K. is currently offline Tom K.Friend
Messages: 22
Registered: July 2009
Junior Member
you can try to use the CSS attribute visibility.
It is still a little bit buggy in e4 - It ccould work for your case.

add these lines to your css file:

#org-eclipse-ui-trim-vertical1{
	visibility: hidden;
}

#org-eclipse-ui-trim-vertical2{
	visibility: hidden;
}


This should hide the vertical trim bars

Status bar would be: ...trim-status and the toolbar ...-main-toolbar
and so on..

Hope it works for you.
Previous Topic:styling the menu and menu items?
Next Topic:A small Annoyance
Goto Forum:
  


Current Time: Tue Apr 23 18:03:19 GMT 2024

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

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

Back to the top