Amay
Amay

Reputation: 63

Showing Part toolbar in full span in Eclipse e4

I have implemented Eclipse RCP product in 4.5 (Mars) version. There is a part with toolbar. I want to show the part toolbar always in full span (covering the entire width of the part) and not on the part stack (on right side of the part tab).

I tried to add Part-Toolbar-FullSpan tag to the Part and also to the part toolbar but it is not helping. I also tried to create a custom toolbar but that approach did not work out.

Do you know how I can show the part toolbar in full span?

Thank you.

Upvotes: 1

Views: 278

Answers (1)

greg-449
greg-449

Reputation: 111142

Part-Toolbar-FullSpan appears to be for the e(fx)clipse JavaFX stack renderer only so it won't work with SWT.

The SWT stack renderer org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer uses the setTopRight method of CTabFolder to manage the toolbar. This will only push the toolbar on to a separate row when there not enough space for it on the tab row.

So it looks like the only way to do this would be to define a custom renderer factory and override the stack renderer. Unfortunately for what you want this would be a substantial change to the renderer.

Upvotes: 2

Related Questions