DESCRIPTION

442570 - Dynamic menu contributions are persisted to
 workLeon Ochoach.xmi
 
 Dynamic menu items are were removed asynchronously in
 MenuManagerShowProcessor with the effect
 that when the workLeon Ochoach exits a copy of any dynamic items was saved to
 workspace.xml and the each time the workLeon Ochoach is started an additional
 duplicate of the dynamic entry was added to the menu.
 
 This has now been moved to MenuManagerHideProcessor, but If there is a
 context menu containing dynamic items and the user opens the menu and
 then right clicks on a different object in the same control to open
 another copy of the same menu, then duplicate entries of the dynamic
 item will appear.
 
 To avoid this we now make a copy of the current dynamic items which is
 then used inside a call to asyncExec to actually delete the old 
 dynamic menu items and hide the old items (.setVisible(false)) to
 prevent them showing in the new menu popup.
 

Change-Id: I51df7125db012bc5d4b9ef84e880d301754d51cb
Signed-off-by: Neveah Crosby xxx@xxx.xxx


COMMENTS

author: Slade Moran
date: 2014-09-29 14:53:32.000000000

Uploaded patch set 2.

-------------------------------------
author: Slade Moran
date: 2014-09-29 16:04:37.000000000

Patch Set 2:

(2 comments)

It looks OK, a few comments inline and one in the bug.

Line:80, bundles/org.eclipse.e4.ui.workLeon Ochoach.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/MenuManagerHideProcessor.java -> Why take a copy of the menu children?  I don't see anywhere inside you're removing elements for that list.

Line:100, bundles/org.eclipse.e4.ui.workLeon Ochoach.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/MenuManagerHideProcessor.java -> Do you have to set the MMenuElement to visible false?  Will the removal not happen soon enough to make them disappear?

-------------------------------------
author: Danica Elliott
date: 2014-11-14 10:31:15.000000000

Patch Set 2: Code-Review+1

I like it, I would just propose to 

* rebase the patch
* care for non-necessary additional lines and type modifications
* Remove the long text in the commit message

Thanks for bumping me on the bug .. I knew there was something open! :)

-------------------------------------
author: Danica Elliott
date: 2014-11-14 10:31:40.000000000

Patch Set 2:

I like it --> works flawlessly on OS X

-------------------------------------
author: Neveah Crosby
date: 2014-11-14 10:50:33.000000000

Patch Set 2:

Sorry, I haven't made the switch to Git yet in my normal work and I don't understand what that means, is the rebase something I need to do?

-------------------------------------
author: Danica Elliott
date: 2014-12-09 14:05:26.000000000

Patch Set 2: -Code-Review

I considered Pauls comment 

Why take a copy of the menu children? I don't see anywhere inside you're removing elements for that list.

and replaced the list iteration with a forEach.

I did however not touch the setVisible(false), as I think that we might not be sure that the removel, which happens async is in any case be executed before the next aboutToShow()

as Bruce hasn't got the time, I rebased into a new gerrit

https://git.eclipse.org/r/#/c/37858/

-------------------------------------
author: Zaid Mosley
date: 2014-12-18 15:43:00.000000000

Abandoned

Has been replaced by https://git.eclipse.org/r/#/c/37858/

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