Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » How to add a toolbar separator(I want to add a vertical line to a toolbar)
How to add a toolbar separator [message #1275564] Sun, 23 March 2014 08:27 Go to next message
Peter Robertson is currently offline Peter RobertsonFriend
Messages: 14
Registered: April 2012
Location: Scotland
Junior Member
The toolbar in my Eclipse project has a number of pre-defined buttons (New, Save,...)
I have added several new buttons via my plugin.xml using:
<extension point="org.eclipse.ui.menus">
<menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar">
etc.
This all works.

I wish to group my buttons by putting a separator between certain ones. By "separator" I mean a vertical line as is already present between some of the pre-defined buttons; I do not mean a place-holder for some items to be defined later.

How can this be done?

I have tried using the element "separator" with visible set true, but this appears to do nothing at all.
BTW, the documentation on it seems contradictory.

It starts:
<!ELEMENT separator EMPTY>
<!ATTLIST separator
name CDATA #REQUIRED
visible (true | false)

Then says:
name - The 'id' of this contribution. If defined then...

How can it not be defined as it is REQUIRED?



Re: How to add a toolbar separator [message #1277386 is a reply to message #1275564] Tue, 25 March 2014 23:27 Go to previous messageGo to next message
Sopot Cela is currently offline Sopot CelaFriend
Messages: 597
Registered: December 2010
Senior Member

If you have a pure e4 RCP you can add these through the application model.
Re: How to add a toolbar separator [message #1277548 is a reply to message #1277386] Wed, 26 March 2014 05:55 Go to previous messageGo to next message
Peter Robertson is currently offline Peter RobertsonFriend
Messages: 14
Registered: April 2012
Location: Scotland
Junior Member
Thank you for writing that it can be done.

The actual question was how.
Re: How to add a toolbar separator [message #1277655 is a reply to message #1277548] Wed, 26 March 2014 09:31 Go to previous messageGo to next message
Sopot Cela is currently offline Sopot CelaFriend
Messages: 597
Registered: December 2010
Senior Member

Are you sure you are on an pure Eclipse 4 RCP? That would mean you have no dependency on org.eclipse.ui. Here's how to fiddle with the model editor. http://www.vogella.com/tutorials/EclipseRCP/article.html#applicationmodel
Re: How to add a toolbar separator [message #1277661 is a reply to message #1277655] Wed, 26 March 2014 09:39 Go to previous message
Peter Robertson is currently offline Peter RobertsonFriend
Messages: 14
Registered: April 2012
Location: Scotland
Junior Member
I am not sure of anything after working with Eclipse!

How would I determine if I am on a "pure Eclipse RCP"?

I should add that the project has meen moved from an old version of Eclipse (Ganymede).

[Updated on: Wed, 26 March 2014 09:41]

Report message to a moderator

Previous Topic:Product run differs from development run
Next Topic:org.eclipse.e4.tools.emf.editor.ModelEditor commands not executable
Goto Forum:
  


Current Time: Sun Dec 21 12:16:05 GMT 2014

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

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