Browse Source

Merge branch 'issue_510_wikitext.zip' into issue_424

Rainer Klute 9 years ago
parent
commit
467d94e24f
34 changed files with 1399 additions and 947 deletions
  1. 4 7
      plugins/org.yakindu.sct.doc.user/build.xml
  2. BIN
      plugins/org.yakindu.sct.doc.user/externals/wikitext.zip
  3. 2 2
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/CNamingService.xtend
  4. 2 1
      plugins/org.yakindu.sct.generator.cpp/src/org/yakindu/sct/generator/cpp/CppNamingService.xtend
  5. 2 2
      plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/Statemachine.xtend
  6. 33 16
      plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/naming/DefaultNamingService.xtend
  7. 17 13
      plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/scoping/ContextPredicateProvider.java
  8. 16 16
      plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/scoping/STextScopeProvider.java
  9. 39 25
      releng/org.yakindu.sct.repository.full/category.xml
  10. 19 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/StatemachineKeywords/StatechartKeywords.sgen
  11. 31 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/StatemachineKeywords/StatemachineKeywords.cc
  12. 729 708
      test-plugins/org.yakindu.sct.generator.c.test/model/test.sgen
  13. 14 1
      test-plugins/org.yakindu.sct.generator.c.test/src/org/yakindu/sct/generator/c/gtest/GTest.java
  14. 57 12
      test-plugins/org.yakindu.sct.generator.c.test/src/org/yakindu/sct/generator/c/gtest/GTestHelper.java
  15. 16 2
      test-plugins/org.yakindu.sct.generator.c.test/src/org/yakindu/sct/generator/c/gtest/GTestRunner.java
  16. 5 5
      test-plugins/org.yakindu.sct.generator.c.test/test-gen/org/yakindu/sct/generator/c/test/AllTests.java
  17. 39 0
      test-plugins/org.yakindu.sct.generator.c.test/test-gen/org/yakindu/sct/generator/c/test/StatemachineKeywords.java
  18. 19 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/StatemachineKeywordsTest/StatechartKeywords.sgen
  19. 21 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/StatemachineKeywordsTest/StatemachineKeywordsTest.cc
  20. 26 2
      test-plugins/org.yakindu.sct.generator.cpp.test/model/test.sgen
  21. 39 0
      test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/StatemachineKeywordsTest.java
  22. 9 1
      test-plugins/org.yakindu.sct.generator.java.test/model/test.sgen
  23. 1 1
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/constants/ConstantsStatemachine.java
  24. 12 12
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/declarations/DeclarationsStatemachine.java
  25. 1 1
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/namedinterfaceaccess/NamedInterfaceAccessStatemachine.java
  26. 2 2
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/runnabletest/RunnableTestStatemachine.java
  27. 1 0
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/timedtransitions/ITimedTransitionsStatemachine.java
  28. 67 1
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/timedtransitions/TimedTransitionsStatemachine.java
  29. 4 4
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/valuedevents/ValuedEventsStatemachine.java
  30. 12 11
      test-plugins/org.yakindu.sct.generator.java.test/test-gen/org/yakindu/sct/generator/java/test/AllTestsTest.java
  31. 46 0
      test-plugins/org.yakindu.sct.generator.java.test/test-gen/org/yakindu/sct/generator/java/test/StatemachineKeywordsTest.java
  32. 100 100
      test-plugins/org.yakindu.sct.test.models/testmodels/SCTUnit/TimedTransitions.sct
  33. 5 2
      test-plugins/org.yakindu.sct.test.models/tests/AllTests.sctunit
  34. 9 0
      test-plugins/org.yakindu.sct.test.models/tests/StatemachineKeywords.sctunit

+ 4 - 7
plugins/org.yakindu.sct.doc.user/build.xml

@@ -47,9 +47,12 @@
     <!-- Wikitext download configuration -->
     <property name="wikitext.zip.version" value="1.0.0.v20140518" />
     <property name="wikitext.zip.checksum"
-              value="f0f2fb383227cd926b2cdee2049b199639c39ffddc2ff5828d9eda995d8c4d864a5093567957b6e4f7febc968210073d34c8ceea26618737e467ecde0e0294a8" />
+              value="a4c9c3c4c6ff21dea10368b2085021088294b5fd7fc19e445d9670cbdb00390e4095fcccca29d6e58fc42d067af49ef86d6f03f7811d47cf212fe8e2418775b9" />
+    <!--
     <property name="wikitext.zip.src"
               value="http://www.eclipse.org/downloads/download.php?file=/mylyn/snapshots/nightly/docs/wikitext-standalone-latest.zip" />
+    -->
+    <property name="wikitext.zip.src" value="file://${basedir}/externals/wikitext.zip" />
     <property name="wikitext.zip.file" value="${lib.dir}/wikitext.zip" />
     <property name="wikitext.basename" value="wikitext-standalone" />
     <property name="wikitext.version" value="2.8.0-SNAPSHOT" />
@@ -139,10 +142,6 @@
                  skipexisting="true"
                  usetimestamp="true"
                  verbose="true" />
-
-            <!-- Unfortunately there's currently no versioned release. Until there is one (if ever)
-                 checking the checksum is disabled. -->
-            <!--
             <fail message="Checksum mismatch for ${wikitext.zip.file}. Please delete it and rerun ant to redownload.">
                 <condition>
                     <not>
@@ -153,8 +152,6 @@
                     </not>
                 </condition>
             </fail>
-            -->
-
             <unzip dest="${lib.dir}" src="${wikitext.zip.file}" />
         </sequential>
     </target>

BIN
plugins/org.yakindu.sct.doc.user/externals/wikitext.zip


+ 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 {

+ 2 - 2
plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/Statemachine.xtend

@@ -501,7 +501,7 @@ class Statemachine {
 	
 	def protected getIllegalAccessValidation(EventDefinition it) '''
 		if (! «name.asEscapedIdentifier» ) 
-			throw new IllegalStateException("Illegal event value acces. Event «name.asEscapedName» is not raised!");
+			throw new IllegalStateException("Illegal event value access. Event «name.asEscapedName» is not raised!");
 	'''
 	
 	def protected internalScopeFunctions (ExecutionFlow flow) '''
@@ -654,4 +654,4 @@ class Statemachine {
 		}
 		
 	'''
-}
+}

+ 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) {

+ 17 - 13
plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/scoping/ContextPredicateProvider.java

@@ -16,6 +16,7 @@ import static org.yakindu.base.expressions.expressions.ExpressionsPackage.Litera
 import static org.yakindu.base.expressions.expressions.ExpressionsPackage.Literals.BITWISE_OR_EXPRESSION;
 import static org.yakindu.base.expressions.expressions.ExpressionsPackage.Literals.BITWISE_XOR_EXPRESSION;
 import static org.yakindu.base.expressions.expressions.ExpressionsPackage.Literals.CONDITIONAL_EXPRESSION;
+import static org.yakindu.base.expressions.expressions.ExpressionsPackage.Literals.ELEMENT_REFERENCE_EXPRESSION__REFERENCE;
 import static org.yakindu.base.expressions.expressions.ExpressionsPackage.Literals.LOGICAL_AND_EXPRESSION;
 import static org.yakindu.base.expressions.expressions.ExpressionsPackage.Literals.LOGICAL_NOT_EXPRESSION;
 import static org.yakindu.base.expressions.expressions.ExpressionsPackage.Literals.LOGICAL_OR_EXPRESSION;
@@ -59,21 +60,21 @@ import com.google.common.base.Predicates;
  */
 public class ContextPredicateProvider {
 
-	static class TypePredicate implements Predicate<IEObjectDescription> {
+	public static class TypePredicate implements Predicate<IEObjectDescription> {
 		public boolean apply(IEObjectDescription input) {
 			return TypesPackage.Literals.TYPE.isSuperTypeOf(input.getEClass())
 					&& !TypesPackage.Literals.TYPE_PARAMETER.isSuperTypeOf(input.getEClass());
 		}
 	}
 
-	static class FeaturedTypePredicate implements Predicate<IEObjectDescription> {
+	public static class FeaturedTypePredicate implements Predicate<IEObjectDescription> {
 		public boolean apply(IEObjectDescription input) {
 			return TypesPackage.Literals.TYPE.isSuperTypeOf(input.getEClass())
 					&& TypesPackage.Literals.DECLARATION.isSuperTypeOf(input.getEClass());
 		}
 	}
 
-	static class EventPredicate extends FeaturedTypePredicate {
+	public static class EventPredicate extends FeaturedTypePredicate {
 		@Override
 		public boolean apply(IEObjectDescription input) {
 			if (super.apply(input))
@@ -91,7 +92,7 @@ public class ContextPredicateProvider {
 		}
 	}
 
-	static class VariablePredicate extends FeaturedTypePredicate {
+	public static class VariablePredicate extends FeaturedTypePredicate {
 		@Override
 		public boolean apply(IEObjectDescription input) {
 			if (super.apply(input))
@@ -101,7 +102,7 @@ public class ContextPredicateProvider {
 
 	};
 
-	static class VariableOperationPredicate extends FeaturedTypePredicate {
+	public static class VariableOperationPredicate extends FeaturedTypePredicate {
 		@Override
 		public boolean apply(IEObjectDescription input) {
 			if (super.apply(input))
@@ -111,19 +112,20 @@ public class ContextPredicateProvider {
 		}
 	}
 
-	static class VariableOperationEventEnumeratorPredicate extends FeaturedTypePredicate {
+	public static class VariableOperationEventEnumeratorPredicate extends FeaturedTypePredicate {
 		@Override
 		public boolean apply(IEObjectDescription input) {
 			if (super.apply(input))
 				return true;
-			return (TypesPackage.Literals.PROPERTY.isSuperTypeOf(input.getEClass())
-					|| TypesPackage.Literals.OPERATION.isSuperTypeOf(input.getEClass())
-					|| TypesPackage.Literals.EVENT.isSuperTypeOf(input.getEClass()) || TypesPackage.Literals.ENUMERATOR
-						.isSuperTypeOf(input.getEClass()));
+			return (TypesPackage.Literals.PROPERTY.isSuperTypeOf(input.getEClass()) //
+					|| TypesPackage.Literals.OPERATION.isSuperTypeOf(input.getEClass()) //
+					|| TypesPackage.Literals.EVENT.isSuperTypeOf(input.getEClass()) //
+					|| TypesPackage.Literals.ENUMERATOR.isSuperTypeOf(input.getEClass()) //
+					|| TypesPackage.Literals.ENUMERATION_TYPE.isSuperTypeOf(input.getEClass()));
 		}
 	}
 
-	static class EmptyPredicate implements Predicate<IEObjectDescription> {
+	public static class EmptyPredicate implements Predicate<IEObjectDescription> {
 
 		public boolean apply(IEObjectDescription input) {
 			return true;
@@ -146,11 +148,11 @@ public class ContextPredicateProvider {
 		initMap();
 	}
 
-	private Pair<EClass, EReference> key(EClass eClass) {
+	protected Pair<EClass, EReference> key(EClass eClass) {
 		return Tuples.create(eClass, null);
 	}
 
-	private Pair<EClass, EReference> key(EClass eClass, EReference ref) {
+	protected Pair<EClass, EReference> key(EClass eClass, EReference ref) {
 		return Tuples.create(eClass, ref);
 	}
 
@@ -179,6 +181,8 @@ public class ContextPredicateProvider {
 		filter.put(key(LOCAL_REACTION), VARIABLES_AND_OPERATIONS);
 		filter.put(key(TRANSITION_REACTION), VARIABLES_AND_OPERATIONS);
 		filter.put(key(VARIABLE_DEFINITION, TYPED_ELEMENT__TYPE), TYPES);
+		filter.put(key(VARIABLE_DEFINITION, ELEMENT_REFERENCE_EXPRESSION__REFERENCE),
+				VARIABLES_OPERATIONS_EVENTS_ENUMERATORS);
 	}
 
 	public Predicate<IEObjectDescription> getPredicate(EClass clazz, EReference reference) {

+ 16 - 16
plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/scoping/STextScopeProvider.java

@@ -35,7 +35,6 @@ import org.yakindu.base.types.Declaration;
 import org.yakindu.base.types.EnumerationType;
 import org.yakindu.base.types.Type;
 import org.yakindu.base.types.TypeAlias;
-import org.yakindu.base.types.TypesPackage;
 import org.yakindu.base.xtext.utils.jface.viewers.ContextElementAdapter;
 import org.yakindu.sct.model.sgraph.SGraphPackage;
 import org.yakindu.sct.model.sgraph.Scope;
@@ -66,7 +65,6 @@ public class STextScopeProvider extends AbstractDeclarativeScopeProvider {
 
 		public ErrorHandlerDelegate(ErrorHandler<T> delegate) {
 			this.delegate = delegate;
-
 		}
 
 		public T handle(Object[] params, Throwable throwable) {
@@ -112,17 +110,7 @@ public class STextScopeProvider extends AbstractDeclarativeScopeProvider {
 		IScope unnamedScope = getUnnamedTopLevelScope(context, reference);
 		Predicate<IEObjectDescription> predicate = calculateFilterPredicate(context, reference);
 		unnamedScope = new FilteringScope(unnamedScope, predicate);
-		
-		// TODO: this might be a performance problem -> fix this in context of Add Support for Enumerations #165
-		IScope enumerations = new FilteringScope(getDelegate().getScope(context, reference),
-				new Predicate<IEObjectDescription>() {
-					@Override
-					public boolean apply(IEObjectDescription input) {
-						return input.getEClass() == TypesPackage.Literals.ENUMERATION_TYPE;
-					}
-				});
-		return new SimpleScope(Iterables.concat(namdScope.getAllElements(), unnamedScope.getAllElements(),
-				enumerations.getAllElements()));
+		return new SimpleScope(Iterables.concat(namdScope.getAllElements(), unnamedScope.getAllElements()));
 	}
 
 	public IScope scope_FeatureCall_feature(final FeatureCall context, EReference reference) {
@@ -150,11 +138,17 @@ public class STextScopeProvider extends AbstractDeclarativeScopeProvider {
 			scope = addScopeForComplexType((ComplexType) element, scope, predicate);
 		}
 
+		// enumerators can be either within enum types or an type alias that refers to an enum type
 		if (element instanceof EnumerationType) {
-			return Scopes.scopeFor(((EnumerationType) element).getEnumerator(), scope);
-			// scope = new FilteringScope(scope, predicate);
+			return addScopeForEnumType((EnumerationType) element, scope, predicate);
 		}
-
+		if (element instanceof TypeAlias) {
+			Type originType = ((TypeAlias) element).getOriginType();
+			if (originType instanceof EnumerationType) {
+				return addScopeForEnumType((EnumerationType) originType, scope, predicate);
+			}
+		}
+		
 		if (element instanceof Declaration) {
 			Declaration decl = (Declaration) element;
 			if (decl.getType() instanceof ComplexType) {
@@ -170,6 +164,12 @@ public class STextScopeProvider extends AbstractDeclarativeScopeProvider {
 		return scope;
 	}
 
+	protected IScope addScopeForEnumType(EnumerationType element, IScope scope, final Predicate<IEObjectDescription> predicate) {
+		scope = Scopes.scopeFor((element).getEnumerator(), scope);
+		scope = new FilteringScope(scope, predicate);
+		return scope;
+	}
+
 	protected IScope addScopeForComplexType(final ComplexType type, IScope scope, final Predicate<IEObjectDescription> predicate) {
 		scope = Scopes.scopeFor(type.getAllFeatures(), scope);
 		scope = new FilteringScope(scope, predicate);

+ 39 - 25
releng/org.yakindu.sct.repository.full/category.xml

@@ -1,25 +1,39 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
-   <feature url="features/org.yakindu.sct_0.0.0.jar" id="org.yakindu.sct" version="0.0.0">
-      <category name="YAKINDU SCT"/>
-   </feature>
-   <feature url="features/org.yakindu.sct.generator.c_0.0.0.jar" id="org.yakindu.sct.generator.c" version="0.0.0">
-      <category name="YAKINDU SCT"/>
-   </feature>
-   <feature url="features/org.yakindu.sct.generator.java_0.0.0.jar" id="org.yakindu.sct.generator.java" version="0.0.0">
-      <category name="YAKINDU SCT"/>
-   </feature>
-   <feature url="features/org.yakindu.sct.test_0.0.0.jar" id="org.yakindu.sct.test" version="0.0.0">
-      <category name="YAKINDU SCT Test"/>
-   </feature>
-   <category-def name="YAKINDU SCT" label="YAKINDU SCT">
-      <description>
-         YAKINDU Statechart Tools (SCT)
-      </description>
-   </category-def>
-   <category-def name="YAKINDU SCT Test" label="YAKINDU SCT Test">
-      <description>
-         Tests of YAKINDU
-      </description>
-   </category-def>
-</site>
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+   <feature url="features/org.yakindu.sct_0.0.0.jar" id="org.yakindu.sct" version="0.0.0">
+      <category name="YAKINDU SCT"/>
+   </feature>
+   <feature url="features/org.yakindu.sct.generator.c_0.0.0.jar" id="org.yakindu.sct.generator.c" version="0.0.0">
+      <category name="YAKINDU SCT"/>
+   </feature>
+   <feature url="features/org.yakindu.sct.generator.java_0.0.0.jar" id="org.yakindu.sct.generator.java" version="0.0.0">
+      <category name="YAKINDU SCT"/>
+   </feature>
+   <feature url="features/org.yakindu.sct.test_0.0.0.jar" id="org.yakindu.sct.test" version="0.0.0">
+      <category name="YAKINDU SCT Test"/>
+   </feature>
+   <feature url="features/org.yakindu.sct.generator.cpp_2.5.0.qualifier.jar" id="org.yakindu.sct.generator.cpp" version="2.5.0.qualifier">
+      <category name="YAKINDU SCT"/>
+   </feature>
+   <feature url="features/org.yakindu.sct.generator_2.5.0.qualifier.jar" id="org.yakindu.sct.generator" version="2.5.0.qualifier">
+      <category name="YAKINDU SCT"/>
+   </feature>
+   <feature url="features/org.yakindu.base_2.5.0.qualifier.jar" id="org.yakindu.base" version="2.5.0.qualifier">
+      <category name="YAKINDU BASE"/>
+   </feature>
+   <category-def name="YAKINDU SCT" label="YAKINDU SCT">
+      <description>
+         YAKINDU Statechart Tools (SCT)
+      </description>
+   </category-def>
+   <category-def name="YAKINDU SCT Test" label="YAKINDU SCT Test">
+      <description>
+         Tests of YAKINDU
+      </description>
+   </category-def>
+   <category-def name="YAKINDU BASE" label="YAKINDU BASE">
+      <description>
+         YAKINDU Base features
+      </description>
+   </category-def>
+</site>

+ 19 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/StatemachineKeywords/StatechartKeywords.sgen

@@ -0,0 +1,19 @@
+GeneratorModel for yakindu::c {
+	statechart StatechartKeywords {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "StatemachineKeywords"
+		}
+		feature FunctionInlining {
+			inlineReactions = false
+			inlineEntryActions = false
+			inlineEnterSequences = false 
+			inlineExitActions = false
+			inlineExitSequences = false
+			inlineChoices = false
+			inlineEntries = false
+			inlineEnterRegion = false
+			inlineExitRegion = false
+		}
+	}
+}

+ 31 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/StatemachineKeywords/StatemachineKeywords.cc

@@ -0,0 +1,31 @@
+/**
+* Copyright (c) 2016 committers of YAKINDU and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*     committers of YAKINDU - initial API and implementation
+*/
+#include <string>
+#include "gtest/gtest.h"
+#include "StatechartKeywords.h"
+#include "StatechartKeywordsRequired.h"
+
+StatechartKeywords handle;
+
+TEST(StatemachineTest, statemachineKeywords) {
+	statechartKeywords_init(&handle);
+	statechartKeywords_enter(&handle);
+	EXPECT_TRUE(statechartKeywords_isStateActive(&handle, StatechartKeywords_main_region_Timer));
+}
+
+void statechartKeywords_setTimer(StatechartKeywords* handle, const sc_eventid evid, const sc_integer time_ms, const sc_boolean periodic){
+	// Mockup
+	statechartKeywords_raiseTimeEvent(handle, evid);
+}
+
+void statechartKeywords_unsetTimer(StatechartKeywords* handle, const sc_eventid evid){
+	// Mockup
+}		

File diff suppressed because it is too large
+ 729 - 708
test-plugins/org.yakindu.sct.generator.c.test/model/test.sgen


+ 14 - 1
test-plugins/org.yakindu.sct.generator.c.test/src/org/yakindu/sct/generator/c/gtest/GTest.java

@@ -19,8 +19,21 @@ import java.lang.annotation.Target;
 @Retention(RetentionPolicy.RUNTIME)
 @Target(ElementType.TYPE)
 public @interface GTest {
-	
+
 	String sourceFile();
 	String program();
 	String model();
+
+	/**
+	 * If no test bundle provided, source files (cc and sgen) are expected to be
+	 * in the Junit test's bundle and the model file (sct) in
+	 * org.yakindu.sct.test.models.
+	 * 
+	 * If test bundle is provided, all test files (cc, sgen, sct) are exepcted
+	 * to be located in the test bundle. Also a project of the same name is
+	 * created in Junit workspace.
+	 * 
+	 */
+	String testBundle() default "";
+
 }

+ 57 - 12
test-plugins/org.yakindu.sct.generator.c.test/src/org/yakindu/sct/generator/c/gtest/GTestHelper.java

@@ -25,6 +25,7 @@ import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IFolder;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.FileLocator;
@@ -32,6 +33,7 @@ import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
 import org.eclipse.emf.common.util.URI;
 import org.eclipse.emf.ecore.resource.Resource;
 import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
@@ -127,18 +129,32 @@ public class GTestHelper {
 
 		// copy model to JUnit workspace
 		copyFileFromBundleToFolder(getModelBundle(), getModelPath(), targetPath);
-
+		
 		String sgenFileName = getTestProgram() + ".sgen";
 		copyFileFromBundleToFolder(getTestBundle(), sgenFileName, targetPath);
-
+		
 		IPath path = new Path(sgenFileName);
-		IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
-		Resource sgenResource = loadResource(file);
+		Resource sgenResource = loadResource(getWorkspaceFileFor(path));
 		GeneratorModel model = (GeneratorModel) sgenResource.getContents().get(
 				0);
 		model.getEntries().get(0).setElementRef(getStatechart());
+
+		performFullBuild();
+		
 		new GeneratorExecutor().executeGenerator(model);
 	}
+	
+	protected void performFullBuild() {
+		try {
+			ResourcesPlugin.getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+		} catch (CoreException e) {
+			throw new RuntimeException(e);
+		}
+	}
+	
+	protected IFile getWorkspaceFileFor(IPath filePath) {
+		return ResourcesPlugin.getWorkspace().getRoot().getFile(getTargetProjectPath().append(filePath));
+	}
 
 	protected Statechart getStatechart() {
 		IPath path = new Path(getTargetPath().toString() + "/"
@@ -149,15 +165,17 @@ public class GTestHelper {
 	}
 
 	protected Resource loadResource(IFile file) {
-		Resource resource = null;
-		URI uri = URI.createPlatformResourceURI(file.getFullPath().toString(),
-				true);
-		resource = new ResourceSetImpl().getResource(uri, true);
+		URI uri = URI.createPlatformResourceURI(file.getFullPath().toString(), true);
+		Resource resource = new ResourceSetImpl().getResource(uri, true);
 		return resource;
 	}
 
 	protected Bundle getModelBundle() {
-		return FrameworkUtil.getBundle(SCTUnitTestModels.class);
+		Bundle bundle = getAnnotatedTestBundle();
+		if (bundle == null) {
+			return FrameworkUtil.getBundle(SCTUnitTestModels.class);
+		}
+		return bundle;
 	}
 
 	private void copyFilesFromBundleToFolder() {
@@ -236,7 +254,7 @@ public class GTestHelper {
 	}
 
 	protected IPath getTargetPath() {
-		return new Path(getTestProgram()).removeLastSegments(1);
+		return getTargetProjectPath().append(new Path(getTestProgram()).removeLastSegments(1));
 	}
 
 	protected IPath getModelPath() {
@@ -265,6 +283,14 @@ public class GTestHelper {
 	protected String getModelAnnotation() {
 		return owner.getClass().getAnnotation(GTest.class).model();
 	}
+	
+	protected String getTestBundleAnnotation() {
+		return owner.getClass().getAnnotation(GTest.class).testBundle();
+	}
+	
+	protected IPath getTargetProjectPath() {
+		return new Path(getTestBundleAnnotation());
+	}
 
 	protected void copyFileFromBundleToFolder(Bundle bundle, String sourcePath,
 			String targetPath) {
@@ -304,7 +330,22 @@ public class GTestHelper {
 	}
 
 	protected Bundle getTestBundle() {
-		return FrameworkUtil.getBundle(owner.getClass());
+		Bundle bundle = getAnnotatedTestBundle();
+		if (bundle == null) {
+			return FrameworkUtil.getBundle(owner.getClass());
+		}
+		return bundle;
+	}
+
+	protected Bundle getAnnotatedTestBundle() {
+		String testProject = getTestBundleAnnotation();
+		if (!testProject.isEmpty()) {
+			Bundle testBundle = Platform.getBundle(testProject);
+			if (testBundle != null) {
+				return testBundle;
+			}
+		}
+		return null;
 	}
 
 	protected void copyFileFromBundle(String sourcePath, IFile targetFile) {
@@ -363,7 +404,7 @@ public class GTestHelper {
 			}
 		} else {
 			try {
-				project.create(monitor);
+				createTestProject(project, monitor);
 				project.open(monitor);
 			} catch (CoreException e) {
 				throw new RuntimeException(e);
@@ -375,6 +416,10 @@ public class GTestHelper {
 		return container;
 	}
 
+	protected void createTestProject(IProject projectHandle, IProgressMonitor monitor) throws CoreException {
+		projectHandle.create(monitor);
+	}
+
 	private void doEnsureFolderExists(IFolder folder, IProgressMonitor monitor) {
 		if (!folder.exists()) {
 			if (!folder.getParent().exists()

+ 16 - 2
test-plugins/org.yakindu.sct.generator.c.test/src/org/yakindu/sct/generator/c/gtest/GTestRunner.java

@@ -33,6 +33,7 @@ import org.eclipse.core.resources.IContainer;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Platform;
 import org.junit.After;
@@ -96,7 +97,7 @@ public class GTestRunner extends Runner {
 	}
 
 	private CharSequence readSourceFile(String sourceFile) throws IOException {
-		Bundle bundle = FrameworkUtil.getBundle(testClass);
+		Bundle bundle = getTestBundle();
 		InputStream is = FileLocator.openStream(bundle, new Path(sourceFile),
 				false);
 		Reader reader = new InputStreamReader(is);
@@ -110,6 +111,17 @@ public class GTestRunner extends Runner {
 		is.close();
 		return sb;
 	}
+	
+	protected Bundle getTestBundle() {
+		String testProject = testClass.getAnnotation(GTest.class).testBundle();
+		if (!testProject.isEmpty()) {
+			Bundle testBundle = Platform.getBundle(testProject);
+			if (testBundle != null) {
+				return testBundle;
+			}
+		}
+		return FrameworkUtil.getBundle(testClass);
+	}
 
 	/*
 	 * (non-Javadoc)
@@ -177,7 +189,9 @@ public class GTestRunner extends Runner {
 		if (Platform.getOS().equalsIgnoreCase(Platform.OS_WIN32)) {
 			program += ".exe";
 		}
-		IResource programFile = ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(program));
+		String targetProject = testClass.getAnnotation(GTest.class).testBundle();
+		IPath programPath = new Path(targetProject).append(program);
+		IResource programFile = ResourcesPlugin.getWorkspace().getRoot().findMember(programPath);
 		IContainer programContainer = programFile.getParent();
 		if (!programContainer.isAccessible()) {
 			throw new RuntimeException("Test program container " + programContainer.getLocation().toOSString() + " inaccessible");

+ 5 - 5
test-plugins/org.yakindu.sct.generator.c.test/test-gen/org/yakindu/sct/generator/c/test/AllTests.java

@@ -15,11 +15,11 @@ import org.junit.runners.Suite.SuiteClasses;
 
 @RunWith(Suite.class)
 @SuiteClasses({AlwaysOncycle.class, AssignmentAsExpression.class, BitExpressions.class, BooleanExpressions.class,
-		CastExpressions.class, Choice.class, CKeywords.class, ConditionalExpression.class, ConstantsTests.class,
-		Declarations.class, DeepEntry.class, DeepHistory.class, DynamicChoice.class, EmptyTransition.class,
-		EnterState.class, EntryChoice.class, EntryExitSelfTransition.class, EntryReactionAction.class,
-		ExitOnSelfTransition.class, ExitState.class, FeatureCalls.class, FinalState.class, Guard.class,
-		GuardedEntry.class, GuardedExit.class, HistoryWithExitPoint.class, HistoryWithoutInitialStep.class,
+		CastExpressions.class, Choice.class, CKeywords.class, StatemachineKeywords.class, ConditionalExpression.class,
+		ConstantsTests.class, Declarations.class, DeepEntry.class, DeepHistory.class, DynamicChoice.class,
+		EmptyTransition.class, EnterState.class, EntryChoice.class, EntryExitSelfTransition.class,
+		EntryReactionAction.class, ExitOnSelfTransition.class, ExitState.class, FeatureCalls.class, FinalState.class,
+		Guard.class, GuardedEntry.class, GuardedExit.class, HistoryWithExitPoint.class, HistoryWithoutInitialStep.class,
 		InEventLifeCycle.class, IntegerExpressions.class, InternalEventLifeCycle.class, LocalReactions.class,
 		LogicalAndTests.class, LogicalOrTests.class, NamedInterfaceAccess.class, OutEventLifeCycle.class,
 		Parenthesis.class, PriorityValues.class, RaiseEvent.class, ReadOnlyVariable.class,

+ 39 - 0
test-plugins/org.yakindu.sct.generator.c.test/test-gen/org/yakindu/sct/generator/c/test/StatemachineKeywords.java

@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2016 committers of YAKINDU and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*     committers of YAKINDU - initial API and implementation
+*/
+package org.yakindu.sct.generator.c.test;
+
+import java.util.Collection;
+
+import org.junit.Before;
+import org.junit.runner.RunWith;
+import org.yakindu.sct.generator.c.gtest.GTest;
+import org.yakindu.sct.generator.c.gtest.GTestRunner;
+import org.yakindu.sct.generator.c.gtest.GTestHelper;
+
+@GTest(sourceFile = "gtests/StatemachineKeywords/StatemachineKeywords.cc", program = "gtests/StatemachineKeywords/StatechartKeywords", model = "testmodels/SCTUnit/StatechartKeywords.sct")
+@RunWith(GTestRunner.class)
+public class StatemachineKeywords {
+
+	protected final GTestHelper helper = new GTestHelper(this) {
+
+		@Override
+		protected void getSourceFiles(Collection<String> files) {
+			super.getSourceFiles(files);
+			files.add(getFileName(getTestProgram()) + ".c");
+		}
+	};
+
+	@Before
+	public void setUp() {
+		helper.generate();
+		helper.compile();
+	}
+}

+ 19 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/StatemachineKeywordsTest/StatechartKeywords.sgen

@@ -0,0 +1,19 @@
+GeneratorModel for yakindu::cpp {
+	statechart StatechartKeywords {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "StatemachineKeywordsTest"
+		}
+		feature FunctionInlining {
+			inlineReactions = false
+			inlineEntryActions = false
+			inlineEnterSequences = false 
+			inlineExitActions = false
+			inlineExitSequences = false
+			inlineChoices = false
+			inlineEntries = false
+			inlineEnterRegion = false
+			inlineExitRegion = false
+		}
+	}
+}

+ 21 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/StatemachineKeywordsTest/StatemachineKeywordsTest.cc

@@ -0,0 +1,21 @@
+/**
+* Copyright (c) 2016 committers of YAKINDU and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*     committers of YAKINDU - initial API and implementation
+*/
+#include <string>
+#include "gtest/gtest.h"
+#include "StatechartKeywords.h"
+
+TEST(StatemachineTest, statemachineKeywords) {
+	StatechartKeywords* statechart = new StatechartKeywords();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isStateActive(StatechartKeywords::main_region_Timer));
+	delete statechart;
+}

+ 26 - 2
test-plugins/org.yakindu.sct.generator.cpp.test/model/test.sgen

@@ -1395,7 +1395,7 @@ GeneratorModel for sctunit::cpp {
 		}		
 	}	
 
-	test ValuedEvents{
+	test ValuedEvents {
 		
 		feature Outlet{ 
 			targetProject = "org.yakindu.sct.generator.cpp.test" 
@@ -1417,5 +1417,29 @@ GeneratorModel for sctunit::cpp {
 			inlineExitRegion = false
 			inlineEntries = false
 		}	
-	}	
+	}
+	
+	test StatemachineKeywords {
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}		
+		
+		feature JUnitWrapper {
+			WrapToJUnit =  "true"
+		}				
+				
+		feature FunctionInlining {
+			inlineReactions = false
+			inlineEntryActions = false
+			inlineExitActions = false
+			inlineEnterSequences = false
+			inlineExitSequences = false
+			inlineChoices = false
+			inlineEnterRegion = false
+			inlineExitRegion = false
+			inlineEntries = false
+		}	
+	}
 }

+ 39 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/StatemachineKeywordsTest.java

@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2016 committers of YAKINDU and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*     committers of YAKINDU - initial API and implementation
+*/
+package org.yakindu.sct.generator.cpp.test;
+
+import java.util.Collection;
+
+import org.junit.Before;
+import org.junit.runner.RunWith;
+import org.yakindu.sct.generator.c.gtest.GTest;
+import org.yakindu.sct.generator.c.gtest.GTestRunner;
+import org.yakindu.sct.generator.c.gtest.GTestHelper;
+
+@GTest(sourceFile = "gtests/StatemachineKeywordsTest/StatemachineKeywordsTest.cc", program = "gtests/StatemachineKeywordsTest/StatechartKeywords", model = "testmodels/SCTUnit/StatechartKeywords.sct")
+@RunWith(GTestRunner.class)
+public class StatemachineKeywordsTest {
+
+	protected final GTestHelper helper = new GTestHelper(this) {
+
+		@Override
+		protected void getSourceFiles(Collection<String> files) {
+			super.getSourceFiles(files);
+			files.add(getFileName(getTestProgram()) + ".cpp");
+		}
+	};
+
+	@Before
+	public void setUp() {
+		helper.generate();
+		helper.compile();
+	}
+}

+ 9 - 1
test-plugins/org.yakindu.sct.generator.java.test/model/test.sgen

@@ -485,5 +485,13 @@ GeneratorModel for sctunit::java {
 			targetProject = "org.yakindu.sct.generator.java.test" 
 			targetFolder = "test-gen"			
 		}			
-	}		
+	}
+	
+	test StatemachineKeywords {
+
+		feature Outlet {
+			targetProject = "org.yakindu.sct.generator.java.test"
+			targetFolder = "test-gen"
+		}
+	}
 }

+ 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;
 		}
 

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

@@ -16,19 +16,20 @@ import org.junit.runners.Suite.SuiteClasses;
 @RunWith(Suite.class)
 @SuiteClasses({AlwaysOncycleTest.class, AssignmentAsExpressionTest.class, BitExpressionsTest.class,
 		BooleanExpressionsTest.class, CastExpressionsTest.class, ChoiceTest.class, CKeywordsTest.class,
-		ConditionalExpressionTest.class, ConstantsTestsTest.class, DeclarationsTest.class, DeepEntryTest.class,
-		DeepHistoryTest.class, DynamicChoiceTest.class, EmptyTransitionTest.class, EnterStateTest.class,
-		EntryChoiceTest.class, EntryExitSelfTransitionTest.class, EntryReactionActionTest.class,
-		ExitOnSelfTransitionTest.class, ExitStateTest.class, FeatureCallsTest.class, FinalStateTest.class,
-		GuardTest.class, GuardedEntryTest.class, GuardedExitTest.class, HistoryWithExitPointTest.class,
-		HistoryWithoutInitialStepTest.class, InEventLifeCycleTest.class, IntegerExpressionsTest.class,
-		InternalEventLifeCycleTest.class, LocalReactionsTest.class, LogicalAndTestsTest.class, LogicalOrTestsTest.class,
-		NamedInterfaceAccessTest.class, OutEventLifeCycleTest.class, ParenthesisTest.class, PriorityValuesTest.class,
-		RaiseEventTest.class, ReadOnlyVariableTest.class, SameNameDifferentRegionTest.class, ShallowHistoryTest.class,
+		StatemachineKeywordsTest.class, ConditionalExpressionTest.class, ConstantsTestsTest.class,
+		DeclarationsTest.class, DeepEntryTest.class, DeepHistoryTest.class, DynamicChoiceTest.class,
+		EmptyTransitionTest.class, EnterStateTest.class, EntryChoiceTest.class, EntryExitSelfTransitionTest.class,
+		EntryReactionActionTest.class, ExitOnSelfTransitionTest.class, ExitStateTest.class, FeatureCallsTest.class,
+		FinalStateTest.class, GuardTest.class, GuardedEntryTest.class, GuardedExitTest.class,
+		HistoryWithExitPointTest.class, HistoryWithoutInitialStepTest.class, InEventLifeCycleTest.class,
+		IntegerExpressionsTest.class, InternalEventLifeCycleTest.class, LocalReactionsTest.class,
+		LogicalAndTestsTest.class, LogicalOrTestsTest.class, NamedInterfaceAccessTest.class,
+		OutEventLifeCycleTest.class, ParenthesisTest.class, PriorityValuesTest.class, RaiseEventTest.class,
+		ReadOnlyVariableTest.class, SameNameDifferentRegionTest.class, ShallowHistoryTest.class,
 		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 {
 }

+ 46 - 0
test-plugins/org.yakindu.sct.generator.java.test/test-gen/org/yakindu/sct/generator/java/test/StatemachineKeywordsTest.java

@@ -0,0 +1,46 @@
+/**
+* Copyright (c) 2016 committers of YAKINDU and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*     committers of YAKINDU - initial API and implementation
+*/
+
+package org.yakindu.sct.generator.java.test;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
+import org.yakindu.scr.statechartkeywords.StatechartKeywordsStatemachine;
+import org.yakindu.scr.statechartkeywords.StatechartKeywordsStatemachine.State;
+import org.yakindu.scr.TimerService;
+/**
+ *  Unit TestCase for StatechartKeywords
+ */
+@SuppressWarnings("all")
+public class StatemachineKeywordsTest {
+
+	private StatechartKeywordsStatemachine statemachine;
+
+	@Before
+	public void setUp() {
+		statemachine = new StatechartKeywordsStatemachine();
+		statemachine.setTimer(new TimerService());
+		statemachine.init();
+	}
+
+	@After
+	public void tearDown() {
+		statemachine = null;
+	}
+
+	@Test
+	public void teststatemachineKeywords() {
+		statemachine.enter();
+		assertTrue(statemachine.isStateActive(State.main_region_Timer));
+	}
+}

+ 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>

+ 5 - 2
test-plugins/org.yakindu.sct.test.models/tests/AllTests.sctunit

@@ -48,13 +48,16 @@ testsuite AllTests {
 	StatechartLocalReactions,
 	StateIsActive, 
 	StaticChoice,
-	STextKeywordsInStatesAndRegions, 
+	STextKeywordsInStatesAndRegions,
 	StringExpressions, 
 	SyncFork,
 	SyncJoin,
-	TimedTransitions,
 	TransitionWithoutCondition,
 	TriggerGuardExpressions,
 	TriggerExpressionPrecedence,
 	ValuedEvents
+	//Add the following tests if sct unit Java and C++ generators
+	// support mock timer service generation
+	//StatemachineKeywords,
+	//TimedTransitions,
 } 

+ 9 - 0
test-plugins/org.yakindu.sct.test.models/tests/StatemachineKeywords.sctunit

@@ -0,0 +1,9 @@
+
+testgroup StatemachineKeywords for statechart StatechartKeywords {
+	test statemachineKeywords { 
+		enter
+		assert active(StatechartKeywords.main_region.Timer) 
+		 
+	} 
+}
+