I have a custom Eclipse plugin with an editor and a content outline on which I added action(button) with
@Override
public void setActionBars(IActionBars actionBars)
{
actionBars.getToolBarManager().add(new CustomAction());
actionBars.getToolBarManager().update(false);
actionBars.updateActionBars();
}
The button correctly displays and is functional but it is display on a toolbar below the tab header named Outline and I want that button to be displayed next to that tab header like in the JDT.
Two pict to explain:
This is what I have

And what I want

In the JDT the first behavior happens when there is not enough space to display all the button but in my outline the button is always below the tab header
As you can see on the picts I read the JDT outline source code but nothing helped.
I found a solution, the height image use for my button was to big, the images used by the JDT are 16×16 so I just reduced mine, and the button moved next to the tab header.