Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 330119

Summary: render toolbar contributions using the ContributionManagers
Product: [Eclipse Project] e4 Reporter: Paul Webster <pwebster>
Component: UIAssignee: Paul Webster <pwebster>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: emoffatt, remy.suen
Version: unspecified   
Target Milestone: 4.1 RC1   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
work in progress v01
none
work in progress v02
none
Render toolbars via ToolBarManager v03
none
Use the standard toolbar renderer with compat view v04
none
Use the standard toolbar renderer with compat view v05
none
link toolbars from the coolbar directly v06
none
Allow changes to the coolbar to feed the model v07
none
Allow changes to the coolbar to feed the model v08
none
Allow changes to the coolbar to feed the model v09
none
Allow changes to the coolbar to feed the model v10
none
Separation and Separator work v11
none
Separation and Separator work v12 none

Description Paul Webster CLA 2010-11-12 11:58:14 EST
Learning from the pattern applied in bug 325392 we can provide similar rendering for toolbars.

1) ToolBarManager that can be craeted by the renderer or linked up.
2) toolbar MMCs can be applied, and their visibility can be controlled in a group and then either by RATs or by a timer
3) changes to the ToolBarManger external to the renderers can be represented in the model without requiring the model to be aware of all of the uses for 3.x

PW
Comment 1 Paul Webster CLA 2011-03-02 08:49:38 EST
Created attachment 190141 [details]
work in progress v01

Doesn't do much yet.
PW
Comment 2 Paul Webster CLA 2011-03-04 08:19:02 EST
Created attachment 190379 [details]
work in progress v02

ToolbarManagerRenderer now renders the toolbars correctly, and the trim renderer can show them.  no drag handlers, however.

PW
Comment 3 Paul Webster CLA 2011-03-04 14:41:16 EST
Created attachment 190436 [details]
Render toolbars via ToolBarManager v03

I've kept the current pattern, where the MToolBar renderer returns an intermediate composite.  The composite can contain:

ToolBar(dragHandle) ToolBar(MToolBar) ToolBar(part MMenu)


I'm not convinced the responsibility of maintaining multiple toolbars should fall to this renderer, but I leave it consistent for now.

PW
Comment 4 Paul Webster CLA 2011-03-04 16:18:01 EST
Created attachment 190445 [details]
Use the standard toolbar renderer with compat view v04

Removes use of MRenderedToolBar.

Needs work to deal with Outline view, switching pages doesn't update correctly as the ToolBar has been disposed, and doesn't want to come back.

PW
Comment 5 Paul Webster CLA 2011-03-04 16:18:12 EST
(In reply to comment #3)
> Created attachment 190436 [details]
> Render toolbars via ToolBarManager v03
> 

Released.

PW
Comment 6 Paul Webster CLA 2011-03-06 20:09:43 EST
Created attachment 190507 [details]
Use the standard toolbar renderer with compat view v05

This got rid of MRenderedToolBar and the extra disposes.

PW
Comment 7 Paul Webster CLA 2011-03-06 21:09:59 EST
(In reply to comment #6)
> Created attachment 190507 [details]
> Use the standard toolbar renderer with compat view v05

Released for build
PW
Comment 8 Paul Webster CLA 2011-03-06 21:12:20 EST
Created attachment 190508 [details]
link toolbars from the coolbar directly v06

If the coolbar contains a toolbar, allow it to be rendered directly.

PW
Comment 9 Paul Webster CLA 2011-03-06 21:36:37 EST
(In reply to comment #8)
> Created attachment 190508 [details]
> link toolbars from the coolbar directly v06
> 

Released to HEAD

PW
Comment 10 Paul Webster CLA 2011-03-06 21:37:34 EST
Created attachment 190509 [details]
Allow changes to the coolbar to feed the model v07

work in progress

PW
Comment 11 Remy Suen CLA 2011-03-07 16:21:01 EST
If you switch to the 'Debug' perspective there's this spot in the window's toolbar that shows two separators together.
Comment 12 Paul Webster CLA 2011-05-02 09:30:06 EDT
Created attachment 194484 [details]
Allow changes to the coolbar to feed the model v08

In Progress:

The ICoolBarManager keeps the model up to date as it is changed.

PW
Comment 13 Paul Webster CLA 2011-05-03 10:51:49 EDT
Created attachment 194595 [details]
Allow changes to the coolbar to feed the model v09

WORK IN PROGRESS

Model appears to be updated regularly, but toolbars are not yet rendered.

PW
Comment 14 Paul Webster CLA 2011-05-04 17:33:51 EDT
Created attachment 194774 [details]
Allow changes to the coolbar to feed the model v10

Allow the action bars to fill the coolbar, and then convert it to the model.

PW
Comment 15 Paul Webster CLA 2011-05-04 17:35:13 EDT
(In reply to comment #14)
> Created attachment 194774 [details]
> Allow changes to the coolbar to feed the model v10

Released to HEAD.

There is still 2 toolbar missing, and editor specific toolbar, and the org.eclipse.ui.edit.text.actionSet.presentation actionSet, which is tied to the active editor

PW
Comment 16 Paul Webster CLA 2011-05-06 15:05:43 EDT
text presentation actionSet is back.  Unfortunately, so are a lot of separators.

PW
Comment 17 Paul Webster CLA 2011-05-06 15:17:22 EDT
Created attachment 194976 [details]
Separation and Separator work v11

With the changes to the CoolBarToTrim manager there are now a lot of separators visible.

The toolbar renderer doesn't have the correct information or visibility to manage them.  This patch is the first pass attempt at breaking up the responsibility:

TrimBarRenderer creates an intermediate composite, a drag handled (faked for now), and then renders each MTrimElement in that.  This works as expected.

StackRenderer/LazyStackRenderer are trying to do the same thing, rendering the part toolbar and part menu into an intermediate composite.  I don't have to re-parenting set up correctly yet, however, as it spends its time yacking.

PW
Comment 18 Paul Webster CLA 2011-05-10 15:12:32 EDT
Created attachment 195264 [details]
Separation and Separator work v12

StackRenderer/LazyStackRenderer now creates a composite to host the toolbar and view dropdown menu button.  TrimBarRenderer creates a composite to host the current "fake" drag handle and the toolbar.

PW
Comment 19 Paul Webster CLA 2011-05-10 15:13:30 EDT
(In reply to comment #18)
> Created attachment 195264 [details]
> Separation and Separator work v12
>

Released to HEAD

Next step is to make sure there aren't 1000 separators in the trim area.

PW
Comment 20 Paul Webster CLA 2011-05-11 14:17:39 EDT
(In reply to comment #18)
> Created attachment 195264 [details]
> Separation and Separator work v12

Needed to re-parent toolbar when MPart refs reparted, to avoid bug 334580

PW
Comment 21 Paul Webster CLA 2011-05-13 14:37:25 EDT
This is finished, now there are bugs that need to be fixed, like bug 345193

PW