I have a plugin built against Luna SR2. That is, it is meant to get most of it's Eclipse dependencies from Luna SR2.
I am also dev-testing against Luna SR2. So a built version of the plugin is installed in to Eclipse Luna SR2 and I am remote debugging it from IntelliJ.
I have a control separate to the project explorer, but similar in nature. When it is active/topmost among its tab group and the plugin menu added to the main menu has a particular item (command) invoked, its action fails. All other items in the menu work fine. When I say it fails, I mean the command does nothing. I can invoke the same command from a context-menu when the project explorer is active in the tab group, so I know the actual handler works. The plugin.xml file does correctly specify the handler and is annotated with the correct Command ID.
I guessed that something must prevent the handler for the command ID being invoked, which would likely be an exception. So I decided to catch all unhandled exceptions and, as a user, click on the menu item having the issue to see if an exception gets thrown. It does.
It seems Eclipse code threw the exception and there is no proprietary plugin code in the stack trace. This is it copied from IntelliJ breakpoint.
this = {Class@5625} "class org.eclipse.swt.widgets.Shell"
Exception = {NoSuchMethodException@10988}
detailMessage = "org.eclipse.swt.widgets.Shell.selectAll()"
cause = {NoSuchMethodException@10988} "java.lang.NoSuchMethodException: org.eclipse.swt.widgets.Shell.selectAll()"
stackTrace = {StackTraceElement[53]@10995}
0 = {StackTraceElement@10997} "java.lang.Class.getMethod(Class.java:1814)"
1 = {StackTraceElement@10998} "org.eclipse.ui.internal.handlers.WidgetMethodHandler.getMethodToExecute(WidgetMethodHandler.java:260)"
2 = {StackTraceElement@10999} "org.eclipse.ui.internal.handlers.SelectAllHandler.getMethodToExecute(SelectAllHandler.java:187)"
3 = {StackTraceElement@11000} "org.eclipse.ui.internal.handlers.WidgetMethodHandler.isHandled(WidgetMethodHandler.java:242)"
4 = {StackTraceElement@11001} "org.eclipse.ui.internal.handlers.WidgetMethodHandler.updateEnablement(WidgetMethodHandler.java:59)"
5 = {StackTraceElement@11002} "org.eclipse.ui.internal.handlers.WidgetMethodHandler$1.handleEvent(WidgetMethodHandler.java:51)"
6 = {StackTraceElement@11003} "org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)"
7 = {StackTraceElement@11004} "org.eclipse.swt.widgets.Display.filterEvent(Display.java:1262)"
8 = {StackTraceElement@11005} "org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1060)"
9 = {StackTraceElement@11006} "org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)"
10 = {StackTraceElement@11007} "org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)"
11 = {StackTraceElement@11008} "org.eclipse.swt.widgets.Control.sendFocusEvent(Control.java:2841)"
12 = {StackTraceElement@11009} "org.eclipse.swt.widgets.Widget.wmSetFocus(Widget.java:2425)"
13 = {StackTraceElement@11010} "org.eclipse.swt.widgets.Control.WM_SETFOCUS(Control.java:5236)"
14 = {StackTraceElement@11011} "org.eclipse.swt.widgets.Canvas.WM_SETFOCUS(Canvas.java:456)"
15 = {StackTraceElement@11012} "org.eclipse.swt.widgets.Decorations.WM_SETFOCUS(Decorations.java:1779)"
16 = {StackTraceElement@11013} "org.eclipse.swt.widgets.Control.windowProc(Control.java:4680)"
17 = {StackTraceElement@11014} "org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:339)"
18 = {StackTraceElement@11015} "org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1626)"
19 = {StackTraceElement@11016} "org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2075)"
20 = {StackTraceElement@11017} "org.eclipse.swt.widgets.Display.windowProc(Display.java:5023)"
21 = {StackTraceElement@11018} "org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)"
22 = {StackTraceElement@11019} "org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2544)"
23 = {StackTraceElement@11020} "org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:498)"
24 = {StackTraceElement@11021} "org.eclipse.swt.widgets.Control.windowProc(Control.java:4705)"
25 = {StackTraceElement@11022} "org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:339)"
26 = {StackTraceElement@11023} "org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1626)"
27 = {StackTraceElement@11024} "org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2075)"
28 = {StackTraceElement@11025} "org.eclipse.swt.widgets.Display.windowProc(Display.java:5023)"
29 = {StackTraceElement@11026} "org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method)"
30 = {StackTraceElement@11027} "org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3141)"
31 = {StackTraceElement@11028} "org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3756)"
32 = {StackTraceElement@11029} "org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)"
33 = {StackTraceElement@11030} "org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)"
34 = {StackTraceElement@11031} "org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)"
35 = {StackTraceElement@11032} "org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)"
36 = {StackTraceElement@11033} "org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)"
37 = {StackTraceElement@11034} "org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)"
38 = {StackTraceElement@11035} "org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)"
39 = {StackTraceElement@11036} "org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)"
40 = {StackTraceElement@11037} "org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)"
41 = {StackTraceElement@11038} "org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)"
42 = {StackTraceElement@11039} "org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)"
43 = {StackTraceElement@11040} "org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)"
44 = {StackTraceElement@11041} "org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)"
45 = {StackTraceElement@11042} "org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)"
46 = {StackTraceElement@11043} "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)"
47 = {StackTraceElement@11044} "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)"
48 = {StackTraceElement@11045} "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)"
49 = {StackTraceElement@11046} "java.lang.reflect.Method.invoke(Method.java:498)"
50 = {StackTraceElement@11047} "org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)"
51 = {StackTraceElement@11048} "org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)"
52 = {StackTraceElement@11049} "org.eclipse.equinox.launcher.Main.run(Main.java:1465)"
suppressedExceptions = {Collections$UnmodifiableRandomAccessList@10993} size = 0
Variables debug info not available
param_1 = "selectAll"
param_2 = {Class[0]@10955}
slot_3 = null
I think this is something to do with the org.eclipse.e4.ui as I don't believe Eclipse Luna SR2 supports E4.
Below are the E4 dependencies currently in the project as imported by Gradle. What should they be changed to in order to support Luna SR2 and later?
org.eclipse:org.eclipse.e4.ui.workbench3:0.12.0.v20140227-2118
org.eclipse:org.eclipse.e4.ui.workbench:1.2.2.v20141212-1259
org.eclipse:org.eclipse.e4.ui.model.workbench:1.1.0.v20140512-1820
org.eclipse:org.eclipse.e4.core.di:1.4.0.v20140414-1837
UPDATE 1: I have now checked the JAR files in the plugin subfolder of a Luna SR2 installation and all the above dependencies match on version, so I am suspecting the issue is some other dependency is not present. I don't know what this would be, since Eclipse's Equinox runtime will have all of the running Eclipse instances dependencies available? So I am very confused something is invoking something that is not present.