DESCRIPTION

Bug 511014 - Memory leak with context menu items of the text editors

When all items of menuManager need removal when the menu is about to
show (removeAllWhenShown is set to true), the items are removed from the
menu model but not from the MenuManagerRenderer maps.
As result the contributions such as Open With menu item in the context
menu of the text editors are leaking. As the Open With menu is an inner
class it holds a reference to the owning editor and the editor leaks as
well. 
This patch aims to cleanup the MenuManagerRenderer maps -
modelToManager/managerToModel, modelToContribution/contributionToModel
and modelContributionToRecord, when a popup menu is configured to remove
all menu items when shown.

Change-Id: Iadddd21e9792354a270b94067f05cb0e6cf34630
Signed-off-by: Brianna Gallagher xxx@xxx.xxx
Signed-off-by: Jayvion Booth xxx@xxx.xxx

COMMENTS

author: Jayvion Booth
date: 2017-02-01 22:53:38.000000000

Uploaded patch set 9.

-------------------------------------
author: Brenden Conley
date: 2017-02-01 22:53:46.000000000

Patch Set 9:

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

-------------------------------------
author: Jayvion Booth
date: 2017-02-01 23:00:29.000000000

Patch Set 9:

> Uploaded patch set 9.

Sezgin, please compare this change with yours: because of the patch for bug 354538 we do a little bit less here, but I think with same result.

-------------------------------------
author: Brenden Conley
date: 2017-02-01 23:24:56.000000000

Patch Set 9: Verified+1

Build Successful 

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

-------------------------------------
author: Jayvion Booth
date: 2017-02-02 19:13:54.000000000

Patch Set 10: Patch Set 9 was rebased

-------------------------------------
author: Gerrit Code Review
date: 2017-02-02 19:42:41.000000000

Change has been successfully merged into the git repository by Jayvion Booth

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