Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Customizing Toolbar Views
Customizing Toolbar Views [message #819467] Mon, 12 March 2012 20:05 Go to next message
Christopher Riley is currently offline Christopher Riley
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] Wed, 14 March 2012 23:48 Go to previous messageGo to next message
Christopher Riley is currently offline Christopher Riley
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 06:56 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5008
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 08:15 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de Alwis
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 05:11 Go to previous message
Tom K. is currently offline Tom K.
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: Thu Apr 17 08:41:14 EDT 2014

Powered by FUDForum. Page generated in 0.01846 seconds