The exception is thrown when evaluating enabledWhen for the command org.osate.ui.instantiate in org.osate.ui/plugin.xml. The problem is that the property tester org.osate.ui.superType expects an EObjectNode and the selection is an IFile.
This is new for Eclipse 2019-09. In previous versions, the CoreException was thrown, but caught and ignored by the Eclipse Command Core Expressions interpreter, so I never knew that there was an exception being thrown. I thought that evaluating to false on a type mismatch was intended behavior, so I coded to that assumption. In the current version of Eclipse, the exception is logged.
The solution is to adapt the object to EObjectNode before calling the property tester.
Stack trace:
!ENTRY org.eclipse.e4.ui.workbench 4 0 2019-10-09 11:03:23.329
!MESSAGE Failed to evaluate: WithExpression [variable=selection, children=[AndExpression [children=[CountExpression [ size=1, mode: 4 EXACT], IterateExpression [type=AND, children=[AndExpression [children=[<test property="superType" value="ComponentImplementation" plug-in activation: eager/>, NotExpression, NotExpression]]]]]]]]
!STACK 0
org.eclipse.core.runtime.CoreException: No property tester contributes a property org.osate.ui.superType to type class org.eclipse.core.internal.resources.File
at org.eclipse.core.internal.expressions.TypeExtensionManager.getProperty(TypeExtensionManager.java:130)
at org.eclipse.core.internal.expressions.TestExpression.evaluate(TestExpression.java:100)
at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:55)
at org.eclipse.core.internal.expressions.AndExpression.evaluate(AndExpression.java:34)
at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:55)
at org.eclipse.core.internal.expressions.IterateExpression.evaluate(IterateExpression.java:204)
at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:55)
at org.eclipse.core.internal.expressions.AndExpression.evaluate(AndExpression.java:34)
at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:55)
at org.eclipse.core.internal.expressions.WithExpression.evaluate(WithExpression.java:81)
at org.eclipse.ui.internal.services.EvaluationReference.evaluate(EvaluationReference.java:74)
at org.eclipse.ui.internal.services.EvaluationReference.evaluate(EvaluationReference.java:100)
at org.eclipse.ui.internal.services.EvaluationReference.changed(EvaluationReference.java:94)
at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:108)
at org.eclipse.e4.core.internal.contexts.EclipseContext.processScheduled(EclipseContext.java:364)
at org.eclipse.e4.core.internal.contexts.EclipseContext.set(EclipseContext.java:379)
at org.eclipse.ui.internal.services.EvaluationService$1.changed(EvaluationService.java:79)
at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:108)
at org.eclipse.e4.core.internal.contexts.EclipseContext.processScheduled(EclipseContext.java:364)
at org.eclipse.e4.core.internal.contexts.EclipseContext.set(EclipseContext.java:379)
at org.eclipse.ui.internal.e4.compatibility.SelectionService.handleSelectionChanged(SelectionService.java:81)
at org.eclipse.ui.internal.e4.compatibility.SelectionService.lambda$0(SelectionService.java:68)
at org.eclipse.e4.ui.internal.workbench.SelectionAggregator$1.run(SelectionAggregator.java:123)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.e4.ui.internal.workbench.SelectionAggregator.notifyListeners(SelectionAggregator.java:120)
at org.eclipse.e4.ui.internal.workbench.SelectionAggregator.access$2(SelectionAggregator.java:118)
at org.eclipse.e4.ui.internal.workbench.SelectionAggregator$5.lambda$0(SelectionAggregator.java:220)
at org.eclipse.e4.core.contexts.RunAndTrack.runExternalCode(RunAndTrack.java:59)
at org.eclipse.e4.ui.internal.workbench.SelectionAggregator$5.changed(SelectionAggregator.java:220)
at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:108)
at org.eclipse.e4.core.internal.contexts.EclipseContext.processScheduled(EclipseContext.java:364)
at org.eclipse.e4.core.internal.contexts.EclipseContext.set(EclipseContext.java:379)
at org.eclipse.e4.ui.internal.workbench.SelectionServiceImpl.setSelection(SelectionServiceImpl.java:34)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.selectionChanged(CompatibilityPart.java:467)
at org.eclipse.jface.viewers.Viewer$1.run(Viewer.java:151)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:47)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:148)
at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2118)
at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1170)
at org.eclipse.ui.navigator.CommonViewer.handleSelect(CommonViewer.java:466)
at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1199)
at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:242)
at org.eclipse.jface.util.OpenStrategy.access$4(OpenStrategy.java:237)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:402)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4406)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1512)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1535)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1324)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4193)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3810)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1160)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1049)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:633)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:660)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
at org.eclipse.equinox.launcher.Main.run(Main.java:1468)
at org.eclipse.equinox.launcher.Main.main(Main.java:1441)
The exception is thrown when evaluating
enabledWhenfor the commandorg.osate.ui.instantiateinorg.osate.ui/plugin.xml. The problem is that the property testerorg.osate.ui.superTypeexpects anEObjectNodeand the selection is anIFile.This is new for Eclipse 2019-09. In previous versions, the CoreException was thrown, but caught and ignored by the Eclipse Command Core Expressions interpreter, so I never knew that there was an exception being thrown. I thought that evaluating to false on a type mismatch was intended behavior, so I coded to that assumption. In the current version of Eclipse, the exception is logged.
The solution is to adapt the object to
EObjectNodebefore calling the property tester.Stack trace: