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: Sezgin Halibov <sezgin.halibov@gmail.com>
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>