Community
Participate
Working Groups
In my adopter product, I have an action which switches an enum property (TaskFlowType). In the model, I have a Service associated with a property which is enabled by the enum property: // *** TemplateReference *** @Type( base = ITemplateReference.class ) @XmlBinding( path = "template-reference") @Label( standard = "template reference") @Enablement( expr = "${root().TaskFlowType == 'Bounded' || root().TaskFlowType == 'Template'}" ) @DependsOn("/TaskFlowType") @Service( impl = TemplateService.class ) ElementProperty PROP_TEMPLATE_REFERENCE = new ElementProperty( TYPE, "TemplateReference" ); ModelElementHandle<ITemplateReference> getTemplateReference(); When the action which switches the TaskFlowType from "Bounded" to "Unbounded" is executed, I'd get the following exception in the log: java.lang.IllegalStateException at org.eclipse.sapphire.services.ServiceContext.services(ServiceContext.java:78) at org.eclipse.sapphire.modeling.ModelElement.services(ModelElement.java:602) at org.eclipse.sapphire.modeling.ModelElement.refreshPropertyEnablement(ModelElement.java:655) at org.eclipse.sapphire.modeling.ModelElement.access$0(ModelElement.java:626) at org.eclipse.sapphire.modeling.ModelElement$7.handle(ModelElement.java:640) at org.eclipse.sapphire.ListenerContext.broadcast(ListenerContext.java:53) at org.eclipse.sapphire.ListenerContext.broadcast(ListenerContext.java:64) at org.eclipse.sapphire.services.Service.broadcast(Service.java:99) at org.eclipse.sapphire.services.DataService.refresh(DataService.java:53) at org.eclipse.sapphire.services.internal.FunctionBasedEnablementService.access$1(FunctionBasedEnablementService.java:1) at org.eclipse.sapphire.services.internal.FunctionBasedEnablementService$1.handle(FunctionBasedEnablementService.java:53) at org.eclipse.sapphire.ListenerContext.broadcast(ListenerContext.java:53) at org.eclipse.sapphire.ListenerContext.broadcast(ListenerContext.java:64) at org.eclipse.sapphire.modeling.el.FunctionResult.refresh(FunctionResult.java:192) at org.eclipse.sapphire.modeling.el.FunctionResult$1.handle(FunctionResult.java:60) at org.eclipse.sapphire.ListenerContext.broadcast(ListenerContext.java:53) at org.eclipse.sapphire.ListenerContext.broadcast(ListenerContext.java:64) at org.eclipse.sapphire.modeling.el.FunctionResult.refresh(FunctionResult.java:192) at org.eclipse.sapphire.modeling.el.FunctionResult$1.handle(FunctionResult.java:60) at org.eclipse.sapphire.ListenerContext.broadcast(ListenerContext.java:53) at org.eclipse.sapphire.ListenerContext.broadcast(ListenerContext.java:64) at org.eclipse.sapphire.modeling.el.FunctionResult.refresh(FunctionResult.java:192) at org.eclipse.sapphire.modeling.el.FunctionResult$1.handle(FunctionResult.java:60) at org.eclipse.sapphire.ListenerContext.broadcast(ListenerContext.java:53) at org.eclipse.sapphire.ListenerContext.broadcast(ListenerContext.java:64) at org.eclipse.sapphire.modeling.el.FunctionResult.refresh(FunctionResult.java:192) at org.eclipse.sapphire.modeling.el.PropertyAccessFunction$1$1.handle(PropertyAccessFunction.java:93) at org.eclipse.sapphire.ListenerContext.broadcast(ListenerContext.java:53) at org.eclipse.sapphire.ListenerContext.broadcast(ListenerContext.java:64) at org.eclipse.sapphire.modeling.el.FunctionResult.refresh(FunctionResult.java:192) at org.eclipse.sapphire.modeling.el.ModelElementFunctionContext$ReadPropertyFunction$1$1.handlePropertyChangedEvent(ModelElementFunctionContext.java:189) at org.eclipse.sapphire.modeling.ModelElement.notifyPropertyChangeListeners(ModelElement.java:1126) at org.eclipse.sapphire.modeling.ModelElement.notifyPropertyChangeListeners(ModelElement.java:1089) at oracle.eclipse.tools.adf.controller.model.internal.TaskFlowFile.refreshProperty(TaskFlowFile.java:141) at org.eclipse.sapphire.modeling.ModelElement.refresh(ModelElement.java:463) at org.eclipse.sapphire.modeling.ModelElement.refresh(ModelElement.java:456) at oracle.eclipse.tools.adf.controller.model.internal.TaskFlowFile.setTaskFlowType(TaskFlowFile.java:81) at oracle.eclipse.tools.adf.controller.model.internal.TaskFlowFile.setTaskFlowType(TaskFlowFile.java:88) at oracle.eclipse.tools.adf.controller.ui.actionhandler.TaskFlowConverterHandler.run(TaskFlowConverterHandler.java:77) at org.eclipse.sapphire.ui.SapphireActionHandler.execute(SapphireActionHandler.java:93) at org.eclipse.sapphire.ui.gef.diagram.editor.SapphireActionHandlerDelegate.run(SapphireActionHandlerDelegate.java:89) at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123) 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:344) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577) at org.eclipse.equinox.launcher.Main.run(Main.java:1410) at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Fixed. Please verify.
Verified the fix. Closing.