This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 388482 - [Trim] [DND] Dragging toolbars to different trim should change orientation
Summary: [Trim] [DND] Dragging toolbars to different trim should change orientation
Status: CLOSED DUPLICATE of bug 412479
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.4 M5   Edit
Assignee: Platform UI Triaged CLA
QA Contact: Eric Moffatt CLA
URL:
Whiteboard: candidate43
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-30 18:25 EDT by Brian de Alwis CLA
Modified: 2013-11-04 14:35 EST (History)
0 users

See Also:
bsd: review? (emoffatt)


Attachments
One possible fix for re-building the toolbars (1.75 KB, patch)
2012-08-30 18:28 EDT, Brian de Alwis CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brian de Alwis CLA 2012-08-30 18:25:38 EDT
Dragging a toolbar from the top trim to the side trim should cause the toolbar to be laid out in a vertical arrangement.

Looks like the issue is that ToolBarManager has no API to changing/reconfiguring the toolbar orientation, and ToolBarManagerRenderer#createWidget() doesn't re-create the ToolBarManager once created.
Comment 1 Brian de Alwis CLA 2012-08-30 18:28:11 EDT
Created attachment 220537 [details]
One possible fix for re-building the toolbars

This exposes a new API method on ToolBarManager #setOrientation(int).  To be honest, it seems like a logical addition anyways.
Comment 2 Eric Moffatt CLA 2012-09-25 15:06:33 EDT
Brian, as I understand the problem it's that the current API contract allows people to expect that the actual swt ToolBar have a life-cycle that matches that of the TBM using it. 

For myself I'd say that in 4.3 we should just take the chance and get anybody who reports widget disposed errors from cached TB's to fix their code (just use TBM#getControl() rather than caching it). My suspicion is that this is *very* low risk since it'll only occur if a TB is docked in a non-horizontal trim area -and- has the caching issue...I'll take that risk...;-).
Comment 3 Eric Moffatt CLA 2013-11-04 14:35:40 EST
I'll mark this as a DUP of 412479 since it has more context...

*** This bug has been marked as a duplicate of bug 412479 ***