Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 399657

Summary: Core expressions not evaluated with HandledMenuItems
Product: [Eclipse Project] Platform Reporter: Dirk Fauth <dirk.fauth>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: nobody
Version: 4.3   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Example project showing HandledMenuItems and Core expression usage none

Description Dirk Fauth CLA 2013-01-31 11:38:17 EST
Created attachment 226398 [details]
Example project showing HandledMenuItems and Core expression usage

Trying to create a menu that handles the visibility of a HandledMenuItem by core expression as described here 

http://www.eclipse.org/forums/index.php/mv/msg/452233/1006381/#msg_1006381 

is broken in Eclipse 4.3 M4.

The attached example is working well within an Eclipse 4.2.1, but running it with an Eclipse 4.3 M4 as target platform will show the command disabled.

I'm not sure if this is related to core expressions or if HandledMenuItems are broken in general. At least I tracked the issue down to MenuManagerRenderFilter.updateElementVisibility() where handlerService.canExecute() returns false for a menu item if it is connected to a command with a command handler. This is because the handler is not found as far as I debugged it.
Comment 1 Dirk Fauth CLA 2013-02-01 07:13:17 EST
Sorry, the title seems to be wrong. HandledMenuItems never get enabled running on a Kepler M4 platform. This seems not be related to Core Expressions.
Comment 2 Nobody - feel free to take it CLA 2013-02-01 07:20:01 EST
You need to add HandlerProcessingAddon to your addons.
Comment 3 Dirk Fauth CLA 2013-02-01 07:31:00 EST
Yes that works! Is that documented anywhere for migration purposes?

What ID should I use to add the org.eclipse.e4.ui.internal.workbench.addons.HandlerProcessingAddon?

And should I create a bug for e4 tooling to add that addon by default? It is missing on creating an Eclipse 4 application with the wizard.
Comment 4 Nobody - feel free to take it CLA 2013-02-01 07:42:59 EST
There are already bugs open for this issue. I haven't had time to tackle them yet.
Comment 5 Dirk Fauth CLA 2013-02-01 07:58:09 EST
From my point of view this bug can be closed then
Comment 6 Paul Webster CLA 2013-02-01 08:50:23 EST

*** This bug has been marked as a duplicate of bug 397837 ***