Community
Participate
Working Groups
Hi, We have a project which is composed of numerous plug-ins. We contributed menus to our object selections(from a Tree) in a view, programmatically by creating command-handler pairs and creating a menu using the AbstractContributionFactory.createContributionItems() and attaching it to a MenuSerive. With Eclipse 4.3 these menus are disabled by default, even if the handler.setEnabled() returns a true. I read that with Eclipse 4.3, we have an application model and we can contribute menus using the application model. And "If you are using Eclipse 4.3 ensure that your application model has an entry pointing to in the HandlerProcessingAddon class in the package org.eclipse.e4.ui.internal.workbench.addons. The bundle symbolic name is org.eclipse.e4.ui.workbench." However, this wont work in our scenario as we cannot modify our plug-ins to accommodate the application model because the different plug-in contributions form a complex framework. I might be wrong, but any information will be helpful because our custom menu entries are disabled and we cannot proceed with our work. Is there a work-around as to how we could enable these entries again? Regards, Megha
Additionally, in of the menus, not all commands are disabled. While in another all are. Thanks and Regards, Megha
I can see a LegacyIDE.e4xmi file in my workspace which has the HandlerProcessingAddon. Is it relevant, how can the application make use of it? Please help with this as we need to migrate to 4.3 and this is a huge blocker as the menu items are not enabled. Regards, Megha
I'm not sure what exactly you are doing. Could you please attach a sample project that demonstrates the problem. PW
Created attachment 232764 [details] Sample project Sample project tries to add a menu item to the project explorer of eclipse when being run as an eclipse application. The menu item should be enabled by default. However it isn't in eclipse 4.3 Kepler works perfectly in eclipse 4.2.1 Juno
Hi, I also checked the Manifest files, the core-expression plugin version is 3.4.401 in eclipse 4.2.1 and 3.4.500 in eclipse 4.3 When I run the same code in eclipse 4.2.1 I get the following error in the console: !SESSION 2013-06-26 09:32:31.099 ----------------------------------------------- eclipse.buildId=M20120914-1800 java.version=1.7.0_5 java.vendor=SAP AG BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US Framework arguments: -product org.eclipse.sdk.ide Command-line arguments: -product org.eclipse.sdk.ide -data C:\EclipseWorkspaces\SampleProjWS_42/../runtime-EclipseApplication -dev file:C:/EclipseWorkspaces/SampleProjWS_42/.metadata/.plugins/org.eclipse.pde.core/Eclipse Application/dev.properties -os win32 -ws win32 -arch x86_64 -consoleLog !ENTRY org.eclipse.e4.ui.workbench 4 0 2013-06-26 09:32:37.895 !MESSAGE Unable to load class 'org.eclipse.e4.ui.internal.workbench.addons.HandlerProcessingAddon' from bundle '94' !STACK 0 java.lang.ClassNotFoundException: org.eclipse.e4.ui.internal.workbench.addons.HandlerProcessingAddon at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107) at java.lang.ClassLoader.loadClass(ClassLoader.java:420) at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:340) at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229) at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1212) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:100) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:71) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:49) at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:254) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:557) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584) at org.eclipse.equinox.launcher.Main.run(Main.java:1438) at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
This might be related to bug 411765 as the sample uses an AbstractContributionFactory.
Moving to M2 as per bug 414630 comment 4.
Contrary to Eclipse 4.3, in 4.4 (I20140427-2030) the menu item becomes enabled after eclipse restart.
Released as http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=585b224d0fc4b52a20cf7feecc8bba960f0f61ef Thanks Wojtek. PW
Verified in I20140428-2000.