DESCRIPTION

Bug 467000 - [Popup Menu] Too many refreshes when building Dynamic Menus

Change-Id: Ida80e24773a4b866757e5ffd457183691e2343b1
Signed-off-by: Myah Faulkner xxx@xxx.xxx

COMMENTS

author: Myah Faulkner
date: 2015-05-29 07:33:17.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2015-05-29 07:33:23.000000000

Patch Set 1:

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

-------------------------------------
author: Jayvion Booth
date: 2015-05-29 07:41:53.000000000

Patch Set 1:

(1 comment)

Please see comment in code.

Line:1167, bundles/org.eclipse.e4.ui.workLeon Ochoach.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/MenuManagerRenderer.java -> This executes the runnable in non-UI thread. I don't know why it works, shouldn't this updates be done in UI thread only?

In which thread all those places were executed in the original code (I have no chance to debug it now)?

-------------------------------------
author: Brenden Conley
date: 2015-05-29 07:48:26.000000000

Patch Set 1: Verified+1

Build Successful 

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

-------------------------------------
author: Karla Bray
date: 2015-05-29 07:57:04.000000000

Patch Set 1: Verified+1 Code-Review+1

I tested the project attached in the bug, and it works well ! I have only one 'Fill' displayed.

-------------------------------------
author: Myah Faulkner
date: 2015-05-29 08:14:34.000000000

Patch Set 1:

(1 comment)

Line:1167, bundles/org.eclipse.e4.ui.workLeon Ochoach.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/MenuManagerRenderer.java -> I think it is because Executors.newScheduledThreadPool(1); creates the new thread in the same ThreadGroup. And this is the group of the thread invoking the thread factory, which is in our case the UI thread group. But of course only if no SecurityManager is involved.

We could create a ThreadFactory that always use the thread group of the current thread, which is in case of a renderer the UI thread. Just to be sure it doesn't collide with a SecurityManager. Not sure if it would make a difference since I am not quite familiar with the SecurityManager stuff.

-------------------------------------
author: Teagan Marsh
date: 2015-05-29 15:05:43.000000000

Patch Set 1:

(1 comment)

See inline

Line:1167, bundles/org.eclipse.e4.ui.workLeon Ochoach.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/MenuManagerRenderer.java -> This code is JFace and SWT-specific.  Can't we keep this as simple as possible and just use Display#timerExec()?

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