Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311796 - Toolbars for Parts embedded in PartSashContainers are never rendered
Summary: Toolbars for Parts embedded in PartSashContainers are never rendered
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.4   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Brian de Alwis CLA
QA Contact: Remy Suen CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-05 16:49 EDT by Brian de Alwis CLA
Modified: 2014-02-10 11:41 EST (History)
2 users (show)

See Also:


Attachments
Work in progress (19.10 KB, patch)
2010-05-06 09:17 EDT, Brian de Alwis CLA
no flags Details | Diff
Eclipse CVS-friendly version of the patch (19.70 KB, patch)
2010-05-06 09:25 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 2010-05-05 16:49:14 EDT
Currently a Part with a ToolBar has its ToolBar rendered only when contained by a PartStack.  Parts embedded directly in a PartSashContainer never have their toolbars rendered.
Comment 1 Brian de Alwis CLA 2010-05-06 09:17:51 EDT
Created attachment 167300 [details]
Work in progress

This is a first cut, but I'm not very happy with it.  Basically I've redistributed the toolbar population and placement work from StackRenderer to SWTPartRenderer and ToolBarRenderer.  

In trying to refactor this, I wanted to avoid anything but the ToolBarRenderer from assuming that the MToolBar is rendered as an SWT ToolBar (I'm contemplating replacing the toolbar renderer in my own app with something that supports button strips).  Unfortunately a part with a view menu but without a toolbar requires a toolbar to be created to hold the toolitem to generate the view menu (ick).  I'd prefer to spoof up a MToolBar for this case, but then that toolbar would be persisted to the delta; it's almost like we should have a "transient" tag.  I suppose the view menu item could be rendered instead as a flat button instead.
Comment 2 Brian de Alwis CLA 2010-05-06 09:25:32 EDT
Created attachment 167301 [details]
Eclipse CVS-friendly version of the patch

Regenerated using the Eclipse CVS patch
Comment 3 Lars Vogel CLA 2014-02-06 09:05:45 EST
Brian, is this still relevant after 4 years?
Comment 4 Brian de Alwis CLA 2014-02-10 11:41:52 EST
I'll mark it as WONTFIX.  It's not a problem inherent to the modelled UI, but to our implementation: part toolbars are only rendered by a part-stack renderer.

And I'm not sure if I want the behaviour to change.  For example, I use a variant of the "Java Browsing" Perspective that sets up the project/package/type/methods views as standalone views to maximize screen real-estate.  The part toolbars aren't shown, since the parts aren't hosted in a stack, and so I have more real-estate for showing meaningful data.