DESCRIPTION

Bug 411326 - Menu entries contributed programmatically disabled in
eclipse 4.3

WORK IN PROGRESS

Change-Id: I08ae2e350f0cc11739ded12858ba83aba6675ad6
Signed-off-by: Amiyah Parrish xxx@xxx.xxx

COMMENTS

author: Amiyah Parrish
date: 2014-04-28 16:42:06.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2014-04-28 16:42:11.000000000

Patch Set 1:

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

-------------------------------------
author: Amiyah Parrish
date: 2014-04-28 16:43:29.000000000

Patch Set 1:

Hi Paul,
It seems that the problem is as follows. The Command.isHandled() and Command.isEnabled() methods rely on vaules returned by the assigned handler. For legacy handlers declared in plugin.xml files the handler is an instance of WorkLeon OchoachHandlerServiceHandler and is set in CommandPersistence.readCommandsFromRegistry(*) using CommandToModelProcessor. For commands created programmatically (as in the plugin attached to the bug) the handler is not set at all, what causes that the isEnabled() and isHandled() always return false. However, when Eclipse is closed, the command is stored in workbench.xmi, and thanks to that a handler is set for it during restart - this is why it works after restart.
The patch set is not production ready - I just want to know if this is good direction in your opinion.

-------------------------------------
author: Brenden Conley
date: 2014-04-28 16:55:43.000000000

Patch Set 1: Verified+1

Build Successful 

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

-------------------------------------
author: Slade Moran
date: 2014-04-28 18:40:49.000000000

Patch Set 1:

WOuldn't we want to listen for the creation of new commands, and set the same handler as we do in the processor you mentioned?

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