DESCRIPTION

Bug 431778: Cleanup is not called for toolbar not created by the manager
renderer

The cleanup dispose listener has been moved to the processContribution
method. This allows to cleanup the toolbar model even for toolbar not
created by the renderer. The processContribution method populates the
toolbar model and should be responsible to add the dispose listener
which will trigger the cleanup.

Change-Id: I4c0476468e1fe93b97b313a35e6f893c4cc45c25
Signed-off-by: Quintin Stokes xxx@xxx.xxx


COMMENTS

author: Lilia Joyce
date: 2014-04-07 08:05:15.000000000

Patch Set 4: Commit message was updated

-------------------------------------
author: Brenden Conley
date: 2014-04-07 08:14:52.000000000

Patch Set 4:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/1753/

-------------------------------------
author: Brenden Conley
date: 2014-04-07 08:30:16.000000000

Patch Set 4: Verified+1

Build Successful 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/1753/ : SUCCESS

-------------------------------------
author: Slade Moran
date: 2014-04-07 15:03:47.000000000

Patch Set 4: Code-Review-1

(1 comment)

Line:467, bundles/org.eclipse.e4.ui.workLeon Ochoach.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/ToolBarManagerRenderer.java -> This method can be called multiple times on one MToolBar, so we can't blindly add the dispose listener here.

-------------------------------------
author: Lilia Joyce
date: 2014-04-07 15:23:39.000000000

Patch Set 4:

(1 comment)

Line:467, bundles/org.eclipse.e4.ui.workLeon Ochoach.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/ToolBarManagerRenderer.java -> Right. 

So we have to keep track of dispose listeners somehow. You said on the previous patch set you do not think we want to add another. So we could create a CleanupMToolBarDisposeListener and add only one dispose listener of this type on the control. This could be done in createToolbar, processContribution, processContent, ...

-------------------------------------
author: Slade Moran
date: 2014-04-07 15:42:36.000000000

Patch Set 4:

Or just slap a tag on the model element: "ToolBarManagerRenderer.disposeAdded"

-------------------------------------
