Browse Source

Merge pull request #504 from Yakindu/issue_#479_DefaultNamingService_creates_no_timeevent_shortname

Issue #479 default naming service creates no timeevent shortname
Markus Mühlbrandt 9 years ago
parent
commit
157ba566a8

+ 2 - 2
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/CNamingService.xtend

@@ -125,9 +125,9 @@ public class CNamingService extends DefaultNamingService {
 		}
 	}
 	
-	override protected prefix(TimeEventSpec it, State state, char separator) {
+	override protected prefix(TimeEventSpec it, NamedElement element, char separator) {
 		if (entry.statemachinePrefix.nullOrEmpty) {
-			super.prefix(it, state, separator).toFirstLower
+			super.prefix(it, element, separator).toFirstLower
 		} else {
 			entry.statemachinePrefix
 		}

+ 2 - 1
plugins/org.yakindu.sct.generator.cpp/src/org/yakindu/sct/generator/cpp/CppNamingService.xtend

@@ -23,6 +23,7 @@ import org.yakindu.sct.model.sgraph.State
 import org.yakindu.sct.model.stext.stext.TimeEventSpec
 
 import static org.yakindu.sct.generator.cpp.CppKeywords.*
+import org.yakindu.base.base.NamedElement
 
 class CppNamingService extends CNamingService {
 
@@ -70,7 +71,7 @@ class CppNamingService extends CNamingService {
 		}
 	}
 
-	override protected prefix(TimeEventSpec it, State state, char separator) {
+	override protected prefix(TimeEventSpec it, NamedElement element, char separator) {
 		if (entry.statemachinePrefix.nullOrEmpty) {
 			""
 		} else {

+ 33 - 16
plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/naming/DefaultNamingService.xtend

@@ -197,19 +197,31 @@ class DefaultNamingService implements INamingService {
 
 	def protected void addShortTimeEventNames(Map<NamedElement, String> map, ExecutionFlow flow, int maxLength,
 		char separator) {
+
+		// Create short name for time events of statechart
+		if (flow.sourceElement instanceof Statechart) {
+			val statechart = flow.sourceElement as Statechart
+			flow.addShortTimeEventName(statechart, statechart.timeEventSpecs, map, maxLength, separator)
+		}
+
+		// Create short name for time events of states
 		for (executionState : flow.states.sortWith(executionScopeDepthComparator)) {
 			if (executionState.sourceElement instanceof State) {
-				var state = executionState.sourceElement as State
-				var timeEventSpecs = state.timeEventSpecs
-				for (tes : timeEventSpecs) {
-					var timeEvent = flow.getTimeEvent(
-						state.fullyQualifiedName + "_time_event_" + timeEventSpecs.indexOf(tes))
-					if (timeEvent != null) {
-						map.put(timeEvent,
-							executionState.getShortName(tes.prefix(state, separator), tes.suffix(state, separator),
-								map.values.toList, maxLength, separator))
-					}
-				}
+				val state = executionState.sourceElement as State
+				executionState.addShortTimeEventName(state, state.timeEventSpecs, map, maxLength, separator)
+			}
+		}
+	}
+
+	def protected addShortTimeEventName(NamedElement executionFlowElement, NamedElement sgraphElement,
+		List<TimeEventSpec> timeEventSpecs, Map<NamedElement, String> map, int maxLength, char separator) {
+		for (tes : timeEventSpecs) {
+			val timeEvent = executionFlowElement.flow.getTimeEvent(sgraphElement.fullyQualifiedName + "_time_event_" +
+				timeEventSpecs.indexOf(tes))
+			if (timeEvent != null) {
+				map.put(timeEvent,
+					executionFlowElement.getShortName(tes.prefix(sgraphElement, separator),
+						tes.suffix(sgraphElement, separator), map.values.toList, maxLength, separator))
 			}
 		}
 	}
@@ -250,12 +262,15 @@ class DefaultNamingService implements INamingService {
 		""
 	}
 
-	def protected prefix(TimeEventSpec it, State state, char separator) {
+	def protected prefix(TimeEventSpec it, NamedElement element, char separator) {
 		activeFlow.name
 	}
 
-	def protected suffix(TimeEventSpec it, State state, char separator) {
-		"tev" + state.timeEventSpecs.indexOf(it)
+	def protected suffix(TimeEventSpec it, NamedElement element, char separator) {
+		switch (element) {
+			Statechart: "tev" + element.timeEventSpecs.indexOf(it)
+			State: "tev" + element.timeEventSpecs.indexOf(it)
+		}
 	}
 
 	def protected prefix(State it, char separator) {
@@ -458,8 +473,10 @@ class DefaultNamingService implements INamingService {
 	def protected dispatch String elementName(Step it, NameShorteningStrategy nameShorteningType) {
 		var parentName = eContainer.elementName(nameShorteningType)
 		// parent name may be null
-		if(( isEnterSequence || isCheckFunction || isEffect ) && (name != null) && (!name.trim.empty)) parentName +
-			separator + name else parentName
+		if (( isEnterSequence || isCheckFunction || isEffect ) && (name != null) && (!name.trim.empty))
+			parentName + separator + name
+		else
+			parentName
 	}
 
 	def protected dispatch String elementName(EObject it, NameShorteningStrategy nameShorteningType) {

+ 1 - 1
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/constants/ConstantsStatemachine.java

@@ -21,7 +21,7 @@ public class ConstantsStatemachine implements IConstantsStatemachine {
 
 		protected long getE2Value() {
 			if (!e2)
-				throw new IllegalStateException("Illegal event value acces. Event E2 is not raised!");
+				throw new IllegalStateException("Illegal event value access. Event E2 is not raised!");
 			return e2Value;
 		}
 

+ 12 - 12
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/declarations/DeclarationsStatemachine.java

@@ -31,7 +31,7 @@ public class DeclarationsStatemachine implements IDeclarationsStatemachine {
 
 		protected boolean getEvCValue() {
 			if (!evC)
-				throw new IllegalStateException("Illegal event value acces. Event EvC is not raised!");
+				throw new IllegalStateException("Illegal event value access. Event EvC is not raised!");
 			return evCValue;
 		}
 
@@ -50,7 +50,7 @@ public class DeclarationsStatemachine implements IDeclarationsStatemachine {
 
 		public long getEvDValue() {
 			if (!evD)
-				throw new IllegalStateException("Illegal event value acces. Event EvD is not raised!");
+				throw new IllegalStateException("Illegal event value access. Event EvD is not raised!");
 			return evDValue;
 		}
 
@@ -65,7 +65,7 @@ public class DeclarationsStatemachine implements IDeclarationsStatemachine {
 
 		protected double getEvEValue() {
 			if (!evE)
-				throw new IllegalStateException("Illegal event value acces. Event EvE is not raised!");
+				throw new IllegalStateException("Illegal event value access. Event EvE is not raised!");
 			return evEValue;
 		}
 
@@ -84,7 +84,7 @@ public class DeclarationsStatemachine implements IDeclarationsStatemachine {
 
 		public String getEvFValue() {
 			if (!evF)
-				throw new IllegalStateException("Illegal event value acces. Event EvF is not raised!");
+				throw new IllegalStateException("Illegal event value access. Event EvF is not raised!");
 			return evFValue;
 		}
 
@@ -182,7 +182,7 @@ public class DeclarationsStatemachine implements IDeclarationsStatemachine {
 
 		protected boolean getEvCValue() {
 			if (!evC)
-				throw new IllegalStateException("Illegal event value acces. Event EvC is not raised!");
+				throw new IllegalStateException("Illegal event value access. Event EvC is not raised!");
 			return evCValue;
 		}
 
@@ -201,7 +201,7 @@ public class DeclarationsStatemachine implements IDeclarationsStatemachine {
 
 		public long getEvDValue() {
 			if (!evD)
-				throw new IllegalStateException("Illegal event value acces. Event EvD is not raised!");
+				throw new IllegalStateException("Illegal event value access. Event EvD is not raised!");
 			return evDValue;
 		}
 
@@ -216,7 +216,7 @@ public class DeclarationsStatemachine implements IDeclarationsStatemachine {
 
 		protected double getEvEValue() {
 			if (!evE)
-				throw new IllegalStateException("Illegal event value acces. Event EvE is not raised!");
+				throw new IllegalStateException("Illegal event value access. Event EvE is not raised!");
 			return evEValue;
 		}
 
@@ -235,7 +235,7 @@ public class DeclarationsStatemachine implements IDeclarationsStatemachine {
 
 		public String getEvFValue() {
 			if (!evF)
-				throw new IllegalStateException("Illegal event value acces. Event EvF is not raised!");
+				throw new IllegalStateException("Illegal event value access. Event EvF is not raised!");
 			return evFValue;
 		}
 
@@ -518,7 +518,7 @@ public class DeclarationsStatemachine implements IDeclarationsStatemachine {
 
 	private boolean getEvInCValue() {
 		if (!evInC)
-			throw new IllegalStateException("Illegal event value acces. Event EvInC is not raised!");
+			throw new IllegalStateException("Illegal event value access. Event EvInC is not raised!");
 		return evInCValue;
 	}
 	private void raiseEvInD(long value) {
@@ -528,7 +528,7 @@ public class DeclarationsStatemachine implements IDeclarationsStatemachine {
 
 	private long getEvInDValue() {
 		if (!evInD)
-			throw new IllegalStateException("Illegal event value acces. Event EvInD is not raised!");
+			throw new IllegalStateException("Illegal event value access. Event EvInD is not raised!");
 		return evInDValue;
 	}
 	private void raiseEvInE(double value) {
@@ -538,7 +538,7 @@ public class DeclarationsStatemachine implements IDeclarationsStatemachine {
 
 	private double getEvInEValue() {
 		if (!evInE)
-			throw new IllegalStateException("Illegal event value acces. Event EvInE is not raised!");
+			throw new IllegalStateException("Illegal event value access. Event EvInE is not raised!");
 		return evInEValue;
 	}
 	private void raiseEvInF(String value) {
@@ -548,7 +548,7 @@ public class DeclarationsStatemachine implements IDeclarationsStatemachine {
 
 	private String getEvInFValue() {
 		if (!evInF)
-			throw new IllegalStateException("Illegal event value acces. Event EvInF is not raised!");
+			throw new IllegalStateException("Illegal event value access. Event EvInF is not raised!");
 		return evInFValue;
 	}
 

+ 1 - 1
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/namedinterfaceaccess/NamedInterfaceAccessStatemachine.java

@@ -48,7 +48,7 @@ public class NamedInterfaceAccessStatemachine implements INamedInterfaceAccessSt
 
 		protected long getNumberPressedValue() {
 			if (!numberPressed)
-				throw new IllegalStateException("Illegal event value acces. Event NumberPressed is not raised!");
+				throw new IllegalStateException("Illegal event value access. Event NumberPressed is not raised!");
 			return numberPressedValue;
 		}
 

+ 2 - 2
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/runnabletest/RunnableTestStatemachine.java

@@ -37,7 +37,7 @@ public class RunnableTestStatemachine implements IRunnableTestStatemachine {
 
 		public long getEv_outValue() {
 			if (!ev_out)
-				throw new IllegalStateException("Illegal event value acces. Event Ev_out is not raised!");
+				throw new IllegalStateException("Illegal event value access. Event Ev_out is not raised!");
 			return ev_outValue;
 		}
 
@@ -52,7 +52,7 @@ public class RunnableTestStatemachine implements IRunnableTestStatemachine {
 
 		protected long getEv_inValue() {
 			if (!ev_in)
-				throw new IllegalStateException("Illegal event value acces. Event Ev_in is not raised!");
+				throw new IllegalStateException("Illegal event value access. Event Ev_in is not raised!");
 			return ev_inValue;
 		}
 

+ 1 - 0
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/timedtransitions/ITimedTransitionsStatemachine.java

@@ -3,4 +3,5 @@ import org.yakindu.scr.IStatemachine;
 import org.yakindu.scr.ITimerCallback;
 
 public interface ITimedTransitionsStatemachine extends ITimerCallback, IStatemachine {
+
 }

+ 67 - 1
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/timedtransitions/TimedTransitionsStatemachine.java

@@ -15,7 +15,27 @@ public class TimedTransitionsStatemachine implements ITimedTransitionsStatemachi
 
 	private ITimer timer;
 
-	private final boolean[] timeEvents = new boolean[1];
+	private final boolean[] timeEvents = new boolean[2];
+
+	private long x;
+
+	protected void setX(long value) {
+		x = value;
+	}
+
+	protected long getX() {
+		return x;
+	}
+
+	private long y;
+
+	protected void setY(long value) {
+		y = value;
+	}
+
+	protected long getY() {
+		return y;
+	}
 
 	public TimedTransitionsStatemachine() {
 
@@ -33,6 +53,9 @@ public class TimedTransitionsStatemachine implements ITimedTransitionsStatemachi
 		clearEvents();
 		clearOutEvents();
 
+		setX(0);
+
+		setY(0);
 	}
 
 	public void enter() {
@@ -43,11 +66,15 @@ public class TimedTransitionsStatemachine implements ITimedTransitionsStatemachi
 		if (timer == null) {
 			throw new IllegalStateException("timer not set.");
 		}
+		entryAction();
+
 		enterSequence_main_region_default();
 	}
 
 	public void exit() {
 		exitSequence_main_region();
+
+		exitAction();
 	}
 
 	/**
@@ -121,22 +148,49 @@ public class TimedTransitionsStatemachine implements ITimedTransitionsStatemachi
 		timeEvents[eventID] = true;
 	}
 
+	private boolean check__lr0() {
+		return timeEvents[1];
+	}
+
+	private boolean check__lr1() {
+		return true;
+	}
+
 	private boolean check_main_region_Start_tr0_tr0() {
 		return timeEvents[0];
 	}
 
+	private void effect__lr0() {
+		setX(getX() + 1);
+	}
+
+	private void effect__lr1() {
+		setY(getY() + 1);
+	}
+
 	private void effect_main_region_Start_tr0() {
 		exitSequence_main_region_Start();
 
 		enterSequence_main_region_End_default();
 	}
 
+	/* Entry action for statechart 'TimedTransitions'. */
+	private void entryAction() {
+
+		timer.setTimer(this, 1, 1 * 1000, true);
+	}
+
 	/* Entry action for state 'Start'. */
 	private void entryAction_main_region_Start() {
 
 		timer.setTimer(this, 0, 2 * 1000, false);
 	}
 
+	/* Exit action for state 'TimedTransitions'. */
+	private void exitAction() {
+		timer.unsetTimer(this, 1);
+	}
+
 	/* Exit action for state 'Start'. */
 	private void exitAction_main_region_Start() {
 		timer.unsetTimer(this, 0);
@@ -193,6 +247,12 @@ public class TimedTransitionsStatemachine implements ITimedTransitionsStatemachi
 
 	/* The reactions of state Start. */
 	private void react_main_region_Start() {
+		if (check__lr0()) {
+			effect__lr0();
+		}
+
+		effect__lr1();
+
 		if (check_main_region_Start_tr0_tr0()) {
 			effect_main_region_Start_tr0();
 		}
@@ -200,6 +260,12 @@ public class TimedTransitionsStatemachine implements ITimedTransitionsStatemachi
 
 	/* The reactions of state End. */
 	private void react_main_region_End() {
+		if (check__lr0()) {
+			effect__lr0();
+		}
+
+		effect__lr1();
+
 	}
 
 	/* Default react sequence for initial entry  */

+ 4 - 4
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/valuedevents/ValuedEventsStatemachine.java

@@ -15,7 +15,7 @@ public class ValuedEventsStatemachine implements IValuedEventsStatemachine {
 
 		protected long getIntegerEventValue() {
 			if (!integerEvent)
-				throw new IllegalStateException("Illegal event value acces. Event IntegerEvent is not raised!");
+				throw new IllegalStateException("Illegal event value access. Event IntegerEvent is not raised!");
 			return integerEventValue;
 		}
 
@@ -30,7 +30,7 @@ public class ValuedEventsStatemachine implements IValuedEventsStatemachine {
 
 		protected boolean getBooleanEventValue() {
 			if (!booleanEvent)
-				throw new IllegalStateException("Illegal event value acces. Event BooleanEvent is not raised!");
+				throw new IllegalStateException("Illegal event value access. Event BooleanEvent is not raised!");
 			return booleanEventValue;
 		}
 
@@ -45,7 +45,7 @@ public class ValuedEventsStatemachine implements IValuedEventsStatemachine {
 
 		protected double getRealEventValue() {
 			if (!realEvent)
-				throw new IllegalStateException("Illegal event value acces. Event RealEvent is not raised!");
+				throw new IllegalStateException("Illegal event value access. Event RealEvent is not raised!");
 			return realEventValue;
 		}
 
@@ -60,7 +60,7 @@ public class ValuedEventsStatemachine implements IValuedEventsStatemachine {
 
 		protected String getStringEventValue() {
 			if (!stringEvent)
-				throw new IllegalStateException("Illegal event value acces. Event StringEvent is not raised!");
+				throw new IllegalStateException("Illegal event value access. Event StringEvent is not raised!");
 			return stringEventValue;
 		}
 

+ 2 - 2
test-plugins/org.yakindu.sct.generator.java.test/test-gen/org/yakindu/sct/generator/java/test/AllTestsTest.java

@@ -28,7 +28,7 @@ import org.junit.runners.Suite.SuiteClasses;
 		ShallowHistoryWithDeepEntryTest.class, SimpleEventTest.class, SimpleHierachyTest.class,
 		StatechartActiveTest.class, StatechartLocalReactionsTest.class, StateIsActiveTest.class, StaticChoiceTest.class,
 		STextKeywordsInStatesAndRegionsTest.class, StringExpressionsTest.class, SyncForkTest.class, SyncJoinTest.class,
-		TransitionWithoutConditionTest.class, TriggerGuardExpressionsTest.class, TriggerExpressionPrecedenceTest.class,
-		ValuedEventsTest.class})
+		TimedTransitionsTest.class, TransitionWithoutConditionTest.class, TriggerGuardExpressionsTest.class,
+		TriggerExpressionPrecedenceTest.class, ValuedEventsTest.class})
 public class AllTestsTest {
 }

+ 100 - 100
test-plugins/org.yakindu.sct.test.models/testmodels/SCTUnit/TimedTransitions.sct

@@ -1,100 +1,100 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:sgraph="http://www.yakindu.org/sct/sgraph/2.0.0">
-  <sgraph:Statechart xmi:id="_hIDusFEHEeOc8J-qhtddTg" name="TimedTransitions">
-    <regions xmi:id="_hIGyAlEHEeOc8J-qhtddTg" name="main region">
-      <vertices xsi:type="sgraph:Entry" xmi:id="_ntZtAFXTEeOE_N2O5IeRFg">
-        <outgoingTransitions xmi:id="_oZDSEFXTEeOE_N2O5IeRFg" specification="" target="_kWy9kFXTEeOE_N2O5IeRFg"/>
-      </vertices>
-      <vertices xsi:type="sgraph:State" xmi:id="_kWy9kFXTEeOE_N2O5IeRFg" name="Start" incomingTransitions="_oZDSEFXTEeOE_N2O5IeRFg">
-        <outgoingTransitions xmi:id="_uowVkFXTEeOE_N2O5IeRFg" specification="after 2s" target="_kopikFXTEeOE_N2O5IeRFg"/>
-      </vertices>
-      <vertices xsi:type="sgraph:State" xmi:id="_kopikFXTEeOE_N2O5IeRFg" specification="" name="End" incomingTransitions="_uowVkFXTEeOE_N2O5IeRFg"/>
-    </regions>
-  </sgraph:Statechart>
-  <notation:Diagram xmi:id="_hIGyAFEHEeOc8J-qhtddTg" type="org.yakindu.sct.ui.editor.editor.StatechartDiagramEditor" element="_hIDusFEHEeOc8J-qhtddTg" measurementUnit="Pixel">
-    <children xmi:id="_hIJ1UFEHEeOc8J-qhtddTg" type="Region" element="_hIGyAlEHEeOc8J-qhtddTg">
-      <children xsi:type="notation:DecorationNode" xmi:id="_hIcJMFEHEeOc8J-qhtddTg" type="RegionName">
-        <styles xsi:type="notation:ShapeStyle" xmi:id="_hIcJMVEHEeOc8J-qhtddTg"/>
-        <layoutConstraint xsi:type="notation:Location" xmi:id="_hIcJMlEHEeOc8J-qhtddTg"/>
-      </children>
-      <children xsi:type="notation:Shape" xmi:id="_hIcJM1EHEeOc8J-qhtddTg" type="RegionCompartment" fontName="Verdana" lineColor="4210752">
-        <children xmi:id="_ntcwUFXTEeOE_N2O5IeRFg" type="Entry" element="_ntZtAFXTEeOE_N2O5IeRFg">
-          <children xmi:id="_ntd-cFXTEeOE_N2O5IeRFg" type="BorderItemLabelContainer">
-            <children xsi:type="notation:DecorationNode" xmi:id="_ntfMkFXTEeOE_N2O5IeRFg" type="BorderItemLabel">
-              <styles xsi:type="notation:ShapeStyle" xmi:id="_ntfMkVXTEeOE_N2O5IeRFg"/>
-              <layoutConstraint xsi:type="notation:Location" xmi:id="_ntfMklXTEeOE_N2O5IeRFg"/>
-            </children>
-            <styles xsi:type="notation:ShapeStyle" xmi:id="_ntelgFXTEeOE_N2O5IeRFg" fontName="Verdana" lineColor="4210752"/>
-            <layoutConstraint xsi:type="notation:Bounds" xmi:id="_ntelgVXTEeOE_N2O5IeRFg"/>
-          </children>
-          <styles xsi:type="notation:ShapeStyle" xmi:id="_ntcwUVXTEeOE_N2O5IeRFg" fontName="Verdana" lineColor="4210752"/>
-          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_ntcwUlXTEeOE_N2O5IeRFg" x="70" y="33"/>
-        </children>
-        <children xmi:id="_kW0ywFXTEeOE_N2O5IeRFg" type="State" element="_kWy9kFXTEeOE_N2O5IeRFg">
-          <children xsi:type="notation:DecorationNode" xmi:id="_kW2A4FXTEeOE_N2O5IeRFg" type="StateName">
-            <styles xsi:type="notation:ShapeStyle" xmi:id="_kW2A4VXTEeOE_N2O5IeRFg"/>
-            <layoutConstraint xsi:type="notation:Location" xmi:id="_kW2A4lXTEeOE_N2O5IeRFg"/>
-          </children>
-          <children xsi:type="notation:Compartment" xmi:id="_kW2n8FXTEeOE_N2O5IeRFg" type="StateTextCompartment">
-            <children xsi:type="notation:Shape" xmi:id="_kW2n8VXTEeOE_N2O5IeRFg" type="StateTextCompartmentExpression" fontName="Verdana" lineColor="4210752">
-              <layoutConstraint xsi:type="notation:Bounds" xmi:id="_kW2n8lXTEeOE_N2O5IeRFg"/>
-            </children>
-          </children>
-          <children xsi:type="notation:Compartment" xmi:id="_kW5EMFXTEeOE_N2O5IeRFg" type="StateFigureCompartment"/>
-          <styles xsi:type="notation:ShapeStyle" xmi:id="_kW0ywVXTEeOE_N2O5IeRFg" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
-          <styles xsi:type="notation:FontStyle" xmi:id="_kW1Z0FXTEeOE_N2O5IeRFg"/>
-          <styles xsi:type="notation:BooleanValueStyle" xmi:id="_kW5EMVXTEeOE_N2O5IeRFg" name="isHorizontal" booleanValue="true"/>
-          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_kW1Z0VXTEeOE_N2O5IeRFg" x="54" y="102"/>
-        </children>
-        <children xmi:id="_kor-0FXTEeOE_N2O5IeRFg" type="State" element="_kopikFXTEeOE_N2O5IeRFg">
-          <children xsi:type="notation:DecorationNode" xmi:id="_kosl4FXTEeOE_N2O5IeRFg" type="StateName">
-            <styles xsi:type="notation:ShapeStyle" xmi:id="_kosl4VXTEeOE_N2O5IeRFg"/>
-            <layoutConstraint xsi:type="notation:Location" xmi:id="_kotM8FXTEeOE_N2O5IeRFg"/>
-          </children>
-          <children xsi:type="notation:Compartment" xmi:id="_kotM8VXTEeOE_N2O5IeRFg" type="StateTextCompartment">
-            <children xsi:type="notation:Shape" xmi:id="_kotM8lXTEeOE_N2O5IeRFg" type="StateTextCompartmentExpression" fontName="Verdana" lineColor="4210752">
-              <layoutConstraint xsi:type="notation:Bounds" xmi:id="_kotM81XTEeOE_N2O5IeRFg"/>
-            </children>
-          </children>
-          <children xsi:type="notation:Compartment" xmi:id="_kot0AFXTEeOE_N2O5IeRFg" type="StateFigureCompartment"/>
-          <styles xsi:type="notation:ShapeStyle" xmi:id="_kor-0VXTEeOE_N2O5IeRFg" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
-          <styles xsi:type="notation:FontStyle" xmi:id="_kor-0lXTEeOE_N2O5IeRFg"/>
-          <styles xsi:type="notation:BooleanValueStyle" xmi:id="_koubEFXTEeOE_N2O5IeRFg" name="isHorizontal" booleanValue="true"/>
-          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_kor-01XTEeOE_N2O5IeRFg" x="249" y="102"/>
-        </children>
-        <layoutConstraint xsi:type="notation:Bounds" xmi:id="_hIcJNFEHEeOc8J-qhtddTg"/>
-      </children>
-      <styles xsi:type="notation:ShapeStyle" xmi:id="_hIJ1UVEHEeOc8J-qhtddTg" fontName="Verdana" fillColor="15790320" lineColor="12632256"/>
-      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_hIcJNVEHEeOc8J-qhtddTg" x="220" y="10" width="561" height="400"/>
-    </children>
-    <children xsi:type="notation:Shape" xmi:id="_hIfMh1EHEeOc8J-qhtddTg" type="StatechartText" fontName="Verdana" lineColor="4210752">
-      <children xsi:type="notation:DecorationNode" xmi:id="_hIfMiVEHEeOc8J-qhtddTg" type="StatechartName">
-        <styles xsi:type="notation:ShapeStyle" xmi:id="_hIfMilEHEeOc8J-qhtddTg"/>
-        <layoutConstraint xsi:type="notation:Location" xmi:id="_hIfMi1EHEeOc8J-qhtddTg"/>
-      </children>
-      <children xsi:type="notation:Shape" xmi:id="_hIfMjFEHEeOc8J-qhtddTg" type="StatechartTextExpression" fontName="Verdana" lineColor="4210752">
-        <layoutConstraint xsi:type="notation:Bounds" xmi:id="_hIfMjVEHEeOc8J-qhtddTg"/>
-      </children>
-      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_hIfMjlEHEeOc8J-qhtddTg" x="10" y="10" width="200" height="400"/>
-    </children>
-    <styles xsi:type="notation:DiagramStyle" xmi:id="_hIGyAVEHEeOc8J-qhtddTg"/>
-    <edges xmi:id="_oZFuUFXTEeOE_N2O5IeRFg" type="Transition" element="_oZDSEFXTEeOE_N2O5IeRFg" source="_ntcwUFXTEeOE_N2O5IeRFg" target="_kW0ywFXTEeOE_N2O5IeRFg">
-      <children xsi:type="notation:DecorationNode" xmi:id="_oZG8cFXTEeOE_N2O5IeRFg" type="TransitionExpression">
-        <styles xsi:type="notation:ShapeStyle" xmi:id="_oZG8cVXTEeOE_N2O5IeRFg"/>
-        <layoutConstraint xsi:type="notation:Location" xmi:id="_oZG8clXTEeOE_N2O5IeRFg" y="10"/>
-      </children>
-      <styles xsi:type="notation:ConnectorStyle" xmi:id="_oZFuUVXTEeOE_N2O5IeRFg" lineColor="4210752"/>
-      <styles xsi:type="notation:FontStyle" xmi:id="_oZGVYFXTEeOE_N2O5IeRFg" fontName="Verdana"/>
-      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_oZFuUlXTEeOE_N2O5IeRFg" points="[1, 7, -10, -50]$[9, 33, -2, -24]"/>
-    </edges>
-    <edges xmi:id="_uoyx0FXTEeOE_N2O5IeRFg" type="Transition" element="_uowVkFXTEeOE_N2O5IeRFg" source="_kW0ywFXTEeOE_N2O5IeRFg" target="_kor-0FXTEeOE_N2O5IeRFg">
-      <children xsi:type="notation:DecorationNode" xmi:id="_uozY4VXTEeOE_N2O5IeRFg" type="TransitionExpression">
-        <styles xsi:type="notation:ShapeStyle" xmi:id="_uozY4lXTEeOE_N2O5IeRFg"/>
-        <layoutConstraint xsi:type="notation:Location" xmi:id="_uoz_8FXTEeOE_N2O5IeRFg" y="10"/>
-      </children>
-      <styles xsi:type="notation:ConnectorStyle" xmi:id="_uoyx0VXTEeOE_N2O5IeRFg" lineColor="4210752"/>
-      <styles xsi:type="notation:FontStyle" xmi:id="_uozY4FXTEeOE_N2O5IeRFg" fontName="Verdana"/>
-      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_uoyx0lXTEeOE_N2O5IeRFg" points="[24, -4, -103, -4]$[92, -4, -35, -4]"/>
-    </edges>
-  </notation:Diagram>
-</xmi:XMI>
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:sgraph="http://www.yakindu.org/sct/sgraph/2.0.0">
+  <sgraph:Statechart xmi:id="_hIDusFEHEeOc8J-qhtddTg" specification="internal:&#xA;var x:integer=0&#xA;var y:integer=0&#xA;every 1s / x+=1&#xA;oncycle / y+=1" name="TimedTransitions">
+    <regions xmi:id="_hIGyAlEHEeOc8J-qhtddTg" name="main region">
+      <vertices xsi:type="sgraph:Entry" xmi:id="_ntZtAFXTEeOE_N2O5IeRFg">
+        <outgoingTransitions xmi:id="_oZDSEFXTEeOE_N2O5IeRFg" specification="" target="_kWy9kFXTEeOE_N2O5IeRFg"/>
+      </vertices>
+      <vertices xsi:type="sgraph:State" xmi:id="_kWy9kFXTEeOE_N2O5IeRFg" name="Start" incomingTransitions="_oZDSEFXTEeOE_N2O5IeRFg">
+        <outgoingTransitions xmi:id="_uowVkFXTEeOE_N2O5IeRFg" specification="after 2s" target="_kopikFXTEeOE_N2O5IeRFg"/>
+      </vertices>
+      <vertices xsi:type="sgraph:State" xmi:id="_kopikFXTEeOE_N2O5IeRFg" specification="" name="End" incomingTransitions="_uowVkFXTEeOE_N2O5IeRFg"/>
+    </regions>
+  </sgraph:Statechart>
+  <notation:Diagram xmi:id="_hIGyAFEHEeOc8J-qhtddTg" type="org.yakindu.sct.ui.editor.editor.StatechartDiagramEditor" element="_hIDusFEHEeOc8J-qhtddTg" measurementUnit="Pixel">
+    <children xmi:id="_hIJ1UFEHEeOc8J-qhtddTg" type="Region" element="_hIGyAlEHEeOc8J-qhtddTg">
+      <children xsi:type="notation:DecorationNode" xmi:id="_hIcJMFEHEeOc8J-qhtddTg" type="RegionName">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_hIcJMVEHEeOc8J-qhtddTg"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_hIcJMlEHEeOc8J-qhtddTg"/>
+      </children>
+      <children xsi:type="notation:Shape" xmi:id="_hIcJM1EHEeOc8J-qhtddTg" type="RegionCompartment" fontName="Verdana" lineColor="4210752">
+        <children xmi:id="_ntcwUFXTEeOE_N2O5IeRFg" type="Entry" element="_ntZtAFXTEeOE_N2O5IeRFg">
+          <children xmi:id="_ntd-cFXTEeOE_N2O5IeRFg" type="BorderItemLabelContainer">
+            <children xsi:type="notation:DecorationNode" xmi:id="_ntfMkFXTEeOE_N2O5IeRFg" type="BorderItemLabel">
+              <styles xsi:type="notation:ShapeStyle" xmi:id="_ntfMkVXTEeOE_N2O5IeRFg"/>
+              <layoutConstraint xsi:type="notation:Location" xmi:id="_ntfMklXTEeOE_N2O5IeRFg"/>
+            </children>
+            <styles xsi:type="notation:ShapeStyle" xmi:id="_ntelgFXTEeOE_N2O5IeRFg" fontName="Verdana" lineColor="4210752"/>
+            <layoutConstraint xsi:type="notation:Bounds" xmi:id="_ntelgVXTEeOE_N2O5IeRFg"/>
+          </children>
+          <styles xsi:type="notation:ShapeStyle" xmi:id="_ntcwUVXTEeOE_N2O5IeRFg" fontName="Verdana" lineColor="4210752"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_ntcwUlXTEeOE_N2O5IeRFg" x="70" y="33"/>
+        </children>
+        <children xmi:id="_kW0ywFXTEeOE_N2O5IeRFg" type="State" element="_kWy9kFXTEeOE_N2O5IeRFg">
+          <children xsi:type="notation:DecorationNode" xmi:id="_kW2A4FXTEeOE_N2O5IeRFg" type="StateName">
+            <styles xsi:type="notation:ShapeStyle" xmi:id="_kW2A4VXTEeOE_N2O5IeRFg"/>
+            <layoutConstraint xsi:type="notation:Location" xmi:id="_kW2A4lXTEeOE_N2O5IeRFg"/>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_kW2n8FXTEeOE_N2O5IeRFg" type="StateTextCompartment">
+            <children xsi:type="notation:Shape" xmi:id="_kW2n8VXTEeOE_N2O5IeRFg" type="StateTextCompartmentExpression" fontName="Verdana" lineColor="4210752">
+              <layoutConstraint xsi:type="notation:Bounds" xmi:id="_kW2n8lXTEeOE_N2O5IeRFg"/>
+            </children>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_kW5EMFXTEeOE_N2O5IeRFg" type="StateFigureCompartment"/>
+          <styles xsi:type="notation:ShapeStyle" xmi:id="_kW0ywVXTEeOE_N2O5IeRFg" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
+          <styles xsi:type="notation:FontStyle" xmi:id="_kW1Z0FXTEeOE_N2O5IeRFg"/>
+          <styles xsi:type="notation:BooleanValueStyle" xmi:id="_kW5EMVXTEeOE_N2O5IeRFg" name="isHorizontal" booleanValue="true"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_kW1Z0VXTEeOE_N2O5IeRFg" x="54" y="102"/>
+        </children>
+        <children xmi:id="_kor-0FXTEeOE_N2O5IeRFg" type="State" element="_kopikFXTEeOE_N2O5IeRFg">
+          <children xsi:type="notation:DecorationNode" xmi:id="_kosl4FXTEeOE_N2O5IeRFg" type="StateName">
+            <styles xsi:type="notation:ShapeStyle" xmi:id="_kosl4VXTEeOE_N2O5IeRFg"/>
+            <layoutConstraint xsi:type="notation:Location" xmi:id="_kotM8FXTEeOE_N2O5IeRFg"/>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_kotM8VXTEeOE_N2O5IeRFg" type="StateTextCompartment">
+            <children xsi:type="notation:Shape" xmi:id="_kotM8lXTEeOE_N2O5IeRFg" type="StateTextCompartmentExpression" fontName="Verdana" lineColor="4210752">
+              <layoutConstraint xsi:type="notation:Bounds" xmi:id="_kotM81XTEeOE_N2O5IeRFg"/>
+            </children>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_kot0AFXTEeOE_N2O5IeRFg" type="StateFigureCompartment"/>
+          <styles xsi:type="notation:ShapeStyle" xmi:id="_kor-0VXTEeOE_N2O5IeRFg" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
+          <styles xsi:type="notation:FontStyle" xmi:id="_kor-0lXTEeOE_N2O5IeRFg"/>
+          <styles xsi:type="notation:BooleanValueStyle" xmi:id="_koubEFXTEeOE_N2O5IeRFg" name="isHorizontal" booleanValue="true"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_kor-01XTEeOE_N2O5IeRFg" x="249" y="102"/>
+        </children>
+        <layoutConstraint xsi:type="notation:Bounds" xmi:id="_hIcJNFEHEeOc8J-qhtddTg"/>
+      </children>
+      <styles xsi:type="notation:ShapeStyle" xmi:id="_hIJ1UVEHEeOc8J-qhtddTg" fontName="Verdana" fillColor="15790320" lineColor="12632256"/>
+      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_hIcJNVEHEeOc8J-qhtddTg" x="220" y="10" width="561" height="400"/>
+    </children>
+    <children xsi:type="notation:Shape" xmi:id="_hIfMh1EHEeOc8J-qhtddTg" type="StatechartText" fontName="Verdana" lineColor="4210752">
+      <children xsi:type="notation:DecorationNode" xmi:id="_hIfMiVEHEeOc8J-qhtddTg" type="StatechartName">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_hIfMilEHEeOc8J-qhtddTg"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_hIfMi1EHEeOc8J-qhtddTg"/>
+      </children>
+      <children xsi:type="notation:Shape" xmi:id="_hIfMjFEHEeOc8J-qhtddTg" type="StatechartTextExpression" fontName="Verdana" lineColor="4210752">
+        <layoutConstraint xsi:type="notation:Bounds" xmi:id="_hIfMjVEHEeOc8J-qhtddTg"/>
+      </children>
+      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_hIfMjlEHEeOc8J-qhtddTg" x="10" y="10" width="200" height="400"/>
+    </children>
+    <styles xsi:type="notation:DiagramStyle" xmi:id="_hIGyAVEHEeOc8J-qhtddTg"/>
+    <edges xmi:id="_oZFuUFXTEeOE_N2O5IeRFg" type="Transition" element="_oZDSEFXTEeOE_N2O5IeRFg" source="_ntcwUFXTEeOE_N2O5IeRFg" target="_kW0ywFXTEeOE_N2O5IeRFg">
+      <children xsi:type="notation:DecorationNode" xmi:id="_oZG8cFXTEeOE_N2O5IeRFg" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_oZG8cVXTEeOE_N2O5IeRFg"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_oZG8clXTEeOE_N2O5IeRFg" y="10"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_oZFuUVXTEeOE_N2O5IeRFg" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_oZGVYFXTEeOE_N2O5IeRFg" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_oZFuUlXTEeOE_N2O5IeRFg" points="[1, 7, -10, -50]$[9, 33, -2, -24]"/>
+    </edges>
+    <edges xmi:id="_uoyx0FXTEeOE_N2O5IeRFg" type="Transition" element="_uowVkFXTEeOE_N2O5IeRFg" source="_kW0ywFXTEeOE_N2O5IeRFg" target="_kor-0FXTEeOE_N2O5IeRFg">
+      <children xsi:type="notation:DecorationNode" xmi:id="_uozY4VXTEeOE_N2O5IeRFg" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_uozY4lXTEeOE_N2O5IeRFg"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_uoz_8FXTEeOE_N2O5IeRFg" y="10"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_uoyx0VXTEeOE_N2O5IeRFg" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_uozY4FXTEeOE_N2O5IeRFg" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_uoyx0lXTEeOE_N2O5IeRFg" points="[24, -4, -103, -4]$[92, -4, -35, -4]"/>
+    </edges>
+  </notation:Diagram>
+</xmi:XMI>