In my application I would like to create a top trimbar which contains icons on the left side and a searchbox on the right size. I can create these elements through the Eclipse model editor, but I can not set the right alignment for the textbox (searxhbox), it sticks to the left side all the time.
How can I set the right alignment for the searchbox ToolItem? Is there any tag for it or should I use some java code for it?
The IDE's TrimBarLayout has explicit handling for 'Spacer' controls. These are MToolControls that have the TrimBarLayout.SPACER tag applied.
Take a look at the WorkbenchWindow#populateTopTrim method for an example of how we use it. You don't need to use our implementation (LayoutModifierToolControl) but you will need something like it.