Project: Eclipse_Platform_UI
Bug 412479 ToolBarManagerRenderer doesn't care orientation changing of MToolBar because of it's cache.
Reported: 2013-07-08 04:50:20 | Status: verified fixed

ToolBarManagerRenderer#createtoolbar() has a MToolBar model to ToolBarManager cache map. However, Orientation of MToolBar(SWT.HORIZONTAL or SWT.VERTICAL) can be changed dynamically since user can drag toolbars to MTrimBar in 4 sides of WBW. When create a ToolBarManager first time, orientation is calculated and applied properly(see ToolBarManagerRenderer#getOrientation), But it is not applied when cached one is used. As a result, when user dragged a toolbar from main trim bar to left sided trim bar, toolbar is rendered as HORIZONTAL. Since ToolBarManager takes item style as it's constructor, and there is no way to modify it later. So cache invalidation algorithm should have to be provided.

Files changed in fix:
bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/ToolBarManagerRenderer.java bundles/org.eclipse.jface/src/org/eclipse/jface/action/ToolBarManager.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/action/AllTests.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/action/ToolBarManagerTest.java