Creation of Safety Patterns fails, causes an NPE
Current status
It is currently impossible to create safety patterns due to the following NPE:
!ENTRY org.eclipse.ui 4 0 2019-06-13 09:20:47.773
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException
at
org.fortiss.af3.exploration.ui.perspective.targetdef.constraint.SafetyPatternBackend.createConstraint(SafetyPatternBackend.java:259)
at
org.fortiss.af3.exploration.ui.perspective.targetdef.constraint.SafetyPatternBackend$3.widgetSelected(SafetyPatternBackend.java:216)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:252)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4131)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1055)
at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3944)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3547)
at
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062)
at
org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:566)
at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at
org.fortiss.af3.rcapplication.AF3Application.start(AF3Application.java:49)
at
org.eclipse.equinox.internal.apEclipseAppHandle.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
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:661)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
at org.eclipse.equinox.launcher.Main.run(Main.java:1476)
at org.eclipse.equinox.launcher.Main.main(Main.java:1449)
Proposed change
Only “lesser or equal” relations for the allocation of tasks to ECUs are reasonable, so update the GUI to account for this fact. Furthermore, the definition of an additional constraint to assign only tasks of the same SIL to an ECU (FCR) shall be possible. Otherwise, all assigned tasks must be implemented with the highest SIL level or arguments have to be given that the lower-level tasks do not interfere with the higher level ones.
Cleanup the current GUI such that
- Only one safety pattern can be added per DSE (subtree).
- The current table serves as a preview of valid allocations and SIL levels of ECUs.
- The description shall reflect that the pattern applies to all tasks and ECUs.
- The equality constraint w.r.t. SIL levels of tasks assigned to the same ECU shall be available as a checkbox.
(from redmine: issue id 3752, created on 2019-06-13, closed on 2019-07-02)