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

Bug 406206

Summary: Window menu does not work due to exception in HandlerProxy
Product: [Eclipse Project] Platform Reporter: Nobody - feel free to take it <nobody>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P5 CC: nobody, thorsten.schenkel
Version: 4.3Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard: stalebug

Description Nobody - feel free to take it CLA 2013-04-22 06:00:41 EDT
We programmatically copy extensions to "org.eclipse.ui.menus" into the E4 application model to display window menu items using the this code:

>> our code
------
WorkbenchPlugin.getDefault().initializeContext(eclipseContext);
new MenuPersistence(application, context).reRead();
context.set(IEvaluationService.class, new EvaluationService(context));
new LegacyHandlerService(context).readRegistry();
------

This did work in the earlier 4.3 milestones.
After some changes made to HandlerProxy, specially to isOkToLoad(), the window menu items do not work. They show normally, but when an item is clicked nothing happens on the UI.

The reason for this behavior is this code:

>> org.eclipse.ui.internal.handlers.HandlerProxy.isOkToLoad()
------
if (PlatformUI.getWorkbench().isClosing())
	return handler != null;
...
------

PlatformUI.getWorkbench() throws a runtime exception in the pure E4 world of our application.
Comment 1 Nobody - feel free to take it CLA 2013-04-22 06:08:58 EDT
Related to the fix of bug 385953
Comment 2 Nobody - feel free to take it CLA 2013-04-22 11:53:17 EDT
This did _NOT_ work in the earlier 4.3 milestones.
It worked longer time ago...
Comment 3 Eclipse Genie CLA 2020-05-05 14:49:25 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.