Browse Source

Added tests for different failures ...

terfloth@itemis.de 13 years ago
parent
commit
5e257a0f12
100 changed files with 12640 additions and 9479 deletions
  1. 30 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ExitOnSelfTransition/ExitOnSelfTransition.cc
  2. 8 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ExitOnSelfTransition/ExitOnSelfTransition.sgen
  3. 60 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/GuardedEntry/GuardedEntry.cc
  4. 8 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/GuardedEntry/GuardedEntry.sgen
  5. 36 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/GuardedExit/GuardedExit.cc
  6. 8 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/GuardedExit/GuardedExit.sgen
  7. 35 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/InternalEventLifeCycle/InternalEventLifeCycle.cc
  8. 8 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/InternalEventLifeCycle/InternalEventLifeCycle.sgen
  9. 5 3
      test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/AllTests.java
  10. 39 0
      test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/ExitOnSelfTransition.java
  11. 39 0
      test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/GuardedEntry.java
  12. 39 0
      test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/GuardedExit.java
  13. 39 0
      test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/InternalEventLifeCycle.java
  14. 46 1
      test-plugins/org.yakindu.sct.generator.java.test/model/model.sgen
  15. 24 24
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/IStatemachine.java
  16. 30 30
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/ITimedStatemachine.java
  17. 38 38
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/ITimerService.java
  18. 188 188
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/RuntimeService.java
  19. 58 58
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/TimeEvent.java
  20. 58 58
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/TimerService.java
  21. 191 174
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/alwaysoncycle/AlwaysOncycleStatemachine.java
  22. 18 16
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/alwaysoncycle/IAlwaysOncycleStatemachine.java
  23. 305 305
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/bitexpressions/BitExpressionsStatemachine.java
  24. 32 32
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/bitexpressions/IBitExpressionsStatemachine.java
  25. 288 288
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/booleanexpressions/BooleanExpressionsStatemachine.java
  26. 30 30
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/booleanexpressions/IBooleanExpressionsStatemachine.java
  27. 220 220
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/choice/ChoiceStatemachine.java
  28. 18 18
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/choice/IChoiceStatemachine.java
  29. 896 896
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/ckeywords/CKeywordsStatemachine.java
  30. 70 70
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/ckeywords/ICKeywordsStatemachine.java
  31. 882 882
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/deephistory/DeepHistoryStatemachine.java
  32. 31 31
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/deephistory/IDeepHistoryStatemachine.java
  33. 225 0
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/exitonselftransition/ExitOnSelfTransitionStatemachine.java
  34. 22 0
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/exitonselftransition/IExitOnSelfTransitionStatemachine.java
  35. 169 169
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/featurecalls/FeatureCallsStatemachine.java
  36. 18 18
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/featurecalls/IFeatureCallsStatemachine.java
  37. 213 213
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/guard/GuardStatemachine.java
  38. 22 22
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/guard/IGuardStatemachine.java
  39. 202 0
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/guardedentry/GuardedEntryStatemachine.java
  40. 20 0
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/guardedentry/IGuardedEntryStatemachine.java
  41. 200 0
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/guardedexit/GuardedExitStatemachine.java
  42. 20 0
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/guardedexit/IGuardedExitStatemachine.java
  43. 56 56
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/integerexpressions/IIntegerExpressionsStatemachine.java
  44. 543 543
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/integerexpressions/IntegerExpressionsStatemachine.java
  45. 17 0
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/internaleventlifecycle/IInternalEventLifeCycleStatemachine.java
  46. 244 0
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/internaleventlifecycle/InternalEventLifeCycleStatemachine.java
  47. 110 0
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/javakeywords/IJavaKeywordsStatemachine.java
  48. 1216 0
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/javakeywords/JavaKeywordsStatemachine.java
  49. 17 17
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/priorityvalues/IPriorityValuesStatemachine.java
  50. 269 269
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/priorityvalues/PriorityValuesStatemachine.java
  51. 16 16
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/raiseevent/IRaiseEventStatemachine.java
  52. 216 216
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/raiseevent/RaiseEventStatemachine.java
  53. 56 56
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/realexpressions/IRealExpressionsStatemachine.java
  54. 541 541
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/realexpressions/RealExpressionsStatemachine.java
  55. 15 15
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/samenamedifferentregion/ISameNameDifferentRegionStatemachine.java
  56. 186 186
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/samenamedifferentregion/SameNameDifferentRegionStatemachine.java
  57. 29 29
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/shallowhistory/IShallowHistoryStatemachine.java
  58. 812 812
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/shallowhistory/ShallowHistoryStatemachine.java
  59. 15 15
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/simpleevent/ISimpleEventStatemachine.java
  60. 152 152
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/simpleevent/SimpleEventStatemachine.java
  61. 15 15
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/simplehierachy/ISimpleHierachyStatemachine.java
  62. 163 163
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/simplehierachy/SimpleHierachyStatemachine.java
  63. 16 16
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/statechartlocalreactions/IStatechartLocalReactionsStatemachine.java
  64. 197 197
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/statechartlocalreactions/StatechartLocalReactionsStatemachine.java
  65. 15 15
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/stateisactive/IStateIsActiveStatemachine.java
  66. 195 195
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/stateisactive/StateIsActiveStatemachine.java
  67. 24 24
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/stringexpressions/IStringExpressionsStatemachine.java
  68. 235 235
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/stringexpressions/StringExpressionsStatemachine.java
  69. 17 17
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/syncfork/ISyncForkStatemachine.java
  70. 334 334
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/syncfork/SyncForkStatemachine.java
  71. 21 21
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/syncjoin/ISyncJoinStatemachine.java
  72. 345 345
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/syncjoin/SyncJoinStatemachine.java
  73. 17 17
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/valuedevents/IValuedEventsStatemachine.java
  74. 206 206
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/valuedevents/ValuedEventsStatemachine.java
  75. 29 0
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/AllTestsTest.java
  76. 55 55
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/AlwaysOncycleTest.java
  77. 54 54
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/BitExpressionsTest.java
  78. 53 53
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/BooleanExpressionsTest.java
  79. 49 0
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/CKeywordsTest.java
  80. 70 70
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/ChoiceTest.java
  81. 63 63
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/DeepHistoryTest.java
  82. 53 0
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/ExitOnSelfTransitionTest.java
  83. 58 58
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/GuardTest.java
  84. 79 0
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/GuardedEntryTest.java
  85. 57 0
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/GuardedExitTest.java
  86. 64 64
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/IntegerExpressionsTest.java
  87. 58 0
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/InternalEventLifeCycleTest.java
  88. 54 54
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/PriorityValuesTest.java
  89. 49 0
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/RaiseEventTest.java
  90. 53 53
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/SameNameDifferentRegionTest.java
  91. 81 81
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/ShallowHistoryTest.java
  92. 49 49
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/SimpleEventTest.java
  93. 50 0
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/SimpleHietachyTest.java
  94. 49 49
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/StateIsActiveTest.java
  95. 53 53
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/StatechartLocalReactionsTest.java
  96. 50 50
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/StringExpressionsTest.java
  97. 61 61
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/SyncForkTest.java
  98. 105 105
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/SyncJoinTest.java
  99. 46 0
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/ValuedEventTest.java
  100. 0 0
      test-plugins/org.yakindu.sct.model.sexec.interpreter.test/src-gen/org/yakindu/sct/model/sexec/interpreter/test/AllTests.java

+ 30 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/ExitOnSelfTransition/ExitOnSelfTransition.cc

@@ -0,0 +1,30 @@
+/**
+* Copyright (c) 2012 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 "ExitOnSelfTransition.h"
+
+TEST(StatemachineTest, ExitOnSelfTransitionTest) {
+	ExitOnSelfTransition handle;
+	exitOnSelfTransition_init(&handle);
+	exitOnSelfTransition_enter(&handle);
+	EXPECT_TRUE(exitOnSelfTransition_isActive(&handle, ExitOnSelfTransition_main_region_A));
+	EXPECT_TRUE(exitOnSelfTransitionIface_get_entryCount(&handle) == 1);
+	EXPECT_TRUE(exitOnSelfTransitionIface_get_exitCount(&handle) == 0);
+	exitOnSelfTransitionIface_raise_e(&handle);
+	exitOnSelfTransition_runCycle(&handle);
+	EXPECT_TRUE(exitOnSelfTransitionIface_get_entryCount(&handle) == 2);
+	EXPECT_TRUE(exitOnSelfTransitionIface_get_exitCount(&handle) == 1);
+	exitOnSelfTransitionIface_raise_f(&handle);
+	exitOnSelfTransition_runCycle(&handle);
+	EXPECT_TRUE(exitOnSelfTransitionIface_get_entryCount(&handle) == 2);
+	EXPECT_TRUE(exitOnSelfTransitionIface_get_exitCount(&handle) == 2);
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/ExitOnSelfTransition/ExitOnSelfTransition.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::c {
+	statechart ExitOnSelfTransition {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "ExitOnSelfTransition"
+		}
+	}
+}

+ 60 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/GuardedEntry/GuardedEntry.cc

@@ -0,0 +1,60 @@
+/**
+* Copyright (c) 2012 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 "GuardedEntry.h"
+
+TEST(StatemachineTest, EntryNotTakenOnStatechartEnter) {
+	GuardedEntry handle;
+	guardedEntry_init(&handle);
+	guardedEntry_enter(&handle);
+	EXPECT_TRUE(guardedEntry_isActive(&handle, GuardedEntry_main_region_A));
+	EXPECT_TRUE(guardedEntryIface_get_done(&handle) == false);
+}
+TEST(StatemachineTest, EntryTakenOnStatechartEnter) {
+	GuardedEntry handle;
+	guardedEntry_init(&handle);
+	guardedEntry_enter(&handle);
+	guardedEntryIface_set_guard(true);
+	EXPECT_TRUE(false);
+	EXPECT_TRUE(guardedEntry_isActive(&handle, GuardedEntry_main_region_A));
+	EXPECT_TRUE(guardedEntryIface_get_done(&handle) == true);
+}
+TEST(StatemachineTest, EntryTakenInTransition) {
+	GuardedEntry handle;
+	guardedEntry_init(&handle);
+	guardedEntry_enter(&handle);
+	EXPECT_TRUE(guardedEntry_isActive(&handle, GuardedEntry_main_region_A));
+	guardedEntryIface_raise_e(&handle);
+	guardedEntry_runCycle(&handle);
+	EXPECT_TRUE(guardedEntry_isActive(&handle, GuardedEntry_main_region_B));
+	guardedEntryIface_set_guard(true);
+	guardedEntryIface_set_done(false);
+	guardedEntryIface_raise_e(&handle);
+	guardedEntry_runCycle(&handle);
+	EXPECT_TRUE(guardedEntry_isActive(&handle, GuardedEntry_main_region_A));
+	EXPECT_TRUE(guardedEntryIface_get_done(&handle));
+}
+TEST(StatemachineTest, EntryNotTakenInTransition) {
+	GuardedEntry handle;
+	guardedEntry_init(&handle);
+	guardedEntry_enter(&handle);
+	EXPECT_TRUE(guardedEntry_isActive(&handle, GuardedEntry_main_region_A));
+	guardedEntryIface_raise_e(&handle);
+	guardedEntry_runCycle(&handle);
+	EXPECT_TRUE(guardedEntry_isActive(&handle, GuardedEntry_main_region_B));
+	guardedEntryIface_set_guard(false);
+	guardedEntryIface_set_done(false);
+	guardedEntryIface_raise_e(&handle);
+	guardedEntry_runCycle(&handle);
+	EXPECT_TRUE(guardedEntry_isActive(&handle, GuardedEntry_main_region_A));
+	EXPECT_TRUE(!guardedEntryIface_get_done(&handle));
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/GuardedEntry/GuardedEntry.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::c {
+	statechart GuardedEntry {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "GuardedEntry"
+		}
+	}
+}

+ 36 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/GuardedExit/GuardedExit.cc

@@ -0,0 +1,36 @@
+/**
+* Copyright (c) 2012 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 "GuardedExit.h"
+
+TEST(StatemachineTest, ExitTaken) {
+	GuardedExit handle;
+	guardedExit_init(&handle);
+	guardedExit_enter(&handle);
+	EXPECT_TRUE(guardedExit_isActive(&handle, GuardedExit_main_region_A));
+	EXPECT_TRUE(!guardedExitIface_get_guard(&handle));
+	guardedExitIface_raise_e(&handle);
+	guardedExit_runCycle(&handle);
+	EXPECT_TRUE(guardedExit_isActive(&handle, GuardedExit_main_region_B));
+	EXPECT_TRUE(!guardedExitIface_get_done(&handle));
+}
+TEST(StatemachineTest, ExitNotTaken) {
+	GuardedExit handle;
+	guardedExit_init(&handle);
+	guardedExit_enter(&handle);
+	EXPECT_TRUE(guardedExit_isActive(&handle, GuardedExit_main_region_A));
+	guardedExitIface_set_guard(true);
+	guardedExitIface_raise_e(&handle);
+	guardedExit_runCycle(&handle);
+	EXPECT_TRUE(guardedExit_isActive(&handle, GuardedExit_main_region_B));
+	EXPECT_TRUE(guardedExitIface_get_done(&handle));
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/GuardedExit/GuardedExit.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::c {
+	statechart GuardedExit {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "GuardedExit"
+		}
+	}
+}

+ 35 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/InternalEventLifeCycle/InternalEventLifeCycle.cc

@@ -0,0 +1,35 @@
+/**
+* Copyright (c) 2012 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 "InternalEventLifeCycle.h"
+
+TEST(StatemachineTest, InternalEventLifeCycleTest) {
+	InternalEventLifeCycle handle;
+	internalEventLifeCycle_init(&handle);
+	internalEventLifeCycle_enter(&handle);
+	EXPECT_TRUE(internalEventLifeCycle_isActive(&handle, InternalEventLifeCycle_r1_A));
+	EXPECT_TRUE(internalEventLifeCycle_isActive(&handle, InternalEventLifeCycle_r2_C));
+	internalEventLifeCycleIface_raise_e(&handle);
+	internalEventLifeCycle_runCycle(&handle);
+	EXPECT_TRUE(internalEventLifeCycle_isActive(&handle, InternalEventLifeCycle_r1_A));
+	EXPECT_TRUE(internalEventLifeCycle_isActive(&handle, InternalEventLifeCycle_r2_D));
+	internalEventLifeCycle_runCycle(&handle);
+	EXPECT_TRUE(internalEventLifeCycle_isActive(&handle, InternalEventLifeCycle_r1_A));
+	EXPECT_TRUE(internalEventLifeCycle_isActive(&handle, InternalEventLifeCycle_r2_D));
+	internalEventLifeCycleIface_raise_f(&handle);
+	internalEventLifeCycle_runCycle(&handle);
+	EXPECT_TRUE(internalEventLifeCycle_isActive(&handle, InternalEventLifeCycle_r1_A));
+	EXPECT_TRUE(internalEventLifeCycle_isActive(&handle, InternalEventLifeCycle_r2_C));
+	internalEventLifeCycle_runCycle(&handle);
+	EXPECT_TRUE(internalEventLifeCycle_isActive(&handle, InternalEventLifeCycle_r1_A));
+	EXPECT_TRUE(internalEventLifeCycle_isActive(&handle, InternalEventLifeCycle_r2_C));
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/InternalEventLifeCycle/InternalEventLifeCycle.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::c {
+	statechart InternalEventLifeCycle {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "InternalEventLifeCycle"
+		}
+	}
+}

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

@@ -16,9 +16,11 @@ import org.junit.runners.Suite.SuiteClasses;
 @RunWith(Suite.class)
 @SuiteClasses({AlwaysOncycle.class, BitExpressions.class,
 		BooleanExpressions.class, CKeywords.class, Choice.class,
-		DeepHistory.class, Guard.class, IntegerExpressions.class,
-		PriorityValues.class, RaiseEvent.class, SameNameDifferentRegion.class,
-		ShallowHistory.class, SimpleHietachy.class, StateIsActive.class,
+		DeepHistory.class, ExitOnSelfTransition.class, Guard.class,
+		GuardedEntry.class, GuardedExit.class, IntegerExpressions.class,
+		InternalEventLifeCycle.class, PriorityValues.class, RaiseEvent.class,
+		SameNameDifferentRegion.class, ShallowHistory.class,
+		SimpleHietachy.class, StateIsActive.class,
 		StatechartLocalReactions.class, StringExpressions.class,
 		SyncFork.class, SyncJoin.class, ValuedEvent.class, SimpleEvent.class})
 public class AllTests {

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

@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2012 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/ExitOnSelfTransition/ExitOnSelfTransition.cc", program = "gtests/ExitOnSelfTransition/ExitOnSelfTransition", model = "testmodels/ExitOnSelfTransition.sct")
+@RunWith(GTestRunner.class)
+public class ExitOnSelfTransition {
+
+	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();
+	}
+}

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

@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2012 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/GuardedEntry/GuardedEntry.cc", program = "gtests/GuardedEntry/GuardedEntry", model = "testmodels/GuardedEntry.sct")
+@RunWith(GTestRunner.class)
+public class GuardedEntry {
+
+	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();
+	}
+}

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

@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2012 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/GuardedExit/GuardedExit.cc", program = "gtests/GuardedExit/GuardedExit", model = "testmodels/GuardedExit.sct")
+@RunWith(GTestRunner.class)
+public class GuardedExit {
+
+	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();
+	}
+}

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

@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2012 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/InternalEventLifeCycle/InternalEventLifeCycle.cc", program = "gtests/InternalEventLifeCycle/InternalEventLifeCycle", model = "testmodels/InternalEventLifeCycle.sct")
+@RunWith(GTestRunner.class)
+public class InternalEventLifeCycle {
+
+	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();
+	}
+}

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

@@ -20,7 +20,7 @@ GeneratorModel for yakindu::java {
 			TimerService = true
 			RuntimeService = true
 		}
-	}
+	} 
 	statechart DeepHistory {
 		feature Outlet {
 			targetProject = "org.yakindu.sct.generator.java.test"
@@ -32,6 +32,40 @@ GeneratorModel for yakindu::java {
 			RuntimeService = true
 		}
 	}
+	statechart ExitOnSelfTransition {
+		feature Outlet {
+			targetProject = "org.yakindu.sct.generator.java.test"
+			targetFolder = "src-gen"
+		}
+
+		feature GeneralFeatures {
+			TimerService = true
+			RuntimeService = true
+		}
+	}
+	statechart GuardedEntry {
+		feature Outlet {
+			targetProject = "org.yakindu.sct.generator.java.test"
+			targetFolder = "src-gen"
+		}
+
+		feature GeneralFeatures {
+			TimerService = true
+			RuntimeService = true
+		}
+	}
+	statechart GuardedExit {
+		feature Outlet {
+			targetProject = "org.yakindu.sct.generator.java.test"
+			targetFolder = "src-gen"
+		}
+
+		feature GeneralFeatures {
+			TimerService = true
+			RuntimeService = true
+		}
+	}
+	
 	statechart FeatureCalls {
 		feature Outlet {
 			targetProject = "org.yakindu.sct.generator.java.test"
@@ -186,6 +220,17 @@ GeneratorModel for yakindu::java {
 			RuntimeService = true
 		}
 	}
+	statechart InternalEventLifeCycle {
+		feature Outlet {
+			targetProject = "org.yakindu.sct.generator.java.test"
+			targetFolder = "src-gen"
+		}
+
+		feature GeneralFeatures {
+			TimerService = true
+			RuntimeService = true
+		}
+	}
 	statechart RealExpressions {
 		feature Outlet {
 			targetProject = "org.yakindu.sct.generator.java.test"

+ 24 - 24
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/IStatemachine.java

@@ -1,24 +1,24 @@
-package org.yakindu.scr;
-
-/**
- * Basic interface for statemachines.
- * 
- * 
- */
-public interface IStatemachine {
-
-	/**
-	 * Initializes the statemachine. Use to init internal variables etc.
-	 */
-	public void init();
-
-	/**
-	 * Start a run-to-completion cycle.
-	 */
-	public void runCycle();
-
-	/**
-	 * Enters the statemachine. Sets the statemachine in a defined state.
-	 */
-	public void enter();
-}
+package org.yakindu.scr;
+
+/**
+ * Basic interface for statemachines.
+ * 
+ * 
+ */
+public interface IStatemachine {
+
+	/**
+	 * Initializes the statemachine. Use to init internal variables etc.
+	 */
+	public void init();
+
+	/**
+	 * Start a run-to-completion cycle.
+	 */
+	public void runCycle();
+
+	/**
+	 * Enters the statemachine. Sets the statemachine in a defined state.
+	 */
+	public void enter();
+}

+ 30 - 30
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/ITimedStatemachine.java

@@ -1,30 +1,30 @@
-package org.yakindu.scr;
-
-/**
- * Interface for state machines which use timed event triggers.
- */
-public interface ITimedStatemachine {
-
-	/**
-	 * Set the {@link ITimerService} for the state machine. It must be set
-	 * externally on a timed state machine before a run cycle can be correct
-	 * executed.
-	 * 
-	 * @param timerService
-	 */
-	public void setTimerService(ITimerService timerService);
-
-	/**
-	 * Returns the currently used timer service.
-	 * 
-	 * @return {@link ITimerService}
-	 */
-	public ITimerService getTimerService();
-
-	/**
-	 * Callback method if a {@link TimeEvent} occurred.
-	 * 
-	 * @param timeEvent
-	 */
-	public void onTimeEventRaised(TimeEvent timeEvent);
-}
+package org.yakindu.scr;
+
+/**
+ * Interface for state machines which use timed event triggers.
+ */
+public interface ITimedStatemachine {
+
+	/**
+	 * Set the {@link ITimerService} for the state machine. It must be set
+	 * externally on a timed state machine before a run cycle can be correct
+	 * executed.
+	 * 
+	 * @param timerService
+	 */
+	public void setTimerService(ITimerService timerService);
+
+	/**
+	 * Returns the currently used timer service.
+	 * 
+	 * @return {@link ITimerService}
+	 */
+	public ITimerService getTimerService();
+
+	/**
+	 * Callback method if a {@link TimeEvent} occurred.
+	 * 
+	 * @param timeEvent
+	 */
+	public void onTimeEventRaised(TimeEvent timeEvent);
+}

+ 38 - 38
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/ITimerService.java

@@ -1,38 +1,38 @@
-package org.yakindu.scr;
-
-/**
- * Interface a timer service has to implement. Use to implement your own timer
- * service. A timer service has to be added to a timed state machine.
- * 
- */
-public interface ITimerService {
-
-	/**
-	 * Starts the timing for a given {@link TimeEvent}.
-	 * 
-	 * @param event
-	 *            : The TimeEvent the timer service should throw if timed out.
-	 * @param time
-	 *            : Time in milliseconds after the given time event should be
-	 *            triggered
-	 * @param cycleStartTime
-	 *            : The absolute start time in milliseconds at which the last
-	 *            run cycle was called. Can be used to produce a more accurate
-	 *            timing behavior.
-	 */
-	public void setTimer(TimeEvent event, long time, long cycleStartTime);
-
-	/**
-	 * Unset the given {@link TimeEvent}. Use to unset cyclic repeated time
-	 * events.
-	 * 
-	 * @param event
-	 */
-	public void resetTimer(TimeEvent event);
-
-	/**
-	 * Cancel timer service. Use this to end possible timing threads and free
-	 * memory resources.
-	 */
-	public void cancel();
-}
+package org.yakindu.scr;
+
+/**
+ * Interface a timer service has to implement. Use to implement your own timer
+ * service. A timer service has to be added to a timed state machine.
+ * 
+ */
+public interface ITimerService {
+
+	/**
+	 * Starts the timing for a given {@link TimeEvent}.
+	 * 
+	 * @param event
+	 *            : The TimeEvent the timer service should throw if timed out.
+	 * @param time
+	 *            : Time in milliseconds after the given time event should be
+	 *            triggered
+	 * @param cycleStartTime
+	 *            : The absolute start time in milliseconds at which the last
+	 *            run cycle was called. Can be used to produce a more accurate
+	 *            timing behavior.
+	 */
+	public void setTimer(TimeEvent event, long time, long cycleStartTime);
+
+	/**
+	 * Unset the given {@link TimeEvent}. Use to unset cyclic repeated time
+	 * events.
+	 * 
+	 * @param event
+	 */
+	public void resetTimer(TimeEvent event);
+
+	/**
+	 * Cancel timer service. Use this to end possible timing threads and free
+	 * memory resources.
+	 */
+	public void cancel();
+}

+ 188 - 188
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/RuntimeService.java

@@ -1,188 +1,188 @@
-package org.yakindu.scr;
-
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Timer;
-import java.util.TimerTask;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-
-/**
- * Runtime service for state machines to execute a run to completion step
- * periodically.
- * 
- */
-public class RuntimeService {
-
-	private static RuntimeService runtimeService;
-
-	private Timer timer = new Timer();
-
-	private Map<Long, StatemachineTimerTask> timerTasks = new HashMap<Long, StatemachineTimerTask>();
-
-	private class StatemachineTimerTask extends TimerTask {
-
-		private List<IStatemachine> statemachineList = new LinkedList<IStatemachine>();
-
-		private ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
-
-		private boolean isPaused = false;
-
-		@Override
-		public void run() {
-			lock.readLock().lock();
-			if (!isPaused) {
-				for (IStatemachine statemachine : statemachineList) {
-					statemachine.runCycle();
-				}
-			}
-			lock.readLock().unlock();
-		}
-
-		/**
-		 * Adds the given state machine to the TimerTask.
-		 * 
-		 * @param statemachine
-		 * @return {@code true} if state machine is added properly.
-		 */
-		public boolean addStatemachine(IStatemachine statemachine) {
-			lock.writeLock().lock();
-			boolean ret = statemachineList.add(statemachine);
-			lock.writeLock().unlock();
-			return ret;
-		}
-
-		/**
-		 * Removes the given state machine from the TimerTask.
-		 * 
-		 * @param statemachine
-		 * @return {@code true} if state machine is removed properly.
-		 */
-		public boolean removeStatemachine(IStatemachine statemachine) {
-			lock.writeLock().lock();
-			boolean ret = statemachineList.remove(statemachine);
-			lock.writeLock().unlock();
-			return ret;
-		}
-
-		public void pause() {
-			isPaused = true;
-		}
-
-		public void resume() {
-			isPaused = false;
-		}
-	}
-
-	private RuntimeService() {
-		// Not intended to be instantiated.
-	}
-
-	/**
-	 * Returns the {@code RuntimeService} instance as singleton.
-	 * 
-	 * @return The singleton {@code RuntimeService} instance
-	 */
-	public static RuntimeService getInstance() {
-		if (runtimeService == null) {
-			runtimeService = new RuntimeService();
-		}
-		return runtimeService;
-	}
-
-	/**
-	 * Registers an {@link IStatemachine} for scheduled fixed rate execution
-	 * 
-	 * @param statemachine
-	 *            - The statemachine to execute
-	 * @param cyclePeriod
-	 *            - the fixed rate cycle period for scheduling
-	 * @return {@code true} if state machine is added properly.
-	 */
-	public boolean registerStatemachine(IStatemachine statemachine,
-			long cyclePeriod) {
-
-		if (timerTasks.containsKey(cyclePeriod)) {
-			// TimerTask for cycle time already existing -> add statemachine
-			return timerTasks.get(cyclePeriod).addStatemachine(statemachine);
-		} else {
-			// Create new TimerTask for cycle period and add statemachine
-			StatemachineTimerTask timerTask = new StatemachineTimerTask();
-			timerTasks.put(cyclePeriod, timerTask);
-			boolean ret = timerTask.addStatemachine(statemachine);
-			timer.scheduleAtFixedRate(timerTask, 0, cyclePeriod);
-			return ret;
-		}
-	}
-
-	/**
-	 * Removes the given state machine from runtime service.
-	 * 
-	 * @param statemachine
-	 *            - the statemachine which should be removed
-	 * @param cyclePeriod
-	 *            - the scheduling cycle period of the statemachine
-	 * @return {@code true} if state machine is removed properly.
-	 */
-	public boolean unregisterStatemachine(IStatemachine statemachine,
-			long cyclePeriod) {
-		if (timerTasks.containsKey(cyclePeriod)) {
-			boolean ret = timerTasks.get(cyclePeriod).removeStatemachine(
-					statemachine);
-
-			return ret;
-		}
-		return false;
-	}
-
-	/**
-	 * Cancels the execution of statemachines for the given cycle period. This
-	 * stops the execution of statemachines which are registered for the given
-	 * cycle period and cancels the executing timer task.
-	 * 
-	 * @return {@code true} if poperly cancelled
-	 */
-	public boolean cancelAll(long cyclePeriod) {
-		if (timerTasks.containsKey(cyclePeriod)) {
-			TimerTask task = timerTasks.get(cyclePeriod);
-			task.cancel();
-			timer.purge();
-			timerTasks.remove(cyclePeriod);
-			return true;
-		}
-		return false;
-	}
-
-	/**
-	 * Pauses the execution of all statemachine which are registered for the
-	 * given cyclePeriod.
-	 * 
-	 * @param cyclePeriod
-	 * @return {@code true} if poperly paused
-	 * 
-	 */
-	public boolean pauseAll(long cyclePeriod) {
-		if (timerTasks.containsKey(cyclePeriod)) {
-			timerTasks.get(cyclePeriod).pause();
-			return true;
-		}
-		return false;
-	}
-
-	/**
-	 * Resumes the execution of all statemachine which are registered for the
-	 * given cyclePeriod.
-	 * 
-	 * @param cyclePeriod
-	 * @return {@code true} if poperly resumed
-	 * 
-	 */
-	public boolean resumeAll(long cyclePeriod) {
-		if (timerTasks.containsKey(cyclePeriod)) {
-			timerTasks.get(cyclePeriod).resume();
-			return true;
-		}
-		return false;
-	}
-}
+package org.yakindu.scr;
+
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Timer;
+import java.util.TimerTask;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+
+/**
+ * Runtime service for state machines to execute a run to completion step
+ * periodically.
+ * 
+ */
+public class RuntimeService {
+
+	private static RuntimeService runtimeService;
+
+	private Timer timer = new Timer();
+
+	private Map<Long, StatemachineTimerTask> timerTasks = new HashMap<Long, StatemachineTimerTask>();
+
+	private class StatemachineTimerTask extends TimerTask {
+
+		private List<IStatemachine> statemachineList = new LinkedList<IStatemachine>();
+
+		private ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
+
+		private boolean isPaused = false;
+
+		@Override
+		public void run() {
+			lock.readLock().lock();
+			if (!isPaused) {
+				for (IStatemachine statemachine : statemachineList) {
+					statemachine.runCycle();
+				}
+			}
+			lock.readLock().unlock();
+		}
+
+		/**
+		 * Adds the given state machine to the TimerTask.
+		 * 
+		 * @param statemachine
+		 * @return {@code true} if state machine is added properly.
+		 */
+		public boolean addStatemachine(IStatemachine statemachine) {
+			lock.writeLock().lock();
+			boolean ret = statemachineList.add(statemachine);
+			lock.writeLock().unlock();
+			return ret;
+		}
+
+		/**
+		 * Removes the given state machine from the TimerTask.
+		 * 
+		 * @param statemachine
+		 * @return {@code true} if state machine is removed properly.
+		 */
+		public boolean removeStatemachine(IStatemachine statemachine) {
+			lock.writeLock().lock();
+			boolean ret = statemachineList.remove(statemachine);
+			lock.writeLock().unlock();
+			return ret;
+		}
+
+		public void pause() {
+			isPaused = true;
+		}
+
+		public void resume() {
+			isPaused = false;
+		}
+	}
+
+	private RuntimeService() {
+		// Not intended to be instantiated.
+	}
+
+	/**
+	 * Returns the {@code RuntimeService} instance as singleton.
+	 * 
+	 * @return The singleton {@code RuntimeService} instance
+	 */
+	public static RuntimeService getInstance() {
+		if (runtimeService == null) {
+			runtimeService = new RuntimeService();
+		}
+		return runtimeService;
+	}
+
+	/**
+	 * Registers an {@link IStatemachine} for scheduled fixed rate execution
+	 * 
+	 * @param statemachine
+	 *            - The statemachine to execute
+	 * @param cyclePeriod
+	 *            - the fixed rate cycle period for scheduling
+	 * @return {@code true} if state machine is added properly.
+	 */
+	public boolean registerStatemachine(IStatemachine statemachine,
+			long cyclePeriod) {
+
+		if (timerTasks.containsKey(cyclePeriod)) {
+			// TimerTask for cycle time already existing -> add statemachine
+			return timerTasks.get(cyclePeriod).addStatemachine(statemachine);
+		} else {
+			// Create new TimerTask for cycle period and add statemachine
+			StatemachineTimerTask timerTask = new StatemachineTimerTask();
+			timerTasks.put(cyclePeriod, timerTask);
+			boolean ret = timerTask.addStatemachine(statemachine);
+			timer.scheduleAtFixedRate(timerTask, 0, cyclePeriod);
+			return ret;
+		}
+	}
+
+	/**
+	 * Removes the given state machine from runtime service.
+	 * 
+	 * @param statemachine
+	 *            - the statemachine which should be removed
+	 * @param cyclePeriod
+	 *            - the scheduling cycle period of the statemachine
+	 * @return {@code true} if state machine is removed properly.
+	 */
+	public boolean unregisterStatemachine(IStatemachine statemachine,
+			long cyclePeriod) {
+		if (timerTasks.containsKey(cyclePeriod)) {
+			boolean ret = timerTasks.get(cyclePeriod).removeStatemachine(
+					statemachine);
+
+			return ret;
+		}
+		return false;
+	}
+
+	/**
+	 * Cancels the execution of statemachines for the given cycle period. This
+	 * stops the execution of statemachines which are registered for the given
+	 * cycle period and cancels the executing timer task.
+	 * 
+	 * @return {@code true} if poperly cancelled
+	 */
+	public boolean cancelAll(long cyclePeriod) {
+		if (timerTasks.containsKey(cyclePeriod)) {
+			TimerTask task = timerTasks.get(cyclePeriod);
+			task.cancel();
+			timer.purge();
+			timerTasks.remove(cyclePeriod);
+			return true;
+		}
+		return false;
+	}
+
+	/**
+	 * Pauses the execution of all statemachine which are registered for the
+	 * given cyclePeriod.
+	 * 
+	 * @param cyclePeriod
+	 * @return {@code true} if poperly paused
+	 * 
+	 */
+	public boolean pauseAll(long cyclePeriod) {
+		if (timerTasks.containsKey(cyclePeriod)) {
+			timerTasks.get(cyclePeriod).pause();
+			return true;
+		}
+		return false;
+	}
+
+	/**
+	 * Resumes the execution of all statemachine which are registered for the
+	 * given cyclePeriod.
+	 * 
+	 * @param cyclePeriod
+	 * @return {@code true} if poperly resumed
+	 * 
+	 */
+	public boolean resumeAll(long cyclePeriod) {
+		if (timerTasks.containsKey(cyclePeriod)) {
+			timerTasks.get(cyclePeriod).resume();
+			return true;
+		}
+		return false;
+	}
+}

+ 58 - 58
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/TimeEvent.java

@@ -1,58 +1,58 @@
-package org.yakindu.scr;
-
-/**
- * Event that reflects a time event. It's internally used by
- * {@link ITimedStatemachine}.
- * 
- * @author muehlbrandt
- * 
- * @param <T>
- */
-public class TimeEvent {
-
-	private boolean periodic;
-
-	private ITimedStatemachine statemachine;
-
-	int index;
-
-	/**
-	 * Constructor for a time event.
-	 * 
-	 * @param periodic
-	 *            : Set to {@code true} if event should be repeated
-	 *            periodically.
-	 * 
-	 * @param index
-	 *            : Index position within the state machine's timeEvent array.
-	 */
-	public TimeEvent(boolean periodic, int index) {
-		this.periodic = periodic;
-		this.index = index;
-	}
-
-	/**
-	 * Returns the state machine reference of the event.
-	 * 
-	 */
-	public ITimedStatemachine getStatemachine() {
-		return statemachine;
-	}
-
-	/**
-	 * Sets the state machine reference of the event.
-	 * 
-	 * @param statemachine
-	 */
-	public void setStatemachine(ITimedStatemachine statemachine) {
-		this.statemachine = statemachine;
-	}
-
-	public boolean isPeriodic() {
-		return periodic;
-	}
-
-	public int getIndex() {
-		return index;
-	}
-}
+package org.yakindu.scr;
+
+/**
+ * Event that reflects a time event. It's internally used by
+ * {@link ITimedStatemachine}.
+ * 
+ * @author muehlbrandt
+ * 
+ * @param <T>
+ */
+public class TimeEvent {
+
+	private boolean periodic;
+
+	private ITimedStatemachine statemachine;
+
+	int index;
+
+	/**
+	 * Constructor for a time event.
+	 * 
+	 * @param periodic
+	 *            : Set to {@code true} if event should be repeated
+	 *            periodically.
+	 * 
+	 * @param index
+	 *            : Index position within the state machine's timeEvent array.
+	 */
+	public TimeEvent(boolean periodic, int index) {
+		this.periodic = periodic;
+		this.index = index;
+	}
+
+	/**
+	 * Returns the state machine reference of the event.
+	 * 
+	 */
+	public ITimedStatemachine getStatemachine() {
+		return statemachine;
+	}
+
+	/**
+	 * Sets the state machine reference of the event.
+	 * 
+	 * @param statemachine
+	 */
+	public void setStatemachine(ITimedStatemachine statemachine) {
+		this.statemachine = statemachine;
+	}
+
+	public boolean isPeriodic() {
+		return periodic;
+	}
+
+	public int getIndex() {
+		return index;
+	}
+}

+ 58 - 58
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/TimerService.java

@@ -1,58 +1,58 @@
-package org.yakindu.scr;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Timer;
-import java.util.TimerTask;
-
-/**
- * Default timer service implementation.
- * 
- */
-public class TimerService implements ITimerService {
-
-	private final Timer timer = new Timer();
-
-	private final Map<TimeEvent, TimerTask> timerTaskMap = new HashMap<TimeEvent, TimerTask>();
-
-	public void setTimer(final TimeEvent event, long time, long cycleStartTime) {
-		// Reset existing TimerTask for event. This step isn't necessary if
-		// timer tasks are properly reset by sexec model.
-		if (timerTaskMap.containsKey(event)) {
-			resetTimer(event);
-		}
-
-		// Create a new TimerTask for given event.
-		timerTaskMap.put(event, new TimerTask() {
-			@Override
-			public void run() {
-				event.getStatemachine().onTimeEventRaised(event);
-			}
-		});
-
-		// start scheduling the timer
-		if (event.isPeriodic()) {
-			timer.scheduleAtFixedRate(timerTaskMap.get(event),
-					time - (System.currentTimeMillis() - cycleStartTime), time);
-		} else {
-			timer.schedule(timerTaskMap.get(event),
-					time - (System.currentTimeMillis() - cycleStartTime));
-		}
-	}
-
-	public void resetTimer(TimeEvent event) {
-		if (timerTaskMap.containsKey(event) && timerTaskMap.get(event) != null) {
-			timerTaskMap.get(event).cancel();
-			timer.purge();
-		}
-		timerTaskMap.remove(event);
-	}
-
-	/**
-	 * Cancels all running TimersTasks
-	 */
-	public void cancel() {
-		timer.cancel();
-		timer.purge();
-	}
-}
+package org.yakindu.scr;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Timer;
+import java.util.TimerTask;
+
+/**
+ * Default timer service implementation.
+ * 
+ */
+public class TimerService implements ITimerService {
+
+	private final Timer timer = new Timer();
+
+	private final Map<TimeEvent, TimerTask> timerTaskMap = new HashMap<TimeEvent, TimerTask>();
+
+	public void setTimer(final TimeEvent event, long time, long cycleStartTime) {
+		// Reset existing TimerTask for event. This step isn't necessary if
+		// timer tasks are properly reset by sexec model.
+		if (timerTaskMap.containsKey(event)) {
+			resetTimer(event);
+		}
+
+		// Create a new TimerTask for given event.
+		timerTaskMap.put(event, new TimerTask() {
+			@Override
+			public void run() {
+				event.getStatemachine().onTimeEventRaised(event);
+			}
+		});
+
+		// start scheduling the timer
+		if (event.isPeriodic()) {
+			timer.scheduleAtFixedRate(timerTaskMap.get(event),
+					time - (System.currentTimeMillis() - cycleStartTime), time);
+		} else {
+			timer.schedule(timerTaskMap.get(event),
+					time - (System.currentTimeMillis() - cycleStartTime));
+		}
+	}
+
+	public void resetTimer(TimeEvent event) {
+		if (timerTaskMap.containsKey(event) && timerTaskMap.get(event) != null) {
+			timerTaskMap.get(event).cancel();
+			timer.purge();
+		}
+		timerTaskMap.remove(event);
+	}
+
+	/**
+	 * Cancels all running TimersTasks
+	 */
+	public void cancel() {
+		timer.cancel();
+		timer.purge();
+	}
+}

+ 191 - 174
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/alwaysoncycle/AlwaysOncycleStatemachine.java

@@ -1,174 +1,191 @@
-package org.yakindu.scr.alwaysoncycle;
-
-public class AlwaysOncycleStatemachine implements IAlwaysOncycleStatemachine {
-
-	private final class SCIDefaultImpl implements SCIDefault {
-
-		private int value;
-
-		public int getValue() {
-			return value;
-		}
-
-		public void setValue(int value) {
-			this.value = value;
-		}
-
-	}
-
-	private SCIDefaultImpl sCIDefault;
-
-	public enum State {
-		Main_region_StateA, Main_region_StateB, $NullState$
-	};
-
-	private final State[] stateVector = new State[1];
-
-	private int nextStateIndex;
-
-	public AlwaysOncycleStatemachine() {
-
-		sCIDefault = new SCIDefaultImpl();
-
-	}
-
-	public void init() {
-		for (int i = 0; i < 1; i++) {
-			stateVector[i] = State.$NullState$;
-		}
-
-		clearEvents();
-		clearOutEvents();
-	}
-
-	protected void clearEvents() {
-
-	}
-
-	protected void clearOutEvents() {
-	}
-
-	public boolean isStateActive(State state) {
-		switch (state) {
-
-			case Main_region_StateA :
-				return stateVector[0] == State.Main_region_StateA;
-
-			case Main_region_StateB :
-				return stateVector[0] == State.Main_region_StateB;
-
-			default :
-				return false;
-		}
-		/*
-		for (int i=0;i<stateVector.length;i++){
-			if (stateVector[i]==state) {
-				return true;
-			}
-		}
-		return false;
-		 */
-	}
-
-	public SCIDefault getSCIDefault() {
-		return sCIDefault;
-	}
-
-	public int getValue() {
-		return sCIDefault.getValue();
-	}
-
-	public void setValue(int value) {
-		sCIDefault.setValue(value);
-	}
-
-	public void enter() {
-		entryActionAlwaysOncycle();
-		sCIDefault.value = 0;
-
-		nextStateIndex = 0;
-		stateVector[0] = State.Main_region_StateA;
-
-	}
-
-	public void exit() {
-		//Handle exit of all possible states (of main region) at position 0...
-		switch (stateVector[0]) {
-
-			case Main_region_StateA :
-				stateVector[0] = State.$NullState$;
-				sCIDefault.value = 0;
-
-				break;
-
-			case Main_region_StateB :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			default :
-				break;
-		}
-
-		exitActionAlwaysOncycle();
-	}
-
-	private void entryActionAlwaysOncycle() {
-
-	}
-
-	private void exitActionAlwaysOncycle() {
-
-	}
-
-	private void reactMain_region_StateA() {
-		if ((sCIDefault.value == 5)) {
-			stateVector[0] = State.$NullState$;
-			sCIDefault.value = 0;
-
-			nextStateIndex = 0;
-			stateVector[0] = State.Main_region_StateB;
-
-		} else {
-			sCIDefault.value += 1;
-
-		}
-
-	}
-	private void reactMain_region_StateB() {
-		if ((sCIDefault.value == 5)) {
-			stateVector[0] = State.$NullState$;
-
-			sCIDefault.value = 0;
-
-			nextStateIndex = 0;
-			stateVector[0] = State.Main_region_StateA;
-
-		} else {
-			sCIDefault.value += 1;
-
-		}
-
-	}
-
-	public void runCycle() {
-
-		clearOutEvents();
-
-		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
-
-			switch (stateVector[nextStateIndex]) {
-				case Main_region_StateA :
-					reactMain_region_StateA();
-					break;
-				case Main_region_StateB :
-					reactMain_region_StateB();
-					break;
-				default :
-					// $NullState$
-			}
-		}
-
-		clearEvents();
-	}
-}
+package org.yakindu.scr.alwaysoncycle;
+
+public class AlwaysOncycleStatemachine implements IAlwaysOncycleStatemachine {
+
+	private final class SCIDefaultImpl implements SCIDefault {
+
+		private int value;
+
+		public int getValue() {
+			return value;
+		}
+
+		public void setValue(int value) {
+			this.value = value;
+		}
+
+		private boolean v2;
+
+		public boolean getV2() {
+			return v2;
+		}
+
+		public void setV2(boolean value) {
+			this.v2 = value;
+		}
+
+	}
+
+	private SCIDefaultImpl sCIDefault;
+
+	public enum State {
+		Main_region_StateA, Main_region_StateB, $NullState$
+	};
+
+	private final State[] stateVector = new State[1];
+
+	private int nextStateIndex;
+
+	public AlwaysOncycleStatemachine() {
+
+		sCIDefault = new SCIDefaultImpl();
+
+	}
+
+	public void init() {
+		for (int i = 0; i < 1; i++) {
+			stateVector[i] = State.$NullState$;
+		}
+
+		clearEvents();
+		clearOutEvents();
+	}
+
+	protected void clearEvents() {
+
+	}
+
+	protected void clearOutEvents() {
+	}
+
+	public boolean isStateActive(State state) {
+		switch (state) {
+
+			case Main_region_StateA :
+				return stateVector[0] == State.Main_region_StateA;
+
+			case Main_region_StateB :
+				return stateVector[0] == State.Main_region_StateB;
+
+			default :
+				return false;
+		}
+		/*
+		for (int i=0;i<stateVector.length;i++){
+			if (stateVector[i]==state) {
+				return true;
+			}
+		}
+		return false;
+		 */
+	}
+
+	public SCIDefault getSCIDefault() {
+		return sCIDefault;
+	}
+
+	public int getValue() {
+		return sCIDefault.getValue();
+	}
+
+	public void setValue(int value) {
+		sCIDefault.setValue(value);
+	}
+	public boolean getV2() {
+		return sCIDefault.getV2();
+	}
+
+	public void setV2(boolean value) {
+		sCIDefault.setV2(value);
+	}
+
+	public void enter() {
+		entryActionAlwaysOncycle();
+		sCIDefault.value = 0;
+
+		nextStateIndex = 0;
+		stateVector[0] = State.Main_region_StateA;
+
+	}
+
+	public void exit() {
+		//Handle exit of all possible states (of main region) at position 0...
+		switch (stateVector[0]) {
+
+			case Main_region_StateA :
+				stateVector[0] = State.$NullState$;
+				sCIDefault.value = 0;
+
+				break;
+
+			case Main_region_StateB :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			default :
+				break;
+		}
+
+		exitActionAlwaysOncycle();
+	}
+
+	private void entryActionAlwaysOncycle() {
+
+	}
+
+	private void exitActionAlwaysOncycle() {
+
+	}
+
+	private void reactMain_region_StateA() {
+		if ((sCIDefault.value == 5)) {
+			stateVector[0] = State.$NullState$;
+			sCIDefault.value = 0;
+
+			nextStateIndex = 0;
+			stateVector[0] = State.Main_region_StateB;
+
+		} else {
+			sCIDefault.value += 1;
+
+		}
+
+	}
+	private void reactMain_region_StateB() {
+		if ((sCIDefault.value == 5)) {
+			stateVector[0] = State.$NullState$;
+
+			sCIDefault.value = 0;
+
+			nextStateIndex = 0;
+			stateVector[0] = State.Main_region_StateA;
+
+		} else {
+			sCIDefault.value += 1;
+
+		}
+
+	}
+
+	public void runCycle() {
+
+		clearOutEvents();
+
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+
+			switch (stateVector[nextStateIndex]) {
+				case Main_region_StateA :
+					reactMain_region_StateA();
+					break;
+				case Main_region_StateB :
+					reactMain_region_StateB();
+					break;
+				default :
+					// $NullState$
+			}
+		}
+
+		clearEvents();
+	}
+}

+ 18 - 16
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/alwaysoncycle/IAlwaysOncycleStatemachine.java

@@ -1,16 +1,18 @@
-package org.yakindu.scr.alwaysoncycle;
-
-import org.yakindu.scr.IStatemachine;
-
-public interface IAlwaysOncycleStatemachine extends IStatemachine {
-
-	public interface SCIDefault {
-
-		public int getValue();
-		public void setValue(int value);
-
-	}
-
-	public SCIDefault getSCIDefault();
-
-}
+package org.yakindu.scr.alwaysoncycle;
+
+import org.yakindu.scr.IStatemachine;
+
+public interface IAlwaysOncycleStatemachine extends IStatemachine {
+
+	public interface SCIDefault {
+
+		public int getValue();
+		public void setValue(int value);
+		public boolean getV2();
+		public void setV2(boolean value);
+
+	}
+
+	public SCIDefault getSCIDefault();
+
+}

+ 305 - 305
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/bitexpressions/BitExpressionsStatemachine.java

@@ -1,305 +1,305 @@
-package org.yakindu.scr.bitexpressions;
-
-public class BitExpressionsStatemachine implements IBitExpressionsStatemachine {
-
-	private final class SCIDefaultImpl implements SCIDefault {
-
-		private boolean e1;
-
-		public void raiseE1() {
-			e1 = true;
-		}
-
-		private int myBit1;
-
-		public int getMyBit1() {
-			return myBit1;
-		}
-
-		public void setMyBit1(int value) {
-			this.myBit1 = value;
-		}
-
-		private int myBit2;
-
-		public int getMyBit2() {
-			return myBit2;
-		}
-
-		public void setMyBit2(int value) {
-			this.myBit2 = value;
-		}
-
-		private int leftBitshift;
-
-		public int getLeftBitshift() {
-			return leftBitshift;
-		}
-
-		public void setLeftBitshift(int value) {
-			this.leftBitshift = value;
-		}
-
-		private int rightBitshift;
-
-		public int getRightBitshift() {
-			return rightBitshift;
-		}
-
-		public void setRightBitshift(int value) {
-			this.rightBitshift = value;
-		}
-
-		private int complementBitshift;
-
-		public int getComplementBitshift() {
-			return complementBitshift;
-		}
-
-		public void setComplementBitshift(int value) {
-			this.complementBitshift = value;
-		}
-
-		private int bitwiseAnd;
-
-		public int getBitwiseAnd() {
-			return bitwiseAnd;
-		}
-
-		public void setBitwiseAnd(int value) {
-			this.bitwiseAnd = value;
-		}
-
-		private int bitwiseOr;
-
-		public int getBitwiseOr() {
-			return bitwiseOr;
-		}
-
-		public void setBitwiseOr(int value) {
-			this.bitwiseOr = value;
-		}
-
-		private int bitwiseXor;
-
-		public int getBitwiseXor() {
-			return bitwiseXor;
-		}
-
-		public void setBitwiseXor(int value) {
-			this.bitwiseXor = value;
-		}
-
-		public void clearEvents() {
-			e1 = false;
-		}
-
-	}
-
-	private SCIDefaultImpl sCIDefault;
-
-	public enum State {
-		Main_region_StateA, Main_region_StateB, $NullState$
-	};
-
-	private final State[] stateVector = new State[1];
-
-	private int nextStateIndex;
-
-	public BitExpressionsStatemachine() {
-
-		sCIDefault = new SCIDefaultImpl();
-
-	}
-
-	public void init() {
-		for (int i = 0; i < 1; i++) {
-			stateVector[i] = State.$NullState$;
-		}
-
-		clearEvents();
-		clearOutEvents();
-	}
-
-	protected void clearEvents() {
-		sCIDefault.clearEvents();
-
-	}
-
-	protected void clearOutEvents() {
-	}
-
-	public boolean isStateActive(State state) {
-		switch (state) {
-
-			case Main_region_StateA :
-				return stateVector[0] == State.Main_region_StateA;
-
-			case Main_region_StateB :
-				return stateVector[0] == State.Main_region_StateB;
-
-			default :
-				return false;
-		}
-		/*
-		for (int i=0;i<stateVector.length;i++){
-			if (stateVector[i]==state) {
-				return true;
-			}
-		}
-		return false;
-		 */
-	}
-
-	public SCIDefault getSCIDefault() {
-		return sCIDefault;
-	}
-
-	public void raiseE1() {
-		sCIDefault.raiseE1();
-	}
-
-	public int getMyBit1() {
-		return sCIDefault.getMyBit1();
-	}
-
-	public void setMyBit1(int value) {
-		sCIDefault.setMyBit1(value);
-	}
-	public int getMyBit2() {
-		return sCIDefault.getMyBit2();
-	}
-
-	public void setMyBit2(int value) {
-		sCIDefault.setMyBit2(value);
-	}
-	public int getLeftBitshift() {
-		return sCIDefault.getLeftBitshift();
-	}
-
-	public void setLeftBitshift(int value) {
-		sCIDefault.setLeftBitshift(value);
-	}
-	public int getRightBitshift() {
-		return sCIDefault.getRightBitshift();
-	}
-
-	public void setRightBitshift(int value) {
-		sCIDefault.setRightBitshift(value);
-	}
-	public int getComplementBitshift() {
-		return sCIDefault.getComplementBitshift();
-	}
-
-	public void setComplementBitshift(int value) {
-		sCIDefault.setComplementBitshift(value);
-	}
-	public int getBitwiseAnd() {
-		return sCIDefault.getBitwiseAnd();
-	}
-
-	public void setBitwiseAnd(int value) {
-		sCIDefault.setBitwiseAnd(value);
-	}
-	public int getBitwiseOr() {
-		return sCIDefault.getBitwiseOr();
-	}
-
-	public void setBitwiseOr(int value) {
-		sCIDefault.setBitwiseOr(value);
-	}
-	public int getBitwiseXor() {
-		return sCIDefault.getBitwiseXor();
-	}
-
-	public void setBitwiseXor(int value) {
-		sCIDefault.setBitwiseXor(value);
-	}
-
-	public void enter() {
-		entryActionBitExpressions();
-		sCIDefault.myBit1 = 5;
-
-		sCIDefault.myBit2 = 7;
-
-		nextStateIndex = 0;
-		stateVector[0] = State.Main_region_StateA;
-
-	}
-
-	public void exit() {
-		//Handle exit of all possible states (of main region) at position 0...
-		switch (stateVector[0]) {
-
-			case Main_region_StateA :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			case Main_region_StateB :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			default :
-				break;
-		}
-
-		exitActionBitExpressions();
-	}
-
-	private void entryActionBitExpressions() {
-
-	}
-
-	private void exitActionBitExpressions() {
-
-	}
-
-	private void reactMain_region_StateA() {
-		if (sCIDefault.e1) {
-			stateVector[0] = State.$NullState$;
-
-			sCIDefault.leftBitshift = (sCIDefault.myBit1 << 1);
-
-			sCIDefault.rightBitshift = (sCIDefault.myBit1 >> 1);
-
-			sCIDefault.complementBitshift = ~(sCIDefault.myBit1);
-
-			sCIDefault.bitwiseAnd = (sCIDefault.myBit1 & sCIDefault.myBit2);
-
-			sCIDefault.bitwiseOr = (sCIDefault.myBit1 | sCIDefault.myBit2);
-
-			sCIDefault.bitwiseXor = (sCIDefault.myBit1 ^ sCIDefault.myBit2);
-
-			nextStateIndex = 0;
-			stateVector[0] = State.Main_region_StateB;
-
-		}
-
-	}
-	private void reactMain_region_StateB() {
-
-	}
-
-	public void runCycle() {
-
-		clearOutEvents();
-
-		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
-
-			switch (stateVector[nextStateIndex]) {
-				case Main_region_StateA :
-					reactMain_region_StateA();
-					break;
-				case Main_region_StateB :
-					reactMain_region_StateB();
-					break;
-				default :
-					// $NullState$
-			}
-		}
-
-		clearEvents();
-	}
-}
+package org.yakindu.scr.bitexpressions;
+
+public class BitExpressionsStatemachine implements IBitExpressionsStatemachine {
+
+	private final class SCIDefaultImpl implements SCIDefault {
+
+		private boolean e1;
+
+		public void raiseE1() {
+			e1 = true;
+		}
+
+		private int myBit1;
+
+		public int getMyBit1() {
+			return myBit1;
+		}
+
+		public void setMyBit1(int value) {
+			this.myBit1 = value;
+		}
+
+		private int myBit2;
+
+		public int getMyBit2() {
+			return myBit2;
+		}
+
+		public void setMyBit2(int value) {
+			this.myBit2 = value;
+		}
+
+		private int leftBitshift;
+
+		public int getLeftBitshift() {
+			return leftBitshift;
+		}
+
+		public void setLeftBitshift(int value) {
+			this.leftBitshift = value;
+		}
+
+		private int rightBitshift;
+
+		public int getRightBitshift() {
+			return rightBitshift;
+		}
+
+		public void setRightBitshift(int value) {
+			this.rightBitshift = value;
+		}
+
+		private int complementBitshift;
+
+		public int getComplementBitshift() {
+			return complementBitshift;
+		}
+
+		public void setComplementBitshift(int value) {
+			this.complementBitshift = value;
+		}
+
+		private int bitwiseAnd;
+
+		public int getBitwiseAnd() {
+			return bitwiseAnd;
+		}
+
+		public void setBitwiseAnd(int value) {
+			this.bitwiseAnd = value;
+		}
+
+		private int bitwiseOr;
+
+		public int getBitwiseOr() {
+			return bitwiseOr;
+		}
+
+		public void setBitwiseOr(int value) {
+			this.bitwiseOr = value;
+		}
+
+		private int bitwiseXor;
+
+		public int getBitwiseXor() {
+			return bitwiseXor;
+		}
+
+		public void setBitwiseXor(int value) {
+			this.bitwiseXor = value;
+		}
+
+		public void clearEvents() {
+			e1 = false;
+		}
+
+	}
+
+	private SCIDefaultImpl sCIDefault;
+
+	public enum State {
+		Main_region_StateA, Main_region_StateB, $NullState$
+	};
+
+	private final State[] stateVector = new State[1];
+
+	private int nextStateIndex;
+
+	public BitExpressionsStatemachine() {
+
+		sCIDefault = new SCIDefaultImpl();
+
+	}
+
+	public void init() {
+		for (int i = 0; i < 1; i++) {
+			stateVector[i] = State.$NullState$;
+		}
+
+		clearEvents();
+		clearOutEvents();
+	}
+
+	protected void clearEvents() {
+		sCIDefault.clearEvents();
+
+	}
+
+	protected void clearOutEvents() {
+	}
+
+	public boolean isStateActive(State state) {
+		switch (state) {
+
+			case Main_region_StateA :
+				return stateVector[0] == State.Main_region_StateA;
+
+			case Main_region_StateB :
+				return stateVector[0] == State.Main_region_StateB;
+
+			default :
+				return false;
+		}
+		/*
+		for (int i=0;i<stateVector.length;i++){
+			if (stateVector[i]==state) {
+				return true;
+			}
+		}
+		return false;
+		 */
+	}
+
+	public SCIDefault getSCIDefault() {
+		return sCIDefault;
+	}
+
+	public void raiseE1() {
+		sCIDefault.raiseE1();
+	}
+
+	public int getMyBit1() {
+		return sCIDefault.getMyBit1();
+	}
+
+	public void setMyBit1(int value) {
+		sCIDefault.setMyBit1(value);
+	}
+	public int getMyBit2() {
+		return sCIDefault.getMyBit2();
+	}
+
+	public void setMyBit2(int value) {
+		sCIDefault.setMyBit2(value);
+	}
+	public int getLeftBitshift() {
+		return sCIDefault.getLeftBitshift();
+	}
+
+	public void setLeftBitshift(int value) {
+		sCIDefault.setLeftBitshift(value);
+	}
+	public int getRightBitshift() {
+		return sCIDefault.getRightBitshift();
+	}
+
+	public void setRightBitshift(int value) {
+		sCIDefault.setRightBitshift(value);
+	}
+	public int getComplementBitshift() {
+		return sCIDefault.getComplementBitshift();
+	}
+
+	public void setComplementBitshift(int value) {
+		sCIDefault.setComplementBitshift(value);
+	}
+	public int getBitwiseAnd() {
+		return sCIDefault.getBitwiseAnd();
+	}
+
+	public void setBitwiseAnd(int value) {
+		sCIDefault.setBitwiseAnd(value);
+	}
+	public int getBitwiseOr() {
+		return sCIDefault.getBitwiseOr();
+	}
+
+	public void setBitwiseOr(int value) {
+		sCIDefault.setBitwiseOr(value);
+	}
+	public int getBitwiseXor() {
+		return sCIDefault.getBitwiseXor();
+	}
+
+	public void setBitwiseXor(int value) {
+		sCIDefault.setBitwiseXor(value);
+	}
+
+	public void enter() {
+		entryActionBitExpressions();
+		sCIDefault.myBit1 = 5;
+
+		sCIDefault.myBit2 = 7;
+
+		nextStateIndex = 0;
+		stateVector[0] = State.Main_region_StateA;
+
+	}
+
+	public void exit() {
+		//Handle exit of all possible states (of main region) at position 0...
+		switch (stateVector[0]) {
+
+			case Main_region_StateA :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			case Main_region_StateB :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			default :
+				break;
+		}
+
+		exitActionBitExpressions();
+	}
+
+	private void entryActionBitExpressions() {
+
+	}
+
+	private void exitActionBitExpressions() {
+
+	}
+
+	private void reactMain_region_StateA() {
+		if (sCIDefault.e1) {
+			stateVector[0] = State.$NullState$;
+
+			sCIDefault.leftBitshift = (sCIDefault.myBit1 << 1);
+
+			sCIDefault.rightBitshift = (sCIDefault.myBit1 >> 1);
+
+			sCIDefault.complementBitshift = ~(sCIDefault.myBit1);
+
+			sCIDefault.bitwiseAnd = (sCIDefault.myBit1 & sCIDefault.myBit2);
+
+			sCIDefault.bitwiseOr = (sCIDefault.myBit1 | sCIDefault.myBit2);
+
+			sCIDefault.bitwiseXor = (sCIDefault.myBit1 ^ sCIDefault.myBit2);
+
+			nextStateIndex = 0;
+			stateVector[0] = State.Main_region_StateB;
+
+		}
+
+	}
+	private void reactMain_region_StateB() {
+
+	}
+
+	public void runCycle() {
+
+		clearOutEvents();
+
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+
+			switch (stateVector[nextStateIndex]) {
+				case Main_region_StateA :
+					reactMain_region_StateA();
+					break;
+				case Main_region_StateB :
+					reactMain_region_StateB();
+					break;
+				default :
+					// $NullState$
+			}
+		}
+
+		clearEvents();
+	}
+}

+ 32 - 32
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/bitexpressions/IBitExpressionsStatemachine.java

@@ -1,32 +1,32 @@
-package org.yakindu.scr.bitexpressions;
-
-import org.yakindu.scr.IStatemachine;
-
-public interface IBitExpressionsStatemachine extends IStatemachine {
-
-	public interface SCIDefault {
-
-		public void raiseE1();
-
-		public int getMyBit1();
-		public void setMyBit1(int value);
-		public int getMyBit2();
-		public void setMyBit2(int value);
-		public int getLeftBitshift();
-		public void setLeftBitshift(int value);
-		public int getRightBitshift();
-		public void setRightBitshift(int value);
-		public int getComplementBitshift();
-		public void setComplementBitshift(int value);
-		public int getBitwiseAnd();
-		public void setBitwiseAnd(int value);
-		public int getBitwiseOr();
-		public void setBitwiseOr(int value);
-		public int getBitwiseXor();
-		public void setBitwiseXor(int value);
-
-	}
-
-	public SCIDefault getSCIDefault();
-
-}
+package org.yakindu.scr.bitexpressions;
+
+import org.yakindu.scr.IStatemachine;
+
+public interface IBitExpressionsStatemachine extends IStatemachine {
+
+	public interface SCIDefault {
+
+		public void raiseE1();
+
+		public int getMyBit1();
+		public void setMyBit1(int value);
+		public int getMyBit2();
+		public void setMyBit2(int value);
+		public int getLeftBitshift();
+		public void setLeftBitshift(int value);
+		public int getRightBitshift();
+		public void setRightBitshift(int value);
+		public int getComplementBitshift();
+		public void setComplementBitshift(int value);
+		public int getBitwiseAnd();
+		public void setBitwiseAnd(int value);
+		public int getBitwiseOr();
+		public void setBitwiseOr(int value);
+		public int getBitwiseXor();
+		public void setBitwiseXor(int value);
+
+	}
+
+	public SCIDefault getSCIDefault();
+
+}

+ 288 - 288
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/booleanexpressions/BooleanExpressionsStatemachine.java

@@ -1,288 +1,288 @@
-package org.yakindu.scr.booleanexpressions;
-
-public class BooleanExpressionsStatemachine
-		implements
-			IBooleanExpressionsStatemachine {
-
-	private final class SCIDefaultImpl implements SCIDefault {
-
-		private boolean e1;
-
-		public void raiseE1() {
-			e1 = true;
-		}
-
-		private boolean myBool1;
-
-		public boolean getMyBool1() {
-			return myBool1;
-		}
-
-		public void setMyBool1(boolean value) {
-			this.myBool1 = value;
-		}
-
-		private boolean myBool2;
-
-		public boolean getMyBool2() {
-			return myBool2;
-		}
-
-		public void setMyBool2(boolean value) {
-			this.myBool2 = value;
-		}
-
-		private boolean and;
-
-		public boolean getAnd() {
-			return and;
-		}
-
-		public void setAnd(boolean value) {
-			this.and = value;
-		}
-
-		private boolean or;
-
-		public boolean getOr() {
-			return or;
-		}
-
-		public void setOr(boolean value) {
-			this.or = value;
-		}
-
-		private boolean not;
-
-		public boolean getNot() {
-			return not;
-		}
-
-		public void setNot(boolean value) {
-			this.not = value;
-		}
-
-		private boolean equal;
-
-		public boolean getEqual() {
-			return equal;
-		}
-
-		public void setEqual(boolean value) {
-			this.equal = value;
-		}
-
-		private boolean notequal;
-
-		public boolean getNotequal() {
-			return notequal;
-		}
-
-		public void setNotequal(boolean value) {
-			this.notequal = value;
-		}
-
-		public void clearEvents() {
-			e1 = false;
-		}
-
-	}
-
-	private SCIDefaultImpl sCIDefault;
-
-	public enum State {
-		Main_region_StateA, Main_region_StateB, $NullState$
-	};
-
-	private final State[] stateVector = new State[1];
-
-	private int nextStateIndex;
-
-	public BooleanExpressionsStatemachine() {
-
-		sCIDefault = new SCIDefaultImpl();
-
-	}
-
-	public void init() {
-		for (int i = 0; i < 1; i++) {
-			stateVector[i] = State.$NullState$;
-		}
-
-		clearEvents();
-		clearOutEvents();
-	}
-
-	protected void clearEvents() {
-		sCIDefault.clearEvents();
-
-	}
-
-	protected void clearOutEvents() {
-	}
-
-	public boolean isStateActive(State state) {
-		switch (state) {
-
-			case Main_region_StateA :
-				return stateVector[0] == State.Main_region_StateA;
-
-			case Main_region_StateB :
-				return stateVector[0] == State.Main_region_StateB;
-
-			default :
-				return false;
-		}
-		/*
-		for (int i=0;i<stateVector.length;i++){
-			if (stateVector[i]==state) {
-				return true;
-			}
-		}
-		return false;
-		 */
-	}
-
-	public SCIDefault getSCIDefault() {
-		return sCIDefault;
-	}
-
-	public void raiseE1() {
-		sCIDefault.raiseE1();
-	}
-
-	public boolean getMyBool1() {
-		return sCIDefault.getMyBool1();
-	}
-
-	public void setMyBool1(boolean value) {
-		sCIDefault.setMyBool1(value);
-	}
-	public boolean getMyBool2() {
-		return sCIDefault.getMyBool2();
-	}
-
-	public void setMyBool2(boolean value) {
-		sCIDefault.setMyBool2(value);
-	}
-	public boolean getAnd() {
-		return sCIDefault.getAnd();
-	}
-
-	public void setAnd(boolean value) {
-		sCIDefault.setAnd(value);
-	}
-	public boolean getOr() {
-		return sCIDefault.getOr();
-	}
-
-	public void setOr(boolean value) {
-		sCIDefault.setOr(value);
-	}
-	public boolean getNot() {
-		return sCIDefault.getNot();
-	}
-
-	public void setNot(boolean value) {
-		sCIDefault.setNot(value);
-	}
-	public boolean getEqual() {
-		return sCIDefault.getEqual();
-	}
-
-	public void setEqual(boolean value) {
-		sCIDefault.setEqual(value);
-	}
-	public boolean getNotequal() {
-		return sCIDefault.getNotequal();
-	}
-
-	public void setNotequal(boolean value) {
-		sCIDefault.setNotequal(value);
-	}
-
-	public void enter() {
-		entryActionBooleanExpressions();
-		sCIDefault.myBool1 = true;
-
-		sCIDefault.myBool2 = false;
-
-		nextStateIndex = 0;
-		stateVector[0] = State.Main_region_StateA;
-
-	}
-
-	public void exit() {
-		//Handle exit of all possible states (of main region) at position 0...
-		switch (stateVector[0]) {
-
-			case Main_region_StateA :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			case Main_region_StateB :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			default :
-				break;
-		}
-
-		exitActionBooleanExpressions();
-	}
-
-	private void entryActionBooleanExpressions() {
-
-	}
-
-	private void exitActionBooleanExpressions() {
-
-	}
-
-	private void reactMain_region_StateA() {
-		if (sCIDefault.e1) {
-			stateVector[0] = State.$NullState$;
-
-			sCIDefault.and = (sCIDefault.myBool1 && sCIDefault.myBool2);
-
-			sCIDefault.or = (sCIDefault.myBool1 || sCIDefault.myBool2);
-
-			sCIDefault.not = !sCIDefault.myBool1;
-
-			sCIDefault.equal = (sCIDefault.myBool1 == sCIDefault.myBool2);
-
-			sCIDefault.notequal = (sCIDefault.myBool1 != sCIDefault.myBool2);
-
-			nextStateIndex = 0;
-			stateVector[0] = State.Main_region_StateB;
-
-		}
-
-	}
-	private void reactMain_region_StateB() {
-
-	}
-
-	public void runCycle() {
-
-		clearOutEvents();
-
-		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
-
-			switch (stateVector[nextStateIndex]) {
-				case Main_region_StateA :
-					reactMain_region_StateA();
-					break;
-				case Main_region_StateB :
-					reactMain_region_StateB();
-					break;
-				default :
-					// $NullState$
-			}
-		}
-
-		clearEvents();
-	}
-}
+package org.yakindu.scr.booleanexpressions;
+
+public class BooleanExpressionsStatemachine
+		implements
+			IBooleanExpressionsStatemachine {
+
+	private final class SCIDefaultImpl implements SCIDefault {
+
+		private boolean e1;
+
+		public void raiseE1() {
+			e1 = true;
+		}
+
+		private boolean myBool1;
+
+		public boolean getMyBool1() {
+			return myBool1;
+		}
+
+		public void setMyBool1(boolean value) {
+			this.myBool1 = value;
+		}
+
+		private boolean myBool2;
+
+		public boolean getMyBool2() {
+			return myBool2;
+		}
+
+		public void setMyBool2(boolean value) {
+			this.myBool2 = value;
+		}
+
+		private boolean and;
+
+		public boolean getAnd() {
+			return and;
+		}
+
+		public void setAnd(boolean value) {
+			this.and = value;
+		}
+
+		private boolean or;
+
+		public boolean getOr() {
+			return or;
+		}
+
+		public void setOr(boolean value) {
+			this.or = value;
+		}
+
+		private boolean not;
+
+		public boolean getNot() {
+			return not;
+		}
+
+		public void setNot(boolean value) {
+			this.not = value;
+		}
+
+		private boolean equal;
+
+		public boolean getEqual() {
+			return equal;
+		}
+
+		public void setEqual(boolean value) {
+			this.equal = value;
+		}
+
+		private boolean notequal;
+
+		public boolean getNotequal() {
+			return notequal;
+		}
+
+		public void setNotequal(boolean value) {
+			this.notequal = value;
+		}
+
+		public void clearEvents() {
+			e1 = false;
+		}
+
+	}
+
+	private SCIDefaultImpl sCIDefault;
+
+	public enum State {
+		Main_region_StateA, Main_region_StateB, $NullState$
+	};
+
+	private final State[] stateVector = new State[1];
+
+	private int nextStateIndex;
+
+	public BooleanExpressionsStatemachine() {
+
+		sCIDefault = new SCIDefaultImpl();
+
+	}
+
+	public void init() {
+		for (int i = 0; i < 1; i++) {
+			stateVector[i] = State.$NullState$;
+		}
+
+		clearEvents();
+		clearOutEvents();
+	}
+
+	protected void clearEvents() {
+		sCIDefault.clearEvents();
+
+	}
+
+	protected void clearOutEvents() {
+	}
+
+	public boolean isStateActive(State state) {
+		switch (state) {
+
+			case Main_region_StateA :
+				return stateVector[0] == State.Main_region_StateA;
+
+			case Main_region_StateB :
+				return stateVector[0] == State.Main_region_StateB;
+
+			default :
+				return false;
+		}
+		/*
+		for (int i=0;i<stateVector.length;i++){
+			if (stateVector[i]==state) {
+				return true;
+			}
+		}
+		return false;
+		 */
+	}
+
+	public SCIDefault getSCIDefault() {
+		return sCIDefault;
+	}
+
+	public void raiseE1() {
+		sCIDefault.raiseE1();
+	}
+
+	public boolean getMyBool1() {
+		return sCIDefault.getMyBool1();
+	}
+
+	public void setMyBool1(boolean value) {
+		sCIDefault.setMyBool1(value);
+	}
+	public boolean getMyBool2() {
+		return sCIDefault.getMyBool2();
+	}
+
+	public void setMyBool2(boolean value) {
+		sCIDefault.setMyBool2(value);
+	}
+	public boolean getAnd() {
+		return sCIDefault.getAnd();
+	}
+
+	public void setAnd(boolean value) {
+		sCIDefault.setAnd(value);
+	}
+	public boolean getOr() {
+		return sCIDefault.getOr();
+	}
+
+	public void setOr(boolean value) {
+		sCIDefault.setOr(value);
+	}
+	public boolean getNot() {
+		return sCIDefault.getNot();
+	}
+
+	public void setNot(boolean value) {
+		sCIDefault.setNot(value);
+	}
+	public boolean getEqual() {
+		return sCIDefault.getEqual();
+	}
+
+	public void setEqual(boolean value) {
+		sCIDefault.setEqual(value);
+	}
+	public boolean getNotequal() {
+		return sCIDefault.getNotequal();
+	}
+
+	public void setNotequal(boolean value) {
+		sCIDefault.setNotequal(value);
+	}
+
+	public void enter() {
+		entryActionBooleanExpressions();
+		sCIDefault.myBool1 = true;
+
+		sCIDefault.myBool2 = false;
+
+		nextStateIndex = 0;
+		stateVector[0] = State.Main_region_StateA;
+
+	}
+
+	public void exit() {
+		//Handle exit of all possible states (of main region) at position 0...
+		switch (stateVector[0]) {
+
+			case Main_region_StateA :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			case Main_region_StateB :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			default :
+				break;
+		}
+
+		exitActionBooleanExpressions();
+	}
+
+	private void entryActionBooleanExpressions() {
+
+	}
+
+	private void exitActionBooleanExpressions() {
+
+	}
+
+	private void reactMain_region_StateA() {
+		if (sCIDefault.e1) {
+			stateVector[0] = State.$NullState$;
+
+			sCIDefault.and = (sCIDefault.myBool1 && sCIDefault.myBool2);
+
+			sCIDefault.or = (sCIDefault.myBool1 || sCIDefault.myBool2);
+
+			sCIDefault.not = !sCIDefault.myBool1;
+
+			sCIDefault.equal = (sCIDefault.myBool1 == sCIDefault.myBool2);
+
+			sCIDefault.notequal = (sCIDefault.myBool1 != sCIDefault.myBool2);
+
+			nextStateIndex = 0;
+			stateVector[0] = State.Main_region_StateB;
+
+		}
+
+	}
+	private void reactMain_region_StateB() {
+
+	}
+
+	public void runCycle() {
+
+		clearOutEvents();
+
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+
+			switch (stateVector[nextStateIndex]) {
+				case Main_region_StateA :
+					reactMain_region_StateA();
+					break;
+				case Main_region_StateB :
+					reactMain_region_StateB();
+					break;
+				default :
+					// $NullState$
+			}
+		}
+
+		clearEvents();
+	}
+}

+ 30 - 30
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/booleanexpressions/IBooleanExpressionsStatemachine.java

@@ -1,30 +1,30 @@
-package org.yakindu.scr.booleanexpressions;
-
-import org.yakindu.scr.IStatemachine;
-
-public interface IBooleanExpressionsStatemachine extends IStatemachine {
-
-	public interface SCIDefault {
-
-		public void raiseE1();
-
-		public boolean getMyBool1();
-		public void setMyBool1(boolean value);
-		public boolean getMyBool2();
-		public void setMyBool2(boolean value);
-		public boolean getAnd();
-		public void setAnd(boolean value);
-		public boolean getOr();
-		public void setOr(boolean value);
-		public boolean getNot();
-		public void setNot(boolean value);
-		public boolean getEqual();
-		public void setEqual(boolean value);
-		public boolean getNotequal();
-		public void setNotequal(boolean value);
-
-	}
-
-	public SCIDefault getSCIDefault();
-
-}
+package org.yakindu.scr.booleanexpressions;
+
+import org.yakindu.scr.IStatemachine;
+
+public interface IBooleanExpressionsStatemachine extends IStatemachine {
+
+	public interface SCIDefault {
+
+		public void raiseE1();
+
+		public boolean getMyBool1();
+		public void setMyBool1(boolean value);
+		public boolean getMyBool2();
+		public void setMyBool2(boolean value);
+		public boolean getAnd();
+		public void setAnd(boolean value);
+		public boolean getOr();
+		public void setOr(boolean value);
+		public boolean getNot();
+		public void setNot(boolean value);
+		public boolean getEqual();
+		public void setEqual(boolean value);
+		public boolean getNotequal();
+		public void setNotequal(boolean value);
+
+	}
+
+	public SCIDefault getSCIDefault();
+
+}

+ 220 - 220
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/choice/ChoiceStatemachine.java

@@ -1,220 +1,220 @@
-package org.yakindu.scr.choice;
-
-public class ChoiceStatemachine implements IChoiceStatemachine {
-
-	private final class SCIDefaultImpl implements SCIDefault {
-
-		private boolean pressKey;
-
-		public void raisePressKey() {
-			pressKey = true;
-		}
-
-		private int value = 4;
-
-		public int getValue() {
-			return value;
-		}
-
-		public void setValue(int value) {
-			this.value = value;
-		}
-
-		public void clearEvents() {
-			pressKey = false;
-		}
-
-	}
-
-	private SCIDefaultImpl sCIDefault;
-
-	public enum State {
-		Main_region_A, Main_region_B, Main_region_C, $NullState$
-	};
-
-	private final State[] stateVector = new State[1];
-
-	private int nextStateIndex;
-
-	public ChoiceStatemachine() {
-
-		sCIDefault = new SCIDefaultImpl();
-
-	}
-
-	public void init() {
-		for (int i = 0; i < 1; i++) {
-			stateVector[i] = State.$NullState$;
-		}
-
-		clearEvents();
-		clearOutEvents();
-	}
-
-	protected void clearEvents() {
-		sCIDefault.clearEvents();
-
-	}
-
-	protected void clearOutEvents() {
-	}
-
-	public boolean isStateActive(State state) {
-		switch (state) {
-
-			case Main_region_A :
-				return stateVector[0] == State.Main_region_A;
-
-			case Main_region_B :
-				return stateVector[0] == State.Main_region_B;
-
-			case Main_region_C :
-				return stateVector[0] == State.Main_region_C;
-
-			default :
-				return false;
-		}
-		/*
-		for (int i=0;i<stateVector.length;i++){
-			if (stateVector[i]==state) {
-				return true;
-			}
-		}
-		return false;
-		 */
-	}
-
-	public SCIDefault getSCIDefault() {
-		return sCIDefault;
-	}
-
-	public void raisePressKey() {
-		sCIDefault.raisePressKey();
-	}
-
-	public int getValue() {
-		return sCIDefault.getValue();
-	}
-
-	public void setValue(int value) {
-		sCIDefault.setValue(value);
-	}
-
-	public void enter() {
-		sCIDefault.value = 4;
-
-		entryActionChoice();
-		nextStateIndex = 0;
-		stateVector[0] = State.Main_region_A;
-
-	}
-
-	public void exit() {
-		//Handle exit of all possible states (of main region) at position 0...
-		switch (stateVector[0]) {
-
-			case Main_region_A :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			case Main_region_B :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			case Main_region_C :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			default :
-				break;
-		}
-
-		exitActionChoice();
-	}
-
-	private void entryActionChoice() {
-
-	}
-
-	private void exitActionChoice() {
-
-	}
-
-	private void reactMain_region_A() {
-		if (sCIDefault.pressKey) {
-			stateVector[0] = State.$NullState$;
-
-			if (((sCIDefault.value % 2) == 0)) {
-				sCIDefault.value -= 1;
-
-				nextStateIndex = 0;
-				stateVector[0] = State.Main_region_B;
-
-			} else {
-				sCIDefault.value -= 1;
-
-				nextStateIndex = 0;
-				stateVector[0] = State.Main_region_C;
-
-			}
-
-		}
-
-	}
-	private void reactMain_region_B() {
-		if (sCIDefault.pressKey) {
-			stateVector[0] = State.$NullState$;
-
-			nextStateIndex = 0;
-			stateVector[0] = State.Main_region_A;
-
-		}
-
-	}
-	private void reactMain_region_C() {
-		if (sCIDefault.pressKey) {
-			stateVector[0] = State.$NullState$;
-
-			if ((sCIDefault.value == 2)) {
-				sCIDefault.value -= 1;
-
-				nextStateIndex = 0;
-				stateVector[0] = State.Main_region_B;
-
-			} else {
-				nextStateIndex = 0;
-				stateVector[0] = State.Main_region_A;
-
-			}
-
-		}
-
-	}
-
-	public void runCycle() {
-
-		clearOutEvents();
-
-		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
-
-			switch (stateVector[nextStateIndex]) {
-				case Main_region_A :
-					reactMain_region_A();
-					break;
-				case Main_region_B :
-					reactMain_region_B();
-					break;
-				case Main_region_C :
-					reactMain_region_C();
-					break;
-				default :
-					// $NullState$
-			}
-		}
-
-		clearEvents();
-	}
-}
+package org.yakindu.scr.choice;
+
+public class ChoiceStatemachine implements IChoiceStatemachine {
+
+	private final class SCIDefaultImpl implements SCIDefault {
+
+		private boolean pressKey;
+
+		public void raisePressKey() {
+			pressKey = true;
+		}
+
+		private int value = 4;
+
+		public int getValue() {
+			return value;
+		}
+
+		public void setValue(int value) {
+			this.value = value;
+		}
+
+		public void clearEvents() {
+			pressKey = false;
+		}
+
+	}
+
+	private SCIDefaultImpl sCIDefault;
+
+	public enum State {
+		Main_region_A, Main_region_B, Main_region_C, $NullState$
+	};
+
+	private final State[] stateVector = new State[1];
+
+	private int nextStateIndex;
+
+	public ChoiceStatemachine() {
+
+		sCIDefault = new SCIDefaultImpl();
+
+	}
+
+	public void init() {
+		for (int i = 0; i < 1; i++) {
+			stateVector[i] = State.$NullState$;
+		}
+
+		clearEvents();
+		clearOutEvents();
+	}
+
+	protected void clearEvents() {
+		sCIDefault.clearEvents();
+
+	}
+
+	protected void clearOutEvents() {
+	}
+
+	public boolean isStateActive(State state) {
+		switch (state) {
+
+			case Main_region_A :
+				return stateVector[0] == State.Main_region_A;
+
+			case Main_region_B :
+				return stateVector[0] == State.Main_region_B;
+
+			case Main_region_C :
+				return stateVector[0] == State.Main_region_C;
+
+			default :
+				return false;
+		}
+		/*
+		for (int i=0;i<stateVector.length;i++){
+			if (stateVector[i]==state) {
+				return true;
+			}
+		}
+		return false;
+		 */
+	}
+
+	public SCIDefault getSCIDefault() {
+		return sCIDefault;
+	}
+
+	public void raisePressKey() {
+		sCIDefault.raisePressKey();
+	}
+
+	public int getValue() {
+		return sCIDefault.getValue();
+	}
+
+	public void setValue(int value) {
+		sCIDefault.setValue(value);
+	}
+
+	public void enter() {
+		sCIDefault.value = 4;
+
+		entryActionChoice();
+		nextStateIndex = 0;
+		stateVector[0] = State.Main_region_A;
+
+	}
+
+	public void exit() {
+		//Handle exit of all possible states (of main region) at position 0...
+		switch (stateVector[0]) {
+
+			case Main_region_A :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			case Main_region_B :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			case Main_region_C :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			default :
+				break;
+		}
+
+		exitActionChoice();
+	}
+
+	private void entryActionChoice() {
+
+	}
+
+	private void exitActionChoice() {
+
+	}
+
+	private void reactMain_region_A() {
+		if (sCIDefault.pressKey) {
+			stateVector[0] = State.$NullState$;
+
+			if (((sCIDefault.value % 2) == 0)) {
+				sCIDefault.value -= 1;
+
+				nextStateIndex = 0;
+				stateVector[0] = State.Main_region_B;
+
+			} else {
+				sCIDefault.value -= 1;
+
+				nextStateIndex = 0;
+				stateVector[0] = State.Main_region_C;
+
+			}
+
+		}
+
+	}
+	private void reactMain_region_B() {
+		if (sCIDefault.pressKey) {
+			stateVector[0] = State.$NullState$;
+
+			nextStateIndex = 0;
+			stateVector[0] = State.Main_region_A;
+
+		}
+
+	}
+	private void reactMain_region_C() {
+		if (sCIDefault.pressKey) {
+			stateVector[0] = State.$NullState$;
+
+			if ((sCIDefault.value == 2)) {
+				sCIDefault.value -= 1;
+
+				nextStateIndex = 0;
+				stateVector[0] = State.Main_region_B;
+
+			} else {
+				nextStateIndex = 0;
+				stateVector[0] = State.Main_region_A;
+
+			}
+
+		}
+
+	}
+
+	public void runCycle() {
+
+		clearOutEvents();
+
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+
+			switch (stateVector[nextStateIndex]) {
+				case Main_region_A :
+					reactMain_region_A();
+					break;
+				case Main_region_B :
+					reactMain_region_B();
+					break;
+				case Main_region_C :
+					reactMain_region_C();
+					break;
+				default :
+					// $NullState$
+			}
+		}
+
+		clearEvents();
+	}
+}

+ 18 - 18
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/choice/IChoiceStatemachine.java

@@ -1,18 +1,18 @@
-package org.yakindu.scr.choice;
-
-import org.yakindu.scr.IStatemachine;
-
-public interface IChoiceStatemachine extends IStatemachine {
-
-	public interface SCIDefault {
-
-		public void raisePressKey();
-
-		public int getValue();
-		public void setValue(int value);
-
-	}
-
-	public SCIDefault getSCIDefault();
-
-}
+package org.yakindu.scr.choice;
+
+import org.yakindu.scr.IStatemachine;
+
+public interface IChoiceStatemachine extends IStatemachine {
+
+	public interface SCIDefault {
+
+		public void raisePressKey();
+
+		public int getValue();
+		public void setValue(int value);
+
+	}
+
+	public SCIDefault getSCIDefault();
+
+}

File diff suppressed because it is too large
+ 896 - 896
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/ckeywords/CKeywordsStatemachine.java


+ 70 - 70
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/ckeywords/ICKeywordsStatemachine.java

@@ -1,70 +1,70 @@
-package org.yakindu.scr.ckeywords;
-
-import org.yakindu.scr.IStatemachine;
-
-public interface ICKeywordsStatemachine extends IStatemachine {
-
-	public interface SCIDefault {
-
-		public void raiseAuto();
-
-		public void raiseBreak();
-
-		public boolean getVarCase();
-		public void setVarCase(boolean value);
-		public int getVarDo();
-		public void setVarDo(int value);
-		public boolean getVarContinue();
-		public void setVarContinue(boolean value);
-		public boolean getVarDouble();
-		public void setVarDouble(boolean value);
-		public boolean getVarEnum();
-		public void setVarEnum(boolean value);
-		public boolean getExtern();
-		public void setExtern(boolean value);
-		public boolean getVarFloat();
-		public void setVarFloat(boolean value);
-		public boolean getVarFor();
-		public void setVarFor(boolean value);
-		public boolean getVarGoto();
-		public void setVarGoto(boolean value);
-		public boolean getVarIf();
-		public void setVarIf(boolean value);
-		public boolean getVarInt();
-		public void setVarInt(boolean value);
-		public boolean getVarLong();
-		public void setVarLong(boolean value);
-		public boolean getRegister();
-		public void setRegister(boolean value);
-		public boolean getVarReturn();
-		public void setVarReturn(boolean value);
-		public boolean getVarShort();
-		public void setVarShort(boolean value);
-		public boolean getSigned();
-		public void setSigned(boolean value);
-		public boolean getSizeof();
-		public void setSizeof(boolean value);
-		public boolean getVarStatic();
-		public void setVarStatic(boolean value);
-		public boolean getStruct();
-		public void setStruct(boolean value);
-		public boolean getVarSwitch();
-		public void setVarSwitch(boolean value);
-		public boolean getTypedef();
-		public void setTypedef(boolean value);
-		public boolean getUnion();
-		public void setUnion(boolean value);
-		public boolean getUnsigned();
-		public void setUnsigned(boolean value);
-		public boolean getVarVoid();
-		public void setVarVoid(boolean value);
-		public boolean getVarVolatile();
-		public void setVarVolatile(boolean value);
-		public boolean getVarWhile();
-		public void setVarWhile(boolean value);
-
-	}
-
-	public SCIDefault getSCIDefault();
-
-}
+package org.yakindu.scr.ckeywords;
+
+import org.yakindu.scr.IStatemachine;
+
+public interface ICKeywordsStatemachine extends IStatemachine {
+
+	public interface SCIDefault {
+
+		public void raiseAuto();
+
+		public void raiseBreak();
+
+		public boolean getVarCase();
+		public void setVarCase(boolean value);
+		public int getVarDo();
+		public void setVarDo(int value);
+		public boolean getVarContinue();
+		public void setVarContinue(boolean value);
+		public boolean getVarDouble();
+		public void setVarDouble(boolean value);
+		public boolean getVarEnum();
+		public void setVarEnum(boolean value);
+		public boolean getExtern();
+		public void setExtern(boolean value);
+		public boolean getVarFloat();
+		public void setVarFloat(boolean value);
+		public boolean getVarFor();
+		public void setVarFor(boolean value);
+		public boolean getVarGoto();
+		public void setVarGoto(boolean value);
+		public boolean getVarIf();
+		public void setVarIf(boolean value);
+		public boolean getVarInt();
+		public void setVarInt(boolean value);
+		public boolean getVarLong();
+		public void setVarLong(boolean value);
+		public boolean getRegister();
+		public void setRegister(boolean value);
+		public boolean getVarReturn();
+		public void setVarReturn(boolean value);
+		public boolean getVarShort();
+		public void setVarShort(boolean value);
+		public boolean getSigned();
+		public void setSigned(boolean value);
+		public boolean getSizeof();
+		public void setSizeof(boolean value);
+		public boolean getVarStatic();
+		public void setVarStatic(boolean value);
+		public boolean getStruct();
+		public void setStruct(boolean value);
+		public boolean getVarSwitch();
+		public void setVarSwitch(boolean value);
+		public boolean getTypedef();
+		public void setTypedef(boolean value);
+		public boolean getUnion();
+		public void setUnion(boolean value);
+		public boolean getUnsigned();
+		public void setUnsigned(boolean value);
+		public boolean getVarVoid();
+		public void setVarVoid(boolean value);
+		public boolean getVarVolatile();
+		public void setVarVolatile(boolean value);
+		public boolean getVarWhile();
+		public void setVarWhile(boolean value);
+
+	}
+
+	public SCIDefault getSCIDefault();
+
+}

File diff suppressed because it is too large
+ 882 - 882
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/deephistory/DeepHistoryStatemachine.java


+ 31 - 31
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/deephistory/IDeepHistoryStatemachine.java

@@ -1,31 +1,31 @@
-package org.yakindu.scr.deephistory;
-
-import org.yakindu.scr.IStatemachine;
-
-public interface IDeepHistoryStatemachine extends IStatemachine {
-
-	public interface SCIDefault {
-
-		public void raiseEvent1();
-
-		public void raiseEvent2();
-
-		public void raiseEvent3();
-
-		public void raiseEvent4();
-
-		public void raiseEvent5();
-
-		public void raiseEvent6();
-
-		public void raiseEvent7();
-
-		public void raiseEvent8();
-
-		public void raiseEvent9();
-
-	}
-
-	public SCIDefault getSCIDefault();
-
-}
+package org.yakindu.scr.deephistory;
+
+import org.yakindu.scr.IStatemachine;
+
+public interface IDeepHistoryStatemachine extends IStatemachine {
+
+	public interface SCIDefault {
+
+		public void raiseEvent1();
+
+		public void raiseEvent2();
+
+		public void raiseEvent3();
+
+		public void raiseEvent4();
+
+		public void raiseEvent5();
+
+		public void raiseEvent6();
+
+		public void raiseEvent7();
+
+		public void raiseEvent8();
+
+		public void raiseEvent9();
+
+	}
+
+	public SCIDefault getSCIDefault();
+
+}

+ 225 - 0
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/exitonselftransition/ExitOnSelfTransitionStatemachine.java

@@ -0,0 +1,225 @@
+package org.yakindu.scr.exitonselftransition;
+
+public class ExitOnSelfTransitionStatemachine
+		implements
+			IExitOnSelfTransitionStatemachine {
+
+	private final class SCIDefaultImpl implements SCIDefault {
+
+		private boolean e;
+
+		public void raiseE() {
+			e = true;
+		}
+
+		private boolean f;
+
+		public void raiseF() {
+			f = true;
+		}
+
+		private int entryCount = 0;
+
+		public int getEntryCount() {
+			return entryCount;
+		}
+
+		public void setEntryCount(int value) {
+			this.entryCount = value;
+		}
+
+		private int exitCount = 0;
+
+		public int getExitCount() {
+			return exitCount;
+		}
+
+		public void setExitCount(int value) {
+			this.exitCount = value;
+		}
+
+		public void clearEvents() {
+			e = false;
+			f = false;
+		}
+
+	}
+
+	private SCIDefaultImpl sCIDefault;
+
+	public enum State {
+		Main_region_A, Main_region_B, $NullState$
+	};
+
+	private final State[] stateVector = new State[1];
+
+	private int nextStateIndex;
+
+	public ExitOnSelfTransitionStatemachine() {
+
+		sCIDefault = new SCIDefaultImpl();
+
+	}
+
+	public void init() {
+		for (int i = 0; i < 1; i++) {
+			stateVector[i] = State.$NullState$;
+		}
+
+		clearEvents();
+		clearOutEvents();
+	}
+
+	protected void clearEvents() {
+		sCIDefault.clearEvents();
+
+	}
+
+	protected void clearOutEvents() {
+	}
+
+	public boolean isStateActive(State state) {
+		switch (state) {
+
+			case Main_region_A :
+				return stateVector[0] == State.Main_region_A;
+
+			case Main_region_B :
+				return stateVector[0] == State.Main_region_B;
+
+			default :
+				return false;
+		}
+		/*
+		for (int i=0;i<stateVector.length;i++){
+			if (stateVector[i]==state) {
+				return true;
+			}
+		}
+		return false;
+		 */
+	}
+
+	public SCIDefault getSCIDefault() {
+		return sCIDefault;
+	}
+
+	public void raiseE() {
+		sCIDefault.raiseE();
+	}
+
+	public void raiseF() {
+		sCIDefault.raiseF();
+	}
+
+	public int getEntryCount() {
+		return sCIDefault.getEntryCount();
+	}
+
+	public void setEntryCount(int value) {
+		sCIDefault.setEntryCount(value);
+	}
+	public int getExitCount() {
+		return sCIDefault.getExitCount();
+	}
+
+	public void setExitCount(int value) {
+		sCIDefault.setExitCount(value);
+	}
+
+	public void enter() {
+		sCIDefault.entryCount = 0;
+
+		sCIDefault.exitCount = 0;
+
+		entryActionExitOnSelfTransition();
+		sCIDefault.entryCount += 1;
+
+		nextStateIndex = 0;
+		stateVector[0] = State.Main_region_A;
+
+	}
+
+	public void exit() {
+		//Handle exit of all possible states (of main region) at position 0...
+		switch (stateVector[0]) {
+
+			case Main_region_A :
+				stateVector[0] = State.$NullState$;
+				sCIDefault.exitCount += 1;
+
+				break;
+
+			case Main_region_B :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			default :
+				break;
+		}
+
+		exitActionExitOnSelfTransition();
+	}
+
+	private void entryActionExitOnSelfTransition() {
+
+	}
+
+	private void exitActionExitOnSelfTransition() {
+
+	}
+
+	private void reactMain_region_A() {
+		if (sCIDefault.e) {
+			sCIDefault.entryCount += 1;
+
+			nextStateIndex = 0;
+			stateVector[0] = State.Main_region_A;
+
+		} else {
+			if (sCIDefault.f) {
+				stateVector[0] = State.$NullState$;
+				sCIDefault.exitCount += 1;
+
+				nextStateIndex = 0;
+				stateVector[0] = State.Main_region_B;
+
+			}
+		}
+
+	}
+	private void reactMain_region_B() {
+		if (sCIDefault.f) {
+			stateVector[0] = State.$NullState$;
+
+			sCIDefault.entryCount += 1;
+
+			nextStateIndex = 0;
+			stateVector[0] = State.Main_region_A;
+
+		}
+
+	}
+
+	public void runCycle() {
+
+		clearOutEvents();
+
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+
+			switch (stateVector[nextStateIndex]) {
+				case Main_region_A :
+					reactMain_region_A();
+					break;
+				case Main_region_B :
+					reactMain_region_B();
+					break;
+				default :
+					// $NullState$
+			}
+		}
+
+		clearEvents();
+	}
+}

+ 22 - 0
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/exitonselftransition/IExitOnSelfTransitionStatemachine.java

@@ -0,0 +1,22 @@
+package org.yakindu.scr.exitonselftransition;
+
+import org.yakindu.scr.IStatemachine;
+
+public interface IExitOnSelfTransitionStatemachine extends IStatemachine {
+
+	public interface SCIDefault {
+
+		public void raiseE();
+
+		public void raiseF();
+
+		public int getEntryCount();
+		public void setEntryCount(int value);
+		public int getExitCount();
+		public void setExitCount(int value);
+
+	}
+
+	public SCIDefault getSCIDefault();
+
+}

+ 169 - 169
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/featurecalls/FeatureCallsStatemachine.java

@@ -1,169 +1,169 @@
-package org.yakindu.scr.featurecalls;
-
-public class FeatureCallsStatemachine implements IFeatureCallsStatemachine {
-
-	private final class SCIMyInterfaceImpl implements SCIMyInterface {
-
-		private boolean event1;
-
-		public void raiseEvent1() {
-			event1 = true;
-		}
-
-		private int myInt;
-
-		public int getMyInt() {
-			return myInt;
-		}
-
-		public void setMyInt(int value) {
-			this.myInt = value;
-		}
-
-		public void clearEvents() {
-			event1 = false;
-		}
-
-	}
-
-	private SCIMyInterfaceImpl sCIMyInterface;
-
-	public enum State {
-		Main_region_A, Main_region_B, $NullState$
-	};
-
-	private final State[] stateVector = new State[1];
-
-	private int nextStateIndex;
-
-	public FeatureCallsStatemachine() {
-
-		sCIMyInterface = new SCIMyInterfaceImpl();
-
-	}
-
-	public void init() {
-		for (int i = 0; i < 1; i++) {
-			stateVector[i] = State.$NullState$;
-		}
-
-		clearEvents();
-		clearOutEvents();
-	}
-
-	protected void clearEvents() {
-		sCIMyInterface.clearEvents();
-
-	}
-
-	protected void clearOutEvents() {
-	}
-
-	public boolean isStateActive(State state) {
-		switch (state) {
-
-			case Main_region_A :
-				return stateVector[0] == State.Main_region_A;
-
-			case Main_region_B :
-				return stateVector[0] == State.Main_region_B;
-
-			default :
-				return false;
-		}
-		/*
-		for (int i=0;i<stateVector.length;i++){
-			if (stateVector[i]==state) {
-				return true;
-			}
-		}
-		return false;
-		 */
-	}
-
-	public SCIMyInterface getSCIMyInterface() {
-		return sCIMyInterface;
-	}
-
-	public void enter() {
-		entryActionFeatureCalls();
-		nextStateIndex = 0;
-		stateVector[0] = State.Main_region_A;
-
-	}
-
-	public void exit() {
-		//Handle exit of all possible states (of main region) at position 0...
-		switch (stateVector[0]) {
-
-			case Main_region_A :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			case Main_region_B :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			default :
-				break;
-		}
-
-		exitActionFeatureCalls();
-	}
-
-	private void entryActionFeatureCalls() {
-
-	}
-
-	private void exitActionFeatureCalls() {
-
-	}
-
-	private void reactMain_region_A() {
-		if (sCIMyInterface.event1) {
-			stateVector[0] = State.$NullState$;
-
-			sCIMyInterface.myInt = 42;
-
-			sCIMyInterface.raiseEvent1();
-
-			nextStateIndex = 0;
-			stateVector[0] = State.Main_region_B;
-
-		}
-
-	}
-	private void reactMain_region_B() {
-		if (sCIMyInterface.event1) {
-			stateVector[0] = State.$NullState$;
-
-			nextStateIndex = 0;
-			stateVector[0] = State.Main_region_A;
-
-		}
-
-	}
-
-	public void runCycle() {
-
-		clearOutEvents();
-
-		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
-
-			switch (stateVector[nextStateIndex]) {
-				case Main_region_A :
-					reactMain_region_A();
-					break;
-				case Main_region_B :
-					reactMain_region_B();
-					break;
-				default :
-					// $NullState$
-			}
-		}
-
-		clearEvents();
-	}
-}
+package org.yakindu.scr.featurecalls;
+
+public class FeatureCallsStatemachine implements IFeatureCallsStatemachine {
+
+	private final class SCIMyInterfaceImpl implements SCIMyInterface {
+
+		private boolean event1;
+
+		public void raiseEvent1() {
+			event1 = true;
+		}
+
+		private int myInt;
+
+		public int getMyInt() {
+			return myInt;
+		}
+
+		public void setMyInt(int value) {
+			this.myInt = value;
+		}
+
+		public void clearEvents() {
+			event1 = false;
+		}
+
+	}
+
+	private SCIMyInterfaceImpl sCIMyInterface;
+
+	public enum State {
+		Main_region_A, Main_region_B, $NullState$
+	};
+
+	private final State[] stateVector = new State[1];
+
+	private int nextStateIndex;
+
+	public FeatureCallsStatemachine() {
+
+		sCIMyInterface = new SCIMyInterfaceImpl();
+
+	}
+
+	public void init() {
+		for (int i = 0; i < 1; i++) {
+			stateVector[i] = State.$NullState$;
+		}
+
+		clearEvents();
+		clearOutEvents();
+	}
+
+	protected void clearEvents() {
+		sCIMyInterface.clearEvents();
+
+	}
+
+	protected void clearOutEvents() {
+	}
+
+	public boolean isStateActive(State state) {
+		switch (state) {
+
+			case Main_region_A :
+				return stateVector[0] == State.Main_region_A;
+
+			case Main_region_B :
+				return stateVector[0] == State.Main_region_B;
+
+			default :
+				return false;
+		}
+		/*
+		for (int i=0;i<stateVector.length;i++){
+			if (stateVector[i]==state) {
+				return true;
+			}
+		}
+		return false;
+		 */
+	}
+
+	public SCIMyInterface getSCIMyInterface() {
+		return sCIMyInterface;
+	}
+
+	public void enter() {
+		entryActionFeatureCalls();
+		nextStateIndex = 0;
+		stateVector[0] = State.Main_region_A;
+
+	}
+
+	public void exit() {
+		//Handle exit of all possible states (of main region) at position 0...
+		switch (stateVector[0]) {
+
+			case Main_region_A :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			case Main_region_B :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			default :
+				break;
+		}
+
+		exitActionFeatureCalls();
+	}
+
+	private void entryActionFeatureCalls() {
+
+	}
+
+	private void exitActionFeatureCalls() {
+
+	}
+
+	private void reactMain_region_A() {
+		if (sCIMyInterface.event1) {
+			stateVector[0] = State.$NullState$;
+
+			sCIMyInterface.myInt = 42;
+
+			sCIMyInterface.raiseEvent1();
+
+			nextStateIndex = 0;
+			stateVector[0] = State.Main_region_B;
+
+		}
+
+	}
+	private void reactMain_region_B() {
+		if (sCIMyInterface.event1) {
+			stateVector[0] = State.$NullState$;
+
+			nextStateIndex = 0;
+			stateVector[0] = State.Main_region_A;
+
+		}
+
+	}
+
+	public void runCycle() {
+
+		clearOutEvents();
+
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+
+			switch (stateVector[nextStateIndex]) {
+				case Main_region_A :
+					reactMain_region_A();
+					break;
+				case Main_region_B :
+					reactMain_region_B();
+					break;
+				default :
+					// $NullState$
+			}
+		}
+
+		clearEvents();
+	}
+}

+ 18 - 18
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/featurecalls/IFeatureCallsStatemachine.java

@@ -1,18 +1,18 @@
-package org.yakindu.scr.featurecalls;
-
-import org.yakindu.scr.IStatemachine;
-
-public interface IFeatureCallsStatemachine extends IStatemachine {
-
-	public interface SCIMyInterface {
-
-		public void raiseEvent1();
-
-		public int getMyInt();
-		public void setMyInt(int value);
-
-	}
-
-	public SCIMyInterface getSCIMyInterface();
-
-}
+package org.yakindu.scr.featurecalls;
+
+import org.yakindu.scr.IStatemachine;
+
+public interface IFeatureCallsStatemachine extends IStatemachine {
+
+	public interface SCIMyInterface {
+
+		public void raiseEvent1();
+
+		public int getMyInt();
+		public void setMyInt(int value);
+
+	}
+
+	public SCIMyInterface getSCIMyInterface();
+
+}

+ 213 - 213
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/guard/GuardStatemachine.java

@@ -1,213 +1,213 @@
-package org.yakindu.scr.guard;
-
-public class GuardStatemachine implements IGuardStatemachine {
-
-	private final class SCIDefaultImpl implements SCIDefault {
-
-		private boolean event1;
-
-		public void raiseEvent1() {
-			event1 = true;
-		}
-
-		private boolean event2;
-
-		public void raiseEvent2() {
-			event2 = true;
-		}
-
-		private boolean eventReturn;
-
-		public void raiseReturn() {
-			eventReturn = true;
-		}
-
-		private int myVar = 0;
-
-		public int getMyVar() {
-			return myVar;
-		}
-
-		public void setMyVar(int value) {
-			this.myVar = value;
-		}
-
-		public void clearEvents() {
-			event1 = false;
-			event2 = false;
-			eventReturn = false;
-		}
-
-	}
-
-	private SCIDefaultImpl sCIDefault;
-
-	public enum State {
-		Main_region_A, Main_region_B, $NullState$
-	};
-
-	private final State[] stateVector = new State[1];
-
-	private int nextStateIndex;
-
-	public GuardStatemachine() {
-
-		sCIDefault = new SCIDefaultImpl();
-
-	}
-
-	public void init() {
-		for (int i = 0; i < 1; i++) {
-			stateVector[i] = State.$NullState$;
-		}
-
-		clearEvents();
-		clearOutEvents();
-	}
-
-	protected void clearEvents() {
-		sCIDefault.clearEvents();
-
-	}
-
-	protected void clearOutEvents() {
-	}
-
-	public boolean isStateActive(State state) {
-		switch (state) {
-
-			case Main_region_A :
-				return stateVector[0] == State.Main_region_A;
-
-			case Main_region_B :
-				return stateVector[0] == State.Main_region_B;
-
-			default :
-				return false;
-		}
-		/*
-		for (int i=0;i<stateVector.length;i++){
-			if (stateVector[i]==state) {
-				return true;
-			}
-		}
-		return false;
-		 */
-	}
-
-	public SCIDefault getSCIDefault() {
-		return sCIDefault;
-	}
-
-	public void raiseEvent1() {
-		sCIDefault.raiseEvent1();
-	}
-
-	public void raiseEvent2() {
-		sCIDefault.raiseEvent2();
-	}
-
-	public void raiseReturn() {
-		sCIDefault.raiseReturn();
-	}
-
-	public int getMyVar() {
-		return sCIDefault.getMyVar();
-	}
-
-	public void setMyVar(int value) {
-		sCIDefault.setMyVar(value);
-	}
-
-	public void enter() {
-		sCIDefault.myVar = 0;
-
-		entryActionGuard();
-		nextStateIndex = 0;
-		stateVector[0] = State.Main_region_A;
-
-	}
-
-	public void exit() {
-		//Handle exit of all possible states (of main region) at position 0...
-		switch (stateVector[0]) {
-
-			case Main_region_A :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			case Main_region_B :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			default :
-				break;
-		}
-
-		exitActionGuard();
-	}
-
-	private void entryActionGuard() {
-
-	}
-
-	private void exitActionGuard() {
-
-	}
-
-	private void reactMain_region_A() {
-		if ((sCIDefault.event1 && (sCIDefault.myVar == 10))) {
-			stateVector[0] = State.$NullState$;
-
-			sCIDefault.myVar = 10;
-
-			nextStateIndex = 0;
-			stateVector[0] = State.Main_region_B;
-
-		} else {
-			if (sCIDefault.event2) {
-				stateVector[0] = State.$NullState$;
-
-				sCIDefault.myVar = 10;
-
-				nextStateIndex = 0;
-				stateVector[0] = State.Main_region_B;
-
-			}
-		}
-
-	}
-	private void reactMain_region_B() {
-		if (sCIDefault.eventReturn) {
-			stateVector[0] = State.$NullState$;
-
-			nextStateIndex = 0;
-			stateVector[0] = State.Main_region_A;
-
-		}
-
-	}
-
-	public void runCycle() {
-
-		clearOutEvents();
-
-		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
-
-			switch (stateVector[nextStateIndex]) {
-				case Main_region_A :
-					reactMain_region_A();
-					break;
-				case Main_region_B :
-					reactMain_region_B();
-					break;
-				default :
-					// $NullState$
-			}
-		}
-
-		clearEvents();
-	}
-}
+package org.yakindu.scr.guard;
+
+public class GuardStatemachine implements IGuardStatemachine {
+
+	private final class SCIDefaultImpl implements SCIDefault {
+
+		private boolean event1;
+
+		public void raiseEvent1() {
+			event1 = true;
+		}
+
+		private boolean event2;
+
+		public void raiseEvent2() {
+			event2 = true;
+		}
+
+		private boolean eventReturn;
+
+		public void raiseReturn() {
+			eventReturn = true;
+		}
+
+		private int myVar = 0;
+
+		public int getMyVar() {
+			return myVar;
+		}
+
+		public void setMyVar(int value) {
+			this.myVar = value;
+		}
+
+		public void clearEvents() {
+			event1 = false;
+			event2 = false;
+			eventReturn = false;
+		}
+
+	}
+
+	private SCIDefaultImpl sCIDefault;
+
+	public enum State {
+		Main_region_A, Main_region_B, $NullState$
+	};
+
+	private final State[] stateVector = new State[1];
+
+	private int nextStateIndex;
+
+	public GuardStatemachine() {
+
+		sCIDefault = new SCIDefaultImpl();
+
+	}
+
+	public void init() {
+		for (int i = 0; i < 1; i++) {
+			stateVector[i] = State.$NullState$;
+		}
+
+		clearEvents();
+		clearOutEvents();
+	}
+
+	protected void clearEvents() {
+		sCIDefault.clearEvents();
+
+	}
+
+	protected void clearOutEvents() {
+	}
+
+	public boolean isStateActive(State state) {
+		switch (state) {
+
+			case Main_region_A :
+				return stateVector[0] == State.Main_region_A;
+
+			case Main_region_B :
+				return stateVector[0] == State.Main_region_B;
+
+			default :
+				return false;
+		}
+		/*
+		for (int i=0;i<stateVector.length;i++){
+			if (stateVector[i]==state) {
+				return true;
+			}
+		}
+		return false;
+		 */
+	}
+
+	public SCIDefault getSCIDefault() {
+		return sCIDefault;
+	}
+
+	public void raiseEvent1() {
+		sCIDefault.raiseEvent1();
+	}
+
+	public void raiseEvent2() {
+		sCIDefault.raiseEvent2();
+	}
+
+	public void raiseReturn() {
+		sCIDefault.raiseReturn();
+	}
+
+	public int getMyVar() {
+		return sCIDefault.getMyVar();
+	}
+
+	public void setMyVar(int value) {
+		sCIDefault.setMyVar(value);
+	}
+
+	public void enter() {
+		sCIDefault.myVar = 0;
+
+		entryActionGuard();
+		nextStateIndex = 0;
+		stateVector[0] = State.Main_region_A;
+
+	}
+
+	public void exit() {
+		//Handle exit of all possible states (of main region) at position 0...
+		switch (stateVector[0]) {
+
+			case Main_region_A :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			case Main_region_B :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			default :
+				break;
+		}
+
+		exitActionGuard();
+	}
+
+	private void entryActionGuard() {
+
+	}
+
+	private void exitActionGuard() {
+
+	}
+
+	private void reactMain_region_A() {
+		if ((sCIDefault.event1 && (sCIDefault.myVar == 10))) {
+			stateVector[0] = State.$NullState$;
+
+			sCIDefault.myVar = 10;
+
+			nextStateIndex = 0;
+			stateVector[0] = State.Main_region_B;
+
+		} else {
+			if (sCIDefault.event2) {
+				stateVector[0] = State.$NullState$;
+
+				sCIDefault.myVar = 10;
+
+				nextStateIndex = 0;
+				stateVector[0] = State.Main_region_B;
+
+			}
+		}
+
+	}
+	private void reactMain_region_B() {
+		if (sCIDefault.eventReturn) {
+			stateVector[0] = State.$NullState$;
+
+			nextStateIndex = 0;
+			stateVector[0] = State.Main_region_A;
+
+		}
+
+	}
+
+	public void runCycle() {
+
+		clearOutEvents();
+
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+
+			switch (stateVector[nextStateIndex]) {
+				case Main_region_A :
+					reactMain_region_A();
+					break;
+				case Main_region_B :
+					reactMain_region_B();
+					break;
+				default :
+					// $NullState$
+			}
+		}
+
+		clearEvents();
+	}
+}

+ 22 - 22
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/guard/IGuardStatemachine.java

@@ -1,22 +1,22 @@
-package org.yakindu.scr.guard;
-
-import org.yakindu.scr.IStatemachine;
-
-public interface IGuardStatemachine extends IStatemachine {
-
-	public interface SCIDefault {
-
-		public void raiseEvent1();
-
-		public void raiseEvent2();
-
-		public void raiseReturn();
-
-		public int getMyVar();
-		public void setMyVar(int value);
-
-	}
-
-	public SCIDefault getSCIDefault();
-
-}
+package org.yakindu.scr.guard;
+
+import org.yakindu.scr.IStatemachine;
+
+public interface IGuardStatemachine extends IStatemachine {
+
+	public interface SCIDefault {
+
+		public void raiseEvent1();
+
+		public void raiseEvent2();
+
+		public void raiseReturn();
+
+		public int getMyVar();
+		public void setMyVar(int value);
+
+	}
+
+	public SCIDefault getSCIDefault();
+
+}

+ 202 - 0
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/guardedentry/GuardedEntryStatemachine.java

@@ -0,0 +1,202 @@
+package org.yakindu.scr.guardedentry;
+
+public class GuardedEntryStatemachine implements IGuardedEntryStatemachine {
+
+	private final class SCIDefaultImpl implements SCIDefault {
+
+		private boolean e;
+
+		public void raiseE() {
+			e = true;
+		}
+
+		private boolean guard = false;
+
+		public boolean getGuard() {
+			return guard;
+		}
+
+		public void setGuard(boolean value) {
+			this.guard = value;
+		}
+
+		private boolean done = false;
+
+		public boolean getDone() {
+			return done;
+		}
+
+		public void setDone(boolean value) {
+			this.done = value;
+		}
+
+		public void clearEvents() {
+			e = false;
+		}
+
+	}
+
+	private SCIDefaultImpl sCIDefault;
+
+	public enum State {
+		Main_region_A, Main_region_B, $NullState$
+	};
+
+	private final State[] stateVector = new State[1];
+
+	private int nextStateIndex;
+
+	public GuardedEntryStatemachine() {
+
+		sCIDefault = new SCIDefaultImpl();
+
+	}
+
+	public void init() {
+		for (int i = 0; i < 1; i++) {
+			stateVector[i] = State.$NullState$;
+		}
+
+		clearEvents();
+		clearOutEvents();
+	}
+
+	protected void clearEvents() {
+		sCIDefault.clearEvents();
+
+	}
+
+	protected void clearOutEvents() {
+	}
+
+	public boolean isStateActive(State state) {
+		switch (state) {
+
+			case Main_region_A :
+				return stateVector[0] == State.Main_region_A;
+
+			case Main_region_B :
+				return stateVector[0] == State.Main_region_B;
+
+			default :
+				return false;
+		}
+		/*
+		for (int i=0;i<stateVector.length;i++){
+			if (stateVector[i]==state) {
+				return true;
+			}
+		}
+		return false;
+		 */
+	}
+
+	public SCIDefault getSCIDefault() {
+		return sCIDefault;
+	}
+
+	public void raiseE() {
+		sCIDefault.raiseE();
+	}
+
+	public boolean getGuard() {
+		return sCIDefault.getGuard();
+	}
+
+	public void setGuard(boolean value) {
+		sCIDefault.setGuard(value);
+	}
+	public boolean getDone() {
+		return sCIDefault.getDone();
+	}
+
+	public void setDone(boolean value) {
+		sCIDefault.setDone(value);
+	}
+
+	public void enter() {
+		sCIDefault.guard = false;
+
+		sCIDefault.done = false;
+
+		entryActionGuardedEntry();
+		sCIDefault.done = true;
+
+		nextStateIndex = 0;
+		stateVector[0] = State.Main_region_A;
+
+	}
+
+	public void exit() {
+		//Handle exit of all possible states (of main region) at position 0...
+		switch (stateVector[0]) {
+
+			case Main_region_A :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			case Main_region_B :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			default :
+				break;
+		}
+
+		exitActionGuardedEntry();
+	}
+
+	private void entryActionGuardedEntry() {
+
+	}
+
+	private void exitActionGuardedEntry() {
+
+	}
+
+	private void reactMain_region_A() {
+		if (sCIDefault.e) {
+			stateVector[0] = State.$NullState$;
+
+			nextStateIndex = 0;
+			stateVector[0] = State.Main_region_B;
+
+		}
+
+	}
+	private void reactMain_region_B() {
+		if (sCIDefault.e) {
+			stateVector[0] = State.$NullState$;
+
+			sCIDefault.done = true;
+
+			nextStateIndex = 0;
+			stateVector[0] = State.Main_region_A;
+
+		}
+
+	}
+
+	public void runCycle() {
+
+		clearOutEvents();
+
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+
+			switch (stateVector[nextStateIndex]) {
+				case Main_region_A :
+					reactMain_region_A();
+					break;
+				case Main_region_B :
+					reactMain_region_B();
+					break;
+				default :
+					// $NullState$
+			}
+		}
+
+		clearEvents();
+	}
+}

+ 20 - 0
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/guardedentry/IGuardedEntryStatemachine.java

@@ -0,0 +1,20 @@
+package org.yakindu.scr.guardedentry;
+
+import org.yakindu.scr.IStatemachine;
+
+public interface IGuardedEntryStatemachine extends IStatemachine {
+
+	public interface SCIDefault {
+
+		public void raiseE();
+
+		public boolean getGuard();
+		public void setGuard(boolean value);
+		public boolean getDone();
+		public void setDone(boolean value);
+
+	}
+
+	public SCIDefault getSCIDefault();
+
+}

+ 200 - 0
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/guardedexit/GuardedExitStatemachine.java

@@ -0,0 +1,200 @@
+package org.yakindu.scr.guardedexit;
+
+public class GuardedExitStatemachine implements IGuardedExitStatemachine {
+
+	private final class SCIDefaultImpl implements SCIDefault {
+
+		private boolean e;
+
+		public void raiseE() {
+			e = true;
+		}
+
+		private boolean guard = false;
+
+		public boolean getGuard() {
+			return guard;
+		}
+
+		public void setGuard(boolean value) {
+			this.guard = value;
+		}
+
+		private boolean done = false;
+
+		public boolean getDone() {
+			return done;
+		}
+
+		public void setDone(boolean value) {
+			this.done = value;
+		}
+
+		public void clearEvents() {
+			e = false;
+		}
+
+	}
+
+	private SCIDefaultImpl sCIDefault;
+
+	public enum State {
+		Main_region_A, Main_region_B, $NullState$
+	};
+
+	private final State[] stateVector = new State[1];
+
+	private int nextStateIndex;
+
+	public GuardedExitStatemachine() {
+
+		sCIDefault = new SCIDefaultImpl();
+
+	}
+
+	public void init() {
+		for (int i = 0; i < 1; i++) {
+			stateVector[i] = State.$NullState$;
+		}
+
+		clearEvents();
+		clearOutEvents();
+	}
+
+	protected void clearEvents() {
+		sCIDefault.clearEvents();
+
+	}
+
+	protected void clearOutEvents() {
+	}
+
+	public boolean isStateActive(State state) {
+		switch (state) {
+
+			case Main_region_A :
+				return stateVector[0] == State.Main_region_A;
+
+			case Main_region_B :
+				return stateVector[0] == State.Main_region_B;
+
+			default :
+				return false;
+		}
+		/*
+		for (int i=0;i<stateVector.length;i++){
+			if (stateVector[i]==state) {
+				return true;
+			}
+		}
+		return false;
+		 */
+	}
+
+	public SCIDefault getSCIDefault() {
+		return sCIDefault;
+	}
+
+	public void raiseE() {
+		sCIDefault.raiseE();
+	}
+
+	public boolean getGuard() {
+		return sCIDefault.getGuard();
+	}
+
+	public void setGuard(boolean value) {
+		sCIDefault.setGuard(value);
+	}
+	public boolean getDone() {
+		return sCIDefault.getDone();
+	}
+
+	public void setDone(boolean value) {
+		sCIDefault.setDone(value);
+	}
+
+	public void enter() {
+		sCIDefault.guard = false;
+
+		sCIDefault.done = false;
+
+		entryActionGuardedExit();
+		nextStateIndex = 0;
+		stateVector[0] = State.Main_region_A;
+
+	}
+
+	public void exit() {
+		//Handle exit of all possible states (of main region) at position 0...
+		switch (stateVector[0]) {
+
+			case Main_region_A :
+				stateVector[0] = State.$NullState$;
+				sCIDefault.done = true;
+
+				break;
+
+			case Main_region_B :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			default :
+				break;
+		}
+
+		exitActionGuardedExit();
+	}
+
+	private void entryActionGuardedExit() {
+
+	}
+
+	private void exitActionGuardedExit() {
+
+	}
+
+	private void reactMain_region_A() {
+		if (sCIDefault.e) {
+			stateVector[0] = State.$NullState$;
+			sCIDefault.done = true;
+
+			nextStateIndex = 0;
+			stateVector[0] = State.Main_region_B;
+
+		}
+
+	}
+	private void reactMain_region_B() {
+		if (sCIDefault.e) {
+			stateVector[0] = State.$NullState$;
+
+			nextStateIndex = 0;
+			stateVector[0] = State.Main_region_A;
+
+		}
+
+	}
+
+	public void runCycle() {
+
+		clearOutEvents();
+
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+
+			switch (stateVector[nextStateIndex]) {
+				case Main_region_A :
+					reactMain_region_A();
+					break;
+				case Main_region_B :
+					reactMain_region_B();
+					break;
+				default :
+					// $NullState$
+			}
+		}
+
+		clearEvents();
+	}
+}

+ 20 - 0
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/guardedexit/IGuardedExitStatemachine.java

@@ -0,0 +1,20 @@
+package org.yakindu.scr.guardedexit;
+
+import org.yakindu.scr.IStatemachine;
+
+public interface IGuardedExitStatemachine extends IStatemachine {
+
+	public interface SCIDefault {
+
+		public void raiseE();
+
+		public boolean getGuard();
+		public void setGuard(boolean value);
+		public boolean getDone();
+		public void setDone(boolean value);
+
+	}
+
+	public SCIDefault getSCIDefault();
+
+}

+ 56 - 56
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/integerexpressions/IIntegerExpressionsStatemachine.java

@@ -1,56 +1,56 @@
-package org.yakindu.scr.integerexpressions;
-
-import org.yakindu.scr.IStatemachine;
-
-public interface IIntegerExpressionsStatemachine extends IStatemachine {
-
-	public interface SCIDefault {
-
-		public void raiseE1();
-
-		public int getMyInt1();
-		public void setMyInt1(int value);
-		public int getMyInt2();
-		public void setMyInt2(int value);
-		public boolean getLess();
-		public void setLess(boolean value);
-		public boolean getGreater();
-		public void setGreater(boolean value);
-		public boolean getEqualOrLess();
-		public void setEqualOrLess(boolean value);
-		public boolean getEqualOrGreater();
-		public void setEqualOrGreater(boolean value);
-		public boolean getEqual();
-		public void setEqual(boolean value);
-		public boolean getNotEqual();
-		public void setNotEqual(boolean value);
-		public int getPlus();
-		public void setPlus(int value);
-		public int getMinus();
-		public void setMinus(int value);
-		public int getMultiply();
-		public void setMultiply(int value);
-		public int getDivision();
-		public void setDivision(int value);
-		public int getModulo();
-		public void setModulo(int value);
-		public int getNegat();
-		public void setNegat(int value);
-		public boolean getComplement();
-		public void setComplement(boolean value);
-		public int getMultiAssign();
-		public void setMultiAssign(int value);
-		public int getDivAssign();
-		public void setDivAssign(int value);
-		public int getPlusAssign();
-		public void setPlusAssign(int value);
-		public int getMinusAssign();
-		public void setMinusAssign(int value);
-		public int getModuloAssign();
-		public void setModuloAssign(int value);
-
-	}
-
-	public SCIDefault getSCIDefault();
-
-}
+package org.yakindu.scr.integerexpressions;
+
+import org.yakindu.scr.IStatemachine;
+
+public interface IIntegerExpressionsStatemachine extends IStatemachine {
+
+	public interface SCIDefault {
+
+		public void raiseE1();
+
+		public int getMyInt1();
+		public void setMyInt1(int value);
+		public int getMyInt2();
+		public void setMyInt2(int value);
+		public boolean getLess();
+		public void setLess(boolean value);
+		public boolean getGreater();
+		public void setGreater(boolean value);
+		public boolean getEqualOrLess();
+		public void setEqualOrLess(boolean value);
+		public boolean getEqualOrGreater();
+		public void setEqualOrGreater(boolean value);
+		public boolean getEqual();
+		public void setEqual(boolean value);
+		public boolean getNotEqual();
+		public void setNotEqual(boolean value);
+		public int getPlus();
+		public void setPlus(int value);
+		public int getMinus();
+		public void setMinus(int value);
+		public int getMultiply();
+		public void setMultiply(int value);
+		public int getDivision();
+		public void setDivision(int value);
+		public int getModulo();
+		public void setModulo(int value);
+		public int getNegat();
+		public void setNegat(int value);
+		public boolean getComplement();
+		public void setComplement(boolean value);
+		public int getMultiAssign();
+		public void setMultiAssign(int value);
+		public int getDivAssign();
+		public void setDivAssign(int value);
+		public int getPlusAssign();
+		public void setPlusAssign(int value);
+		public int getMinusAssign();
+		public void setMinusAssign(int value);
+		public int getModuloAssign();
+		public void setModuloAssign(int value);
+
+	}
+
+	public SCIDefault getSCIDefault();
+
+}

File diff suppressed because it is too large
+ 543 - 543
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/integerexpressions/IntegerExpressionsStatemachine.java


+ 17 - 0
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/internaleventlifecycle/IInternalEventLifeCycleStatemachine.java

@@ -0,0 +1,17 @@
+package org.yakindu.scr.internaleventlifecycle;
+
+import org.yakindu.scr.IStatemachine;
+
+public interface IInternalEventLifeCycleStatemachine extends IStatemachine {
+
+	public interface SCIDefault {
+
+		public void raiseE();
+
+		public void raiseF();
+
+	}
+
+	public SCIDefault getSCIDefault();
+
+}

+ 244 - 0
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/internaleventlifecycle/InternalEventLifeCycleStatemachine.java

@@ -0,0 +1,244 @@
+package org.yakindu.scr.internaleventlifecycle;
+
+public class InternalEventLifeCycleStatemachine
+		implements
+			IInternalEventLifeCycleStatemachine {
+
+	private boolean i1;
+
+	private boolean i2;
+
+	private final class SCIDefaultImpl implements SCIDefault {
+
+		private boolean e;
+
+		public void raiseE() {
+			e = true;
+		}
+
+		private boolean f;
+
+		public void raiseF() {
+			f = true;
+		}
+
+		public void clearEvents() {
+			e = false;
+			f = false;
+		}
+
+	}
+
+	private SCIDefaultImpl sCIDefault;
+
+	public enum State {
+		R1_A, R1_B, R2_C, R2_D, $NullState$
+	};
+
+	private final State[] stateVector = new State[2];
+
+	private int nextStateIndex;
+
+	public InternalEventLifeCycleStatemachine() {
+
+		sCIDefault = new SCIDefaultImpl();
+
+	}
+
+	public void init() {
+		for (int i = 0; i < 2; i++) {
+			stateVector[i] = State.$NullState$;
+		}
+
+		clearEvents();
+		clearOutEvents();
+	}
+
+	protected void clearEvents() {
+		sCIDefault.clearEvents();
+		i1 = false;
+		i2 = false;
+
+	}
+
+	protected void clearOutEvents() {
+	}
+
+	public boolean isStateActive(State state) {
+		switch (state) {
+
+			case R1_A :
+				return stateVector[0] == State.R1_A;
+
+			case R1_B :
+				return stateVector[0] == State.R1_B;
+
+			case R2_C :
+				return stateVector[1] == State.R2_C;
+
+			case R2_D :
+				return stateVector[1] == State.R2_D;
+
+			default :
+				return false;
+		}
+		/*
+		for (int i=0;i<stateVector.length;i++){
+			if (stateVector[i]==state) {
+				return true;
+			}
+		}
+		return false;
+		 */
+	}
+
+	public SCIDefault getSCIDefault() {
+		return sCIDefault;
+	}
+
+	private void raiseI1() {
+		i1 = true;
+	}
+
+	private void raiseI2() {
+		i2 = true;
+	}
+
+	public void raiseE() {
+		sCIDefault.raiseE();
+	}
+
+	public void raiseF() {
+		sCIDefault.raiseF();
+	}
+
+	public void enter() {
+		entryActionInternalEventLifeCycle();
+		nextStateIndex = 0;
+		stateVector[0] = State.R1_A;
+
+		nextStateIndex = 1;
+		stateVector[1] = State.R2_C;
+
+	}
+
+	public void exit() {
+		//Handle exit of all possible states (of r1) at position 0...
+		switch (stateVector[0]) {
+
+			case R1_A :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			case R1_B :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			default :
+				break;
+		}
+
+		//Handle exit of all possible states (of r2) at position 1...
+		switch (stateVector[1]) {
+
+			case R2_C :
+				stateVector[1] = State.$NullState$;
+
+				break;
+
+			case R2_D :
+				stateVector[1] = State.$NullState$;
+
+				break;
+
+			default :
+				break;
+		}
+
+		exitActionInternalEventLifeCycle();
+	}
+
+	private void entryActionInternalEventLifeCycle() {
+
+	}
+
+	private void exitActionInternalEventLifeCycle() {
+
+	}
+
+	private void reactR1_A() {
+		if (i2) {
+			stateVector[0] = State.$NullState$;
+
+			nextStateIndex = 0;
+			stateVector[0] = State.R1_B;
+
+		} else {
+			if (sCIDefault.e) {
+				raiseI1();
+
+			}
+
+		}
+
+	}
+	private void reactR1_B() {
+		if (sCIDefault.e) {
+			stateVector[0] = State.$NullState$;
+
+			nextStateIndex = 0;
+			stateVector[0] = State.R1_A;
+
+		}
+
+	}
+	private void reactR2_C() {
+		if (i1) {
+			stateVector[1] = State.$NullState$;
+
+			nextStateIndex = 1;
+			stateVector[1] = State.R2_D;
+
+		}
+	}
+	private void reactR2_D() {
+		if (sCIDefault.f) {
+			stateVector[1] = State.$NullState$;
+
+			raiseI2();
+
+			nextStateIndex = 1;
+			stateVector[1] = State.R2_C;
+
+		}
+	}
+
+	public void runCycle() {
+
+		clearOutEvents();
+
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+
+			switch (stateVector[nextStateIndex]) {
+				case R1_A :
+					reactR1_A();
+					break;
+				case R1_B :
+					reactR1_B();
+					break;
+				case R2_C :
+					reactR2_C();
+					break;
+				case R2_D :
+					reactR2_D();
+					break;
+				default :
+					// $NullState$
+			}
+		}
+
+		clearEvents();
+	}
+}

+ 110 - 0
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/javakeywords/IJavaKeywordsStatemachine.java

@@ -0,0 +1,110 @@
+package org.yakindu.scr.javakeywords;
+
+import org.yakindu.scr.IStatemachine;
+
+public interface IJavaKeywordsStatemachine extends IStatemachine {
+
+	public interface SCIDefault {
+
+		public void raiseWhile();
+
+		public boolean getVarAbstract();
+		public void setVarAbstract(boolean value);
+		public boolean getVarAssert();
+		public void setVarAssert(boolean value);
+		public boolean getVarBoolean();
+		public void setVarBoolean(boolean value);
+		public boolean getVarBreak();
+		public void setVarBreak(boolean value);
+		public boolean getVarByte();
+		public void setVarByte(boolean value);
+		public boolean getVarCase();
+		public void setVarCase(boolean value);
+		public boolean getVarCatch();
+		public void setVarCatch(boolean value);
+		public boolean getVarChar();
+		public void setVarChar(boolean value);
+		public boolean getVarClass();
+		public void setVarClass(boolean value);
+		public boolean getVarConst();
+		public void setVarConst(boolean value);
+		public boolean getVarContinue();
+		public void setVarContinue(boolean value);
+		public boolean getVarDo();
+		public void setVarDo(boolean value);
+		public boolean getVarDouble();
+		public void setVarDouble(boolean value);
+		public boolean getVarEnum();
+		public void setVarEnum(boolean value);
+		public boolean getVarExtends();
+		public void setVarExtends(boolean value);
+		public boolean getVarFinal();
+		public void setVarFinal(boolean value);
+		public boolean getVarFinally();
+		public void setVarFinally(boolean value);
+		public boolean getVarFloat();
+		public void setVarFloat(boolean value);
+		public boolean getVarFor();
+		public void setVarFor(boolean value);
+		public boolean getVarGoto();
+		public void setVarGoto(boolean value);
+		public boolean getVarIf();
+		public void setVarIf(boolean value);
+		public boolean getVarImplements();
+		public void setVarImplements(boolean value);
+		public boolean getVarImport();
+		public void setVarImport(boolean value);
+		public boolean getVarInstanceof();
+		public void setVarInstanceof(boolean value);
+		public boolean getVarInt();
+		public void setVarInt(boolean value);
+		public boolean getVarLong();
+		public void setVarLong(boolean value);
+		public boolean getVarNative();
+		public void setVarNative(boolean value);
+		public boolean getVarNew();
+		public void setVarNew(boolean value);
+		public boolean getVarNull();
+		public void setVarNull(boolean value);
+		public boolean getVarPackage();
+		public void setVarPackage(boolean value);
+		public boolean getVarPrivate();
+		public void setVarPrivate(boolean value);
+		public boolean getVarProtected();
+		public void setVarProtected(boolean value);
+		public boolean getVarPublic();
+		public void setVarPublic(boolean value);
+		public boolean getVarReturn();
+		public void setVarReturn(boolean value);
+		public boolean getVarShort();
+		public void setVarShort(boolean value);
+		public boolean getVarStatic();
+		public void setVarStatic(boolean value);
+		public boolean getVarStrictfp();
+		public void setVarStrictfp(boolean value);
+		public boolean getVarSuper();
+		public void setVarSuper(boolean value);
+		public boolean getVarSwitch();
+		public void setVarSwitch(boolean value);
+		public boolean getVarSynchronized();
+		public void setVarSynchronized(boolean value);
+		public boolean getVarThis();
+		public void setVarThis(boolean value);
+		public boolean getVarThrow();
+		public void setVarThrow(boolean value);
+		public boolean getVarThrows();
+		public void setVarThrows(boolean value);
+		public boolean getVarTransient();
+		public void setVarTransient(boolean value);
+		public boolean getVarTry();
+		public void setVarTry(boolean value);
+		public boolean getVarVoid();
+		public void setVarVoid(boolean value);
+		public boolean getVarVolatile();
+		public void setVarVolatile(boolean value);
+
+	}
+
+	public SCIDefault getSCIDefault();
+
+}

File diff suppressed because it is too large
+ 1216 - 0
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/javakeywords/JavaKeywordsStatemachine.java


+ 17 - 17
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/priorityvalues/IPriorityValuesStatemachine.java

@@ -1,17 +1,17 @@
-package org.yakindu.scr.priorityvalues;
-
-import org.yakindu.scr.IStatemachine;
-
-public interface IPriorityValuesStatemachine extends IStatemachine {
-
-	public interface SCIDefault {
-
-		public void raiseEvent1();
-
-		public void raiseEvent2();
-
-	}
-
-	public SCIDefault getSCIDefault();
-
-}
+package org.yakindu.scr.priorityvalues;
+
+import org.yakindu.scr.IStatemachine;
+
+public interface IPriorityValuesStatemachine extends IStatemachine {
+
+	public interface SCIDefault {
+
+		public void raiseEvent1();
+
+		public void raiseEvent2();
+
+	}
+
+	public SCIDefault getSCIDefault();
+
+}

+ 269 - 269
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/priorityvalues/PriorityValuesStatemachine.java

@@ -1,269 +1,269 @@
-package org.yakindu.scr.priorityvalues;
-
-public class PriorityValuesStatemachine implements IPriorityValuesStatemachine {
-
-	private final class SCIDefaultImpl implements SCIDefault {
-
-		private boolean event1;
-
-		public void raiseEvent1() {
-			event1 = true;
-		}
-
-		private boolean event2;
-
-		public void raiseEvent2() {
-			event2 = true;
-		}
-
-		public void clearEvents() {
-			event1 = false;
-			event2 = false;
-		}
-
-	}
-
-	private SCIDefaultImpl sCIDefault;
-
-	public enum State {
-		SomeRegion_A, SomeRegion_B, Main_region_A, Main_region_B, Main_region_C, Main_region_D, Main_region_E, $NullState$
-	};
-
-	private final State[] stateVector = new State[2];
-
-	private int nextStateIndex;
-
-	public PriorityValuesStatemachine() {
-
-		sCIDefault = new SCIDefaultImpl();
-
-	}
-
-	public void init() {
-		for (int i = 0; i < 2; i++) {
-			stateVector[i] = State.$NullState$;
-		}
-
-		clearEvents();
-		clearOutEvents();
-	}
-
-	protected void clearEvents() {
-		sCIDefault.clearEvents();
-
-	}
-
-	protected void clearOutEvents() {
-	}
-
-	public boolean isStateActive(State state) {
-		switch (state) {
-
-			case SomeRegion_A :
-				return stateVector[0] == State.SomeRegion_A;
-
-			case SomeRegion_B :
-				return stateVector[0] == State.SomeRegion_B;
-
-			case Main_region_A :
-				return stateVector[1] == State.Main_region_A;
-
-			case Main_region_B :
-				return stateVector[1] == State.Main_region_B;
-
-			case Main_region_C :
-				return stateVector[1] == State.Main_region_C;
-
-			case Main_region_D :
-				return stateVector[1] == State.Main_region_D;
-
-			case Main_region_E :
-				return stateVector[1] == State.Main_region_E;
-
-			default :
-				return false;
-		}
-		/*
-		for (int i=0;i<stateVector.length;i++){
-			if (stateVector[i]==state) {
-				return true;
-			}
-		}
-		return false;
-		 */
-	}
-
-	public SCIDefault getSCIDefault() {
-		return sCIDefault;
-	}
-
-	public void raiseEvent1() {
-		sCIDefault.raiseEvent1();
-	}
-
-	public void raiseEvent2() {
-		sCIDefault.raiseEvent2();
-	}
-
-	public void enter() {
-		entryActionPriorityValues();
-		nextStateIndex = 0;
-		stateVector[0] = State.SomeRegion_A;
-
-		nextStateIndex = 1;
-		stateVector[1] = State.Main_region_A;
-
-	}
-
-	public void exit() {
-		//Handle exit of all possible states (of someRegion) at position 0...
-		switch (stateVector[0]) {
-
-			case SomeRegion_A :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			case SomeRegion_B :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			default :
-				break;
-		}
-
-		//Handle exit of all possible states (of main region) at position 1...
-		switch (stateVector[1]) {
-
-			case Main_region_A :
-				stateVector[1] = State.$NullState$;
-
-				break;
-
-			case Main_region_B :
-				stateVector[1] = State.$NullState$;
-
-				break;
-
-			case Main_region_C :
-				stateVector[1] = State.$NullState$;
-
-				break;
-
-			case Main_region_D :
-				stateVector[1] = State.$NullState$;
-
-				break;
-
-			case Main_region_E :
-				stateVector[1] = State.$NullState$;
-
-				break;
-
-			default :
-				break;
-		}
-
-		exitActionPriorityValues();
-	}
-
-	private void entryActionPriorityValues() {
-
-	}
-
-	private void exitActionPriorityValues() {
-
-	}
-
-	private void reactSomeRegion_A() {
-		if (sCIDefault.event2) {
-			stateVector[0] = State.$NullState$;
-
-			nextStateIndex = 0;
-			stateVector[0] = State.SomeRegion_B;
-
-		}
-
-	}
-	private void reactSomeRegion_B() {
-
-	}
-	private void reactMain_region_A() {
-		if (sCIDefault.event1) {
-			stateVector[1] = State.$NullState$;
-
-			nextStateIndex = 1;
-			stateVector[1] = State.Main_region_C;
-
-		} else {
-			if (sCIDefault.event1) {
-				stateVector[1] = State.$NullState$;
-
-				nextStateIndex = 1;
-				stateVector[1] = State.Main_region_B;
-
-			} else {
-				if (sCIDefault.event1) {
-					stateVector[1] = State.$NullState$;
-
-					nextStateIndex = 1;
-					stateVector[1] = State.Main_region_D;
-
-				} else {
-					if ((sCIDefault.event2 && !isStateActive(State.SomeRegion_B))) {
-						stateVector[1] = State.$NullState$;
-
-						nextStateIndex = 1;
-						stateVector[1] = State.Main_region_E;
-
-					}
-				}
-			}
-		}
-	}
-	private void reactMain_region_B() {
-	}
-	private void reactMain_region_C() {
-	}
-	private void reactMain_region_D() {
-	}
-	private void reactMain_region_E() {
-	}
-
-	public void runCycle() {
-
-		clearOutEvents();
-
-		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
-
-			switch (stateVector[nextStateIndex]) {
-				case SomeRegion_A :
-					reactSomeRegion_A();
-					break;
-				case SomeRegion_B :
-					reactSomeRegion_B();
-					break;
-				case Main_region_A :
-					reactMain_region_A();
-					break;
-				case Main_region_B :
-					reactMain_region_B();
-					break;
-				case Main_region_C :
-					reactMain_region_C();
-					break;
-				case Main_region_D :
-					reactMain_region_D();
-					break;
-				case Main_region_E :
-					reactMain_region_E();
-					break;
-				default :
-					// $NullState$
-			}
-		}
-
-		clearEvents();
-	}
-}
+package org.yakindu.scr.priorityvalues;
+
+public class PriorityValuesStatemachine implements IPriorityValuesStatemachine {
+
+	private final class SCIDefaultImpl implements SCIDefault {
+
+		private boolean event1;
+
+		public void raiseEvent1() {
+			event1 = true;
+		}
+
+		private boolean event2;
+
+		public void raiseEvent2() {
+			event2 = true;
+		}
+
+		public void clearEvents() {
+			event1 = false;
+			event2 = false;
+		}
+
+	}
+
+	private SCIDefaultImpl sCIDefault;
+
+	public enum State {
+		SomeRegion_A, SomeRegion_B, Main_region_A, Main_region_B, Main_region_C, Main_region_D, Main_region_E, $NullState$
+	};
+
+	private final State[] stateVector = new State[2];
+
+	private int nextStateIndex;
+
+	public PriorityValuesStatemachine() {
+
+		sCIDefault = new SCIDefaultImpl();
+
+	}
+
+	public void init() {
+		for (int i = 0; i < 2; i++) {
+			stateVector[i] = State.$NullState$;
+		}
+
+		clearEvents();
+		clearOutEvents();
+	}
+
+	protected void clearEvents() {
+		sCIDefault.clearEvents();
+
+	}
+
+	protected void clearOutEvents() {
+	}
+
+	public boolean isStateActive(State state) {
+		switch (state) {
+
+			case SomeRegion_A :
+				return stateVector[0] == State.SomeRegion_A;
+
+			case SomeRegion_B :
+				return stateVector[0] == State.SomeRegion_B;
+
+			case Main_region_A :
+				return stateVector[1] == State.Main_region_A;
+
+			case Main_region_B :
+				return stateVector[1] == State.Main_region_B;
+
+			case Main_region_C :
+				return stateVector[1] == State.Main_region_C;
+
+			case Main_region_D :
+				return stateVector[1] == State.Main_region_D;
+
+			case Main_region_E :
+				return stateVector[1] == State.Main_region_E;
+
+			default :
+				return false;
+		}
+		/*
+		for (int i=0;i<stateVector.length;i++){
+			if (stateVector[i]==state) {
+				return true;
+			}
+		}
+		return false;
+		 */
+	}
+
+	public SCIDefault getSCIDefault() {
+		return sCIDefault;
+	}
+
+	public void raiseEvent1() {
+		sCIDefault.raiseEvent1();
+	}
+
+	public void raiseEvent2() {
+		sCIDefault.raiseEvent2();
+	}
+
+	public void enter() {
+		entryActionPriorityValues();
+		nextStateIndex = 0;
+		stateVector[0] = State.SomeRegion_A;
+
+		nextStateIndex = 1;
+		stateVector[1] = State.Main_region_A;
+
+	}
+
+	public void exit() {
+		//Handle exit of all possible states (of someRegion) at position 0...
+		switch (stateVector[0]) {
+
+			case SomeRegion_A :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			case SomeRegion_B :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			default :
+				break;
+		}
+
+		//Handle exit of all possible states (of main region) at position 1...
+		switch (stateVector[1]) {
+
+			case Main_region_A :
+				stateVector[1] = State.$NullState$;
+
+				break;
+
+			case Main_region_B :
+				stateVector[1] = State.$NullState$;
+
+				break;
+
+			case Main_region_C :
+				stateVector[1] = State.$NullState$;
+
+				break;
+
+			case Main_region_D :
+				stateVector[1] = State.$NullState$;
+
+				break;
+
+			case Main_region_E :
+				stateVector[1] = State.$NullState$;
+
+				break;
+
+			default :
+				break;
+		}
+
+		exitActionPriorityValues();
+	}
+
+	private void entryActionPriorityValues() {
+
+	}
+
+	private void exitActionPriorityValues() {
+
+	}
+
+	private void reactSomeRegion_A() {
+		if (sCIDefault.event2) {
+			stateVector[0] = State.$NullState$;
+
+			nextStateIndex = 0;
+			stateVector[0] = State.SomeRegion_B;
+
+		}
+
+	}
+	private void reactSomeRegion_B() {
+
+	}
+	private void reactMain_region_A() {
+		if (sCIDefault.event1) {
+			stateVector[1] = State.$NullState$;
+
+			nextStateIndex = 1;
+			stateVector[1] = State.Main_region_C;
+
+		} else {
+			if (sCIDefault.event1) {
+				stateVector[1] = State.$NullState$;
+
+				nextStateIndex = 1;
+				stateVector[1] = State.Main_region_B;
+
+			} else {
+				if (sCIDefault.event1) {
+					stateVector[1] = State.$NullState$;
+
+					nextStateIndex = 1;
+					stateVector[1] = State.Main_region_D;
+
+				} else {
+					if ((sCIDefault.event2 && !isStateActive(State.SomeRegion_B))) {
+						stateVector[1] = State.$NullState$;
+
+						nextStateIndex = 1;
+						stateVector[1] = State.Main_region_E;
+
+					}
+				}
+			}
+		}
+	}
+	private void reactMain_region_B() {
+	}
+	private void reactMain_region_C() {
+	}
+	private void reactMain_region_D() {
+	}
+	private void reactMain_region_E() {
+	}
+
+	public void runCycle() {
+
+		clearOutEvents();
+
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+
+			switch (stateVector[nextStateIndex]) {
+				case SomeRegion_A :
+					reactSomeRegion_A();
+					break;
+				case SomeRegion_B :
+					reactSomeRegion_B();
+					break;
+				case Main_region_A :
+					reactMain_region_A();
+					break;
+				case Main_region_B :
+					reactMain_region_B();
+					break;
+				case Main_region_C :
+					reactMain_region_C();
+					break;
+				case Main_region_D :
+					reactMain_region_D();
+					break;
+				case Main_region_E :
+					reactMain_region_E();
+					break;
+				default :
+					// $NullState$
+			}
+		}
+
+		clearEvents();
+	}
+}

+ 16 - 16
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/raiseevent/IRaiseEventStatemachine.java

@@ -1,16 +1,16 @@
-package org.yakindu.scr.raiseevent;
-
-import org.yakindu.scr.IStatemachine;
-
-public interface IRaiseEventStatemachine extends IStatemachine {
-
-	public interface SCIDefault {
-		public boolean isRaisedE1();
-
-		public void raiseE2();
-
-	}
-
-	public SCIDefault getSCIDefault();
-
-}
+package org.yakindu.scr.raiseevent;
+
+import org.yakindu.scr.IStatemachine;
+
+public interface IRaiseEventStatemachine extends IStatemachine {
+
+	public interface SCIDefault {
+		public boolean isRaisedE1();
+
+		public void raiseE2();
+
+	}
+
+	public SCIDefault getSCIDefault();
+
+}

+ 216 - 216
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/raiseevent/RaiseEventStatemachine.java

@@ -1,216 +1,216 @@
-package org.yakindu.scr.raiseevent;
-
-public class RaiseEventStatemachine implements IRaiseEventStatemachine {
-
-	private final class SCIDefaultImpl implements SCIDefault {
-
-		private boolean e1;
-
-		public boolean isRaisedE1() {
-			return e1;
-		}
-
-		private void raiseE1() {
-			e1 = true;
-		}
-
-		private boolean e2;
-
-		public void raiseE2() {
-			e2 = true;
-		}
-
-		public void clearEvents() {
-			e2 = false;
-		}
-
-		public void clearOutEvents() {
-			e1 = false;
-		}
-
-	}
-
-	private SCIDefaultImpl sCIDefault;
-
-	public enum State {
-		Main_region_StateA, Main_region_StateB, Second_region_SateA, Second_region_StateB, $NullState$
-	};
-
-	private final State[] stateVector = new State[2];
-
-	private int nextStateIndex;
-
-	public RaiseEventStatemachine() {
-
-		sCIDefault = new SCIDefaultImpl();
-
-	}
-
-	public void init() {
-		for (int i = 0; i < 2; i++) {
-			stateVector[i] = State.$NullState$;
-		}
-
-		clearEvents();
-		clearOutEvents();
-	}
-
-	protected void clearEvents() {
-		sCIDefault.clearEvents();
-
-	}
-
-	protected void clearOutEvents() {
-		sCIDefault.clearOutEvents();
-	}
-
-	public boolean isStateActive(State state) {
-		switch (state) {
-
-			case Main_region_StateA :
-				return stateVector[0] == State.Main_region_StateA;
-
-			case Main_region_StateB :
-				return stateVector[0] == State.Main_region_StateB;
-
-			case Second_region_SateA :
-				return stateVector[1] == State.Second_region_SateA;
-
-			case Second_region_StateB :
-				return stateVector[1] == State.Second_region_StateB;
-
-			default :
-				return false;
-		}
-		/*
-		for (int i=0;i<stateVector.length;i++){
-			if (stateVector[i]==state) {
-				return true;
-			}
-		}
-		return false;
-		 */
-	}
-
-	public SCIDefault getSCIDefault() {
-		return sCIDefault;
-	}
-
-	public boolean isRaisedE1() {
-		return sCIDefault.isRaisedE1();
-	}
-
-	public void raiseE2() {
-		sCIDefault.raiseE2();
-	}
-
-	public void enter() {
-		entryActionRaiseEvent();
-		nextStateIndex = 0;
-		stateVector[0] = State.Main_region_StateA;
-
-		nextStateIndex = 1;
-		stateVector[1] = State.Second_region_SateA;
-
-	}
-
-	public void exit() {
-		//Handle exit of all possible states (of main region) at position 0...
-		switch (stateVector[0]) {
-
-			case Main_region_StateA :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			case Main_region_StateB :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			default :
-				break;
-		}
-
-		//Handle exit of all possible states (of second region) at position 1...
-		switch (stateVector[1]) {
-
-			case Second_region_SateA :
-				stateVector[1] = State.$NullState$;
-
-				break;
-
-			case Second_region_StateB :
-				stateVector[1] = State.$NullState$;
-
-				break;
-
-			default :
-				break;
-		}
-
-		exitActionRaiseEvent();
-	}
-
-	private void entryActionRaiseEvent() {
-
-	}
-
-	private void exitActionRaiseEvent() {
-
-	}
-
-	private void reactMain_region_StateA() {
-		if (sCIDefault.e2) {
-			stateVector[0] = State.$NullState$;
-
-			sCIDefault.raiseE1();
-
-			nextStateIndex = 0;
-			stateVector[0] = State.Main_region_StateB;
-
-		}
-
-	}
-	private void reactMain_region_StateB() {
-
-	}
-	private void reactSecond_region_SateA() {
-		if (sCIDefault.e1) {
-			stateVector[1] = State.$NullState$;
-
-			nextStateIndex = 1;
-			stateVector[1] = State.Second_region_StateB;
-
-		}
-	}
-	private void reactSecond_region_StateB() {
-	}
-
-	public void runCycle() {
-
-		clearOutEvents();
-
-		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
-
-			switch (stateVector[nextStateIndex]) {
-				case Main_region_StateA :
-					reactMain_region_StateA();
-					break;
-				case Main_region_StateB :
-					reactMain_region_StateB();
-					break;
-				case Second_region_SateA :
-					reactSecond_region_SateA();
-					break;
-				case Second_region_StateB :
-					reactSecond_region_StateB();
-					break;
-				default :
-					// $NullState$
-			}
-		}
-
-		clearEvents();
-	}
-}
+package org.yakindu.scr.raiseevent;
+
+public class RaiseEventStatemachine implements IRaiseEventStatemachine {
+
+	private final class SCIDefaultImpl implements SCIDefault {
+
+		private boolean e1;
+
+		public boolean isRaisedE1() {
+			return e1;
+		}
+
+		private void raiseE1() {
+			e1 = true;
+		}
+
+		private boolean e2;
+
+		public void raiseE2() {
+			e2 = true;
+		}
+
+		public void clearEvents() {
+			e2 = false;
+		}
+
+		public void clearOutEvents() {
+			e1 = false;
+		}
+
+	}
+
+	private SCIDefaultImpl sCIDefault;
+
+	public enum State {
+		Main_region_StateA, Main_region_StateB, Second_region_SateA, Second_region_StateB, $NullState$
+	};
+
+	private final State[] stateVector = new State[2];
+
+	private int nextStateIndex;
+
+	public RaiseEventStatemachine() {
+
+		sCIDefault = new SCIDefaultImpl();
+
+	}
+
+	public void init() {
+		for (int i = 0; i < 2; i++) {
+			stateVector[i] = State.$NullState$;
+		}
+
+		clearEvents();
+		clearOutEvents();
+	}
+
+	protected void clearEvents() {
+		sCIDefault.clearEvents();
+
+	}
+
+	protected void clearOutEvents() {
+		sCIDefault.clearOutEvents();
+	}
+
+	public boolean isStateActive(State state) {
+		switch (state) {
+
+			case Main_region_StateA :
+				return stateVector[0] == State.Main_region_StateA;
+
+			case Main_region_StateB :
+				return stateVector[0] == State.Main_region_StateB;
+
+			case Second_region_SateA :
+				return stateVector[1] == State.Second_region_SateA;
+
+			case Second_region_StateB :
+				return stateVector[1] == State.Second_region_StateB;
+
+			default :
+				return false;
+		}
+		/*
+		for (int i=0;i<stateVector.length;i++){
+			if (stateVector[i]==state) {
+				return true;
+			}
+		}
+		return false;
+		 */
+	}
+
+	public SCIDefault getSCIDefault() {
+		return sCIDefault;
+	}
+
+	public boolean isRaisedE1() {
+		return sCIDefault.isRaisedE1();
+	}
+
+	public void raiseE2() {
+		sCIDefault.raiseE2();
+	}
+
+	public void enter() {
+		entryActionRaiseEvent();
+		nextStateIndex = 0;
+		stateVector[0] = State.Main_region_StateA;
+
+		nextStateIndex = 1;
+		stateVector[1] = State.Second_region_SateA;
+
+	}
+
+	public void exit() {
+		//Handle exit of all possible states (of main region) at position 0...
+		switch (stateVector[0]) {
+
+			case Main_region_StateA :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			case Main_region_StateB :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			default :
+				break;
+		}
+
+		//Handle exit of all possible states (of second region) at position 1...
+		switch (stateVector[1]) {
+
+			case Second_region_SateA :
+				stateVector[1] = State.$NullState$;
+
+				break;
+
+			case Second_region_StateB :
+				stateVector[1] = State.$NullState$;
+
+				break;
+
+			default :
+				break;
+		}
+
+		exitActionRaiseEvent();
+	}
+
+	private void entryActionRaiseEvent() {
+
+	}
+
+	private void exitActionRaiseEvent() {
+
+	}
+
+	private void reactMain_region_StateA() {
+		if (sCIDefault.e2) {
+			stateVector[0] = State.$NullState$;
+
+			sCIDefault.raiseE1();
+
+			nextStateIndex = 0;
+			stateVector[0] = State.Main_region_StateB;
+
+		}
+
+	}
+	private void reactMain_region_StateB() {
+
+	}
+	private void reactSecond_region_SateA() {
+		if (sCIDefault.e1) {
+			stateVector[1] = State.$NullState$;
+
+			nextStateIndex = 1;
+			stateVector[1] = State.Second_region_StateB;
+
+		}
+	}
+	private void reactSecond_region_StateB() {
+	}
+
+	public void runCycle() {
+
+		clearOutEvents();
+
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+
+			switch (stateVector[nextStateIndex]) {
+				case Main_region_StateA :
+					reactMain_region_StateA();
+					break;
+				case Main_region_StateB :
+					reactMain_region_StateB();
+					break;
+				case Second_region_SateA :
+					reactSecond_region_SateA();
+					break;
+				case Second_region_StateB :
+					reactSecond_region_StateB();
+					break;
+				default :
+					// $NullState$
+			}
+		}
+
+		clearEvents();
+	}
+}

+ 56 - 56
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/realexpressions/IRealExpressionsStatemachine.java

@@ -1,56 +1,56 @@
-package org.yakindu.scr.realexpressions;
-
-import org.yakindu.scr.IStatemachine;
-
-public interface IRealExpressionsStatemachine extends IStatemachine {
-
-	public interface SCIDefault {
-
-		public void raiseE1();
-
-		public double getMyReal1();
-		public void setMyReal1(double value);
-		public double getMyReal2();
-		public void setMyReal2(double value);
-		public boolean getLess();
-		public void setLess(boolean value);
-		public boolean getGreater();
-		public void setGreater(boolean value);
-		public boolean getEqualOrLess();
-		public void setEqualOrLess(boolean value);
-		public boolean getEqualOrGreater();
-		public void setEqualOrGreater(boolean value);
-		public boolean getEqual();
-		public void setEqual(boolean value);
-		public boolean getNotEqual();
-		public void setNotEqual(boolean value);
-		public boolean getPlus();
-		public void setPlus(boolean value);
-		public boolean getMinus();
-		public void setMinus(boolean value);
-		public boolean getMultiply();
-		public void setMultiply(boolean value);
-		public boolean getDivision();
-		public void setDivision(boolean value);
-		public boolean getModulo();
-		public void setModulo(boolean value);
-		public double getNegat();
-		public void setNegat(double value);
-		public boolean getComplement();
-		public void setComplement(boolean value);
-		public double getMultiAssign();
-		public void setMultiAssign(double value);
-		public double getDivAssign();
-		public void setDivAssign(double value);
-		public double getPlusAssign();
-		public void setPlusAssign(double value);
-		public double getMinusAssign();
-		public void setMinusAssign(double value);
-		public boolean getModuloAssign();
-		public void setModuloAssign(boolean value);
-
-	}
-
-	public SCIDefault getSCIDefault();
-
-}
+package org.yakindu.scr.realexpressions;
+
+import org.yakindu.scr.IStatemachine;
+
+public interface IRealExpressionsStatemachine extends IStatemachine {
+
+	public interface SCIDefault {
+
+		public void raiseE1();
+
+		public double getMyReal1();
+		public void setMyReal1(double value);
+		public double getMyReal2();
+		public void setMyReal2(double value);
+		public boolean getLess();
+		public void setLess(boolean value);
+		public boolean getGreater();
+		public void setGreater(boolean value);
+		public boolean getEqualOrLess();
+		public void setEqualOrLess(boolean value);
+		public boolean getEqualOrGreater();
+		public void setEqualOrGreater(boolean value);
+		public boolean getEqual();
+		public void setEqual(boolean value);
+		public boolean getNotEqual();
+		public void setNotEqual(boolean value);
+		public boolean getPlus();
+		public void setPlus(boolean value);
+		public boolean getMinus();
+		public void setMinus(boolean value);
+		public boolean getMultiply();
+		public void setMultiply(boolean value);
+		public boolean getDivision();
+		public void setDivision(boolean value);
+		public boolean getModulo();
+		public void setModulo(boolean value);
+		public double getNegat();
+		public void setNegat(double value);
+		public boolean getComplement();
+		public void setComplement(boolean value);
+		public double getMultiAssign();
+		public void setMultiAssign(double value);
+		public double getDivAssign();
+		public void setDivAssign(double value);
+		public double getPlusAssign();
+		public void setPlusAssign(double value);
+		public double getMinusAssign();
+		public void setMinusAssign(double value);
+		public boolean getModuloAssign();
+		public void setModuloAssign(boolean value);
+
+	}
+
+	public SCIDefault getSCIDefault();
+
+}

File diff suppressed because it is too large
+ 541 - 541
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/realexpressions/RealExpressionsStatemachine.java


+ 15 - 15
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/samenamedifferentregion/ISameNameDifferentRegionStatemachine.java

@@ -1,15 +1,15 @@
-package org.yakindu.scr.samenamedifferentregion;
-
-import org.yakindu.scr.IStatemachine;
-
-public interface ISameNameDifferentRegionStatemachine extends IStatemachine {
-
-	public interface SCIDefault {
-
-		public void raiseE1();
-
-	}
-
-	public SCIDefault getSCIDefault();
-
-}
+package org.yakindu.scr.samenamedifferentregion;
+
+import org.yakindu.scr.IStatemachine;
+
+public interface ISameNameDifferentRegionStatemachine extends IStatemachine {
+
+	public interface SCIDefault {
+
+		public void raiseE1();
+
+	}
+
+	public SCIDefault getSCIDefault();
+
+}

+ 186 - 186
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/samenamedifferentregion/SameNameDifferentRegionStatemachine.java

@@ -1,186 +1,186 @@
-package org.yakindu.scr.samenamedifferentregion;
-
-public class SameNameDifferentRegionStatemachine
-		implements
-			ISameNameDifferentRegionStatemachine {
-
-	private final class SCIDefaultImpl implements SCIDefault {
-
-		private boolean e1;
-
-		public void raiseE1() {
-			e1 = true;
-		}
-
-		public void clearEvents() {
-			e1 = false;
-		}
-
-	}
-
-	private SCIDefaultImpl sCIDefault;
-
-	public enum State {
-		Main_region_StateA, Main_region_StateB, Main_region_StateB_r1_StateA, Main_region_StateB_r1_StateB, $NullState$
-	};
-
-	private final State[] stateVector = new State[1];
-
-	private int nextStateIndex;
-
-	public SameNameDifferentRegionStatemachine() {
-
-		sCIDefault = new SCIDefaultImpl();
-
-	}
-
-	public void init() {
-		for (int i = 0; i < 1; i++) {
-			stateVector[i] = State.$NullState$;
-		}
-
-		clearEvents();
-		clearOutEvents();
-	}
-
-	protected void clearEvents() {
-		sCIDefault.clearEvents();
-
-	}
-
-	protected void clearOutEvents() {
-	}
-
-	public boolean isStateActive(State state) {
-		switch (state) {
-
-			case Main_region_StateA :
-				return stateVector[0] == State.Main_region_StateA;
-
-			case Main_region_StateB :
-				return stateVector[0].ordinal() >= State.Main_region_StateB
-						.ordinal()
-						&& stateVector[0].ordinal() <= State.Main_region_StateB_r1_StateB
-								.ordinal();
-
-			case Main_region_StateB_r1_StateA :
-				return stateVector[0] == State.Main_region_StateB_r1_StateA;
-
-			case Main_region_StateB_r1_StateB :
-				return stateVector[0] == State.Main_region_StateB_r1_StateB;
-
-			default :
-				return false;
-		}
-		/*
-		for (int i=0;i<stateVector.length;i++){
-			if (stateVector[i]==state) {
-				return true;
-			}
-		}
-		return false;
-		 */
-	}
-
-	public SCIDefault getSCIDefault() {
-		return sCIDefault;
-	}
-
-	public void raiseE1() {
-		sCIDefault.raiseE1();
-	}
-
-	public void enter() {
-		entryActionSameNameDifferentRegion();
-		nextStateIndex = 0;
-		stateVector[0] = State.Main_region_StateA;
-
-	}
-
-	public void exit() {
-		//Handle exit of all possible states (of main region) at position 0...
-		switch (stateVector[0]) {
-
-			case Main_region_StateA :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			case Main_region_StateB_r1_StateA :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			case Main_region_StateB_r1_StateB :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			default :
-				break;
-		}
-
-		exitActionSameNameDifferentRegion();
-	}
-
-	private void entryActionSameNameDifferentRegion() {
-
-	}
-
-	private void exitActionSameNameDifferentRegion() {
-
-	}
-
-	private void reactMain_region_StateA() {
-		if (sCIDefault.e1) {
-			stateVector[0] = State.$NullState$;
-
-			nextStateIndex = 0;
-			stateVector[0] = State.Main_region_StateB_r1_StateA;
-
-		}
-
-	}
-	private void reactMain_region_StateB() {
-	}
-	private void reactMain_region_StateB_r1_StateA() {
-		if (sCIDefault.e1) {
-			stateVector[0] = State.$NullState$;
-
-			nextStateIndex = 0;
-			stateVector[0] = State.Main_region_StateB_r1_StateB;
-
-		}
-
-	}
-	private void reactMain_region_StateB_r1_StateB() {
-
-	}
-
-	public void runCycle() {
-
-		clearOutEvents();
-
-		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
-
-			switch (stateVector[nextStateIndex]) {
-				case Main_region_StateA :
-					reactMain_region_StateA();
-					break;
-				case Main_region_StateB :
-					reactMain_region_StateB();
-					break;
-				case Main_region_StateB_r1_StateA :
-					reactMain_region_StateB_r1_StateA();
-					break;
-				case Main_region_StateB_r1_StateB :
-					reactMain_region_StateB_r1_StateB();
-					break;
-				default :
-					// $NullState$
-			}
-		}
-
-		clearEvents();
-	}
-}
+package org.yakindu.scr.samenamedifferentregion;
+
+public class SameNameDifferentRegionStatemachine
+		implements
+			ISameNameDifferentRegionStatemachine {
+
+	private final class SCIDefaultImpl implements SCIDefault {
+
+		private boolean e1;
+
+		public void raiseE1() {
+			e1 = true;
+		}
+
+		public void clearEvents() {
+			e1 = false;
+		}
+
+	}
+
+	private SCIDefaultImpl sCIDefault;
+
+	public enum State {
+		Main_region_StateA, Main_region_StateB, Main_region_StateB_r1_StateA, Main_region_StateB_r1_StateB, $NullState$
+	};
+
+	private final State[] stateVector = new State[1];
+
+	private int nextStateIndex;
+
+	public SameNameDifferentRegionStatemachine() {
+
+		sCIDefault = new SCIDefaultImpl();
+
+	}
+
+	public void init() {
+		for (int i = 0; i < 1; i++) {
+			stateVector[i] = State.$NullState$;
+		}
+
+		clearEvents();
+		clearOutEvents();
+	}
+
+	protected void clearEvents() {
+		sCIDefault.clearEvents();
+
+	}
+
+	protected void clearOutEvents() {
+	}
+
+	public boolean isStateActive(State state) {
+		switch (state) {
+
+			case Main_region_StateA :
+				return stateVector[0] == State.Main_region_StateA;
+
+			case Main_region_StateB :
+				return stateVector[0].ordinal() >= State.Main_region_StateB
+						.ordinal()
+						&& stateVector[0].ordinal() <= State.Main_region_StateB_r1_StateB
+								.ordinal();
+
+			case Main_region_StateB_r1_StateA :
+				return stateVector[0] == State.Main_region_StateB_r1_StateA;
+
+			case Main_region_StateB_r1_StateB :
+				return stateVector[0] == State.Main_region_StateB_r1_StateB;
+
+			default :
+				return false;
+		}
+		/*
+		for (int i=0;i<stateVector.length;i++){
+			if (stateVector[i]==state) {
+				return true;
+			}
+		}
+		return false;
+		 */
+	}
+
+	public SCIDefault getSCIDefault() {
+		return sCIDefault;
+	}
+
+	public void raiseE1() {
+		sCIDefault.raiseE1();
+	}
+
+	public void enter() {
+		entryActionSameNameDifferentRegion();
+		nextStateIndex = 0;
+		stateVector[0] = State.Main_region_StateA;
+
+	}
+
+	public void exit() {
+		//Handle exit of all possible states (of main region) at position 0...
+		switch (stateVector[0]) {
+
+			case Main_region_StateA :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			case Main_region_StateB_r1_StateA :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			case Main_region_StateB_r1_StateB :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			default :
+				break;
+		}
+
+		exitActionSameNameDifferentRegion();
+	}
+
+	private void entryActionSameNameDifferentRegion() {
+
+	}
+
+	private void exitActionSameNameDifferentRegion() {
+
+	}
+
+	private void reactMain_region_StateA() {
+		if (sCIDefault.e1) {
+			stateVector[0] = State.$NullState$;
+
+			nextStateIndex = 0;
+			stateVector[0] = State.Main_region_StateB_r1_StateA;
+
+		}
+
+	}
+	private void reactMain_region_StateB() {
+	}
+	private void reactMain_region_StateB_r1_StateA() {
+		if (sCIDefault.e1) {
+			stateVector[0] = State.$NullState$;
+
+			nextStateIndex = 0;
+			stateVector[0] = State.Main_region_StateB_r1_StateB;
+
+		}
+
+	}
+	private void reactMain_region_StateB_r1_StateB() {
+
+	}
+
+	public void runCycle() {
+
+		clearOutEvents();
+
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+
+			switch (stateVector[nextStateIndex]) {
+				case Main_region_StateA :
+					reactMain_region_StateA();
+					break;
+				case Main_region_StateB :
+					reactMain_region_StateB();
+					break;
+				case Main_region_StateB_r1_StateA :
+					reactMain_region_StateB_r1_StateA();
+					break;
+				case Main_region_StateB_r1_StateB :
+					reactMain_region_StateB_r1_StateB();
+					break;
+				default :
+					// $NullState$
+			}
+		}
+
+		clearEvents();
+	}
+}

+ 29 - 29
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/shallowhistory/IShallowHistoryStatemachine.java

@@ -1,29 +1,29 @@
-package org.yakindu.scr.shallowhistory;
-
-import org.yakindu.scr.IStatemachine;
-
-public interface IShallowHistoryStatemachine extends IStatemachine {
-
-	public interface SCIDefault {
-
-		public void raiseEvent1();
-
-		public void raiseEvent2();
-
-		public void raiseEvent3();
-
-		public void raiseEvent4();
-
-		public void raiseEvent5();
-
-		public void raiseEvent6();
-
-		public void raiseEvent7();
-
-		public void raiseEvent8();
-
-	}
-
-	public SCIDefault getSCIDefault();
-
-}
+package org.yakindu.scr.shallowhistory;
+
+import org.yakindu.scr.IStatemachine;
+
+public interface IShallowHistoryStatemachine extends IStatemachine {
+
+	public interface SCIDefault {
+
+		public void raiseEvent1();
+
+		public void raiseEvent2();
+
+		public void raiseEvent3();
+
+		public void raiseEvent4();
+
+		public void raiseEvent5();
+
+		public void raiseEvent6();
+
+		public void raiseEvent7();
+
+		public void raiseEvent8();
+
+	}
+
+	public SCIDefault getSCIDefault();
+
+}

File diff suppressed because it is too large
+ 812 - 812
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/shallowhistory/ShallowHistoryStatemachine.java


+ 15 - 15
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/simpleevent/ISimpleEventStatemachine.java

@@ -1,15 +1,15 @@
-package org.yakindu.scr.simpleevent;
-
-import org.yakindu.scr.IStatemachine;
-
-public interface ISimpleEventStatemachine extends IStatemachine {
-
-	public interface SCIDefault {
-
-		public void raiseEvent1();
-
-	}
-
-	public SCIDefault getSCIDefault();
-
-}
+package org.yakindu.scr.simpleevent;
+
+import org.yakindu.scr.IStatemachine;
+
+public interface ISimpleEventStatemachine extends IStatemachine {
+
+	public interface SCIDefault {
+
+		public void raiseEvent1();
+
+	}
+
+	public SCIDefault getSCIDefault();
+
+}

+ 152 - 152
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/simpleevent/SimpleEventStatemachine.java

@@ -1,152 +1,152 @@
-package org.yakindu.scr.simpleevent;
-
-public class SimpleEventStatemachine implements ISimpleEventStatemachine {
-
-	private final class SCIDefaultImpl implements SCIDefault {
-
-		private boolean event1;
-
-		public void raiseEvent1() {
-			event1 = true;
-		}
-
-		public void clearEvents() {
-			event1 = false;
-		}
-
-	}
-
-	private SCIDefaultImpl sCIDefault;
-
-	public enum State {
-		Main_region_A, Main_region_B, $NullState$
-	};
-
-	private final State[] stateVector = new State[1];
-
-	private int nextStateIndex;
-
-	public SimpleEventStatemachine() {
-
-		sCIDefault = new SCIDefaultImpl();
-
-	}
-
-	public void init() {
-		for (int i = 0; i < 1; i++) {
-			stateVector[i] = State.$NullState$;
-		}
-
-		clearEvents();
-		clearOutEvents();
-	}
-
-	protected void clearEvents() {
-		sCIDefault.clearEvents();
-
-	}
-
-	protected void clearOutEvents() {
-	}
-
-	public boolean isStateActive(State state) {
-		switch (state) {
-
-			case Main_region_A :
-				return stateVector[0] == State.Main_region_A;
-
-			case Main_region_B :
-				return stateVector[0] == State.Main_region_B;
-
-			default :
-				return false;
-		}
-		/*
-		for (int i=0;i<stateVector.length;i++){
-			if (stateVector[i]==state) {
-				return true;
-			}
-		}
-		return false;
-		 */
-	}
-
-	public SCIDefault getSCIDefault() {
-		return sCIDefault;
-	}
-
-	public void raiseEvent1() {
-		sCIDefault.raiseEvent1();
-	}
-
-	public void enter() {
-		entryActionSimpleEvent();
-		nextStateIndex = 0;
-		stateVector[0] = State.Main_region_A;
-
-	}
-
-	public void exit() {
-		//Handle exit of all possible states (of main region) at position 0...
-		switch (stateVector[0]) {
-
-			case Main_region_A :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			case Main_region_B :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			default :
-				break;
-		}
-
-		exitActionSimpleEvent();
-	}
-
-	private void entryActionSimpleEvent() {
-
-	}
-
-	private void exitActionSimpleEvent() {
-
-	}
-
-	private void reactMain_region_A() {
-		if (sCIDefault.event1) {
-			stateVector[0] = State.$NullState$;
-
-			nextStateIndex = 0;
-			stateVector[0] = State.Main_region_B;
-
-		}
-
-	}
-	private void reactMain_region_B() {
-
-	}
-
-	public void runCycle() {
-
-		clearOutEvents();
-
-		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
-
-			switch (stateVector[nextStateIndex]) {
-				case Main_region_A :
-					reactMain_region_A();
-					break;
-				case Main_region_B :
-					reactMain_region_B();
-					break;
-				default :
-					// $NullState$
-			}
-		}
-
-		clearEvents();
-	}
-}
+package org.yakindu.scr.simpleevent;
+
+public class SimpleEventStatemachine implements ISimpleEventStatemachine {
+
+	private final class SCIDefaultImpl implements SCIDefault {
+
+		private boolean event1;
+
+		public void raiseEvent1() {
+			event1 = true;
+		}
+
+		public void clearEvents() {
+			event1 = false;
+		}
+
+	}
+
+	private SCIDefaultImpl sCIDefault;
+
+	public enum State {
+		Main_region_A, Main_region_B, $NullState$
+	};
+
+	private final State[] stateVector = new State[1];
+
+	private int nextStateIndex;
+
+	public SimpleEventStatemachine() {
+
+		sCIDefault = new SCIDefaultImpl();
+
+	}
+
+	public void init() {
+		for (int i = 0; i < 1; i++) {
+			stateVector[i] = State.$NullState$;
+		}
+
+		clearEvents();
+		clearOutEvents();
+	}
+
+	protected void clearEvents() {
+		sCIDefault.clearEvents();
+
+	}
+
+	protected void clearOutEvents() {
+	}
+
+	public boolean isStateActive(State state) {
+		switch (state) {
+
+			case Main_region_A :
+				return stateVector[0] == State.Main_region_A;
+
+			case Main_region_B :
+				return stateVector[0] == State.Main_region_B;
+
+			default :
+				return false;
+		}
+		/*
+		for (int i=0;i<stateVector.length;i++){
+			if (stateVector[i]==state) {
+				return true;
+			}
+		}
+		return false;
+		 */
+	}
+
+	public SCIDefault getSCIDefault() {
+		return sCIDefault;
+	}
+
+	public void raiseEvent1() {
+		sCIDefault.raiseEvent1();
+	}
+
+	public void enter() {
+		entryActionSimpleEvent();
+		nextStateIndex = 0;
+		stateVector[0] = State.Main_region_A;
+
+	}
+
+	public void exit() {
+		//Handle exit of all possible states (of main region) at position 0...
+		switch (stateVector[0]) {
+
+			case Main_region_A :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			case Main_region_B :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			default :
+				break;
+		}
+
+		exitActionSimpleEvent();
+	}
+
+	private void entryActionSimpleEvent() {
+
+	}
+
+	private void exitActionSimpleEvent() {
+
+	}
+
+	private void reactMain_region_A() {
+		if (sCIDefault.event1) {
+			stateVector[0] = State.$NullState$;
+
+			nextStateIndex = 0;
+			stateVector[0] = State.Main_region_B;
+
+		}
+
+	}
+	private void reactMain_region_B() {
+
+	}
+
+	public void runCycle() {
+
+		clearOutEvents();
+
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+
+			switch (stateVector[nextStateIndex]) {
+				case Main_region_A :
+					reactMain_region_A();
+					break;
+				case Main_region_B :
+					reactMain_region_B();
+					break;
+				default :
+					// $NullState$
+			}
+		}
+
+		clearEvents();
+	}
+}

+ 15 - 15
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/simplehierachy/ISimpleHierachyStatemachine.java

@@ -1,15 +1,15 @@
-package org.yakindu.scr.simplehierachy;
-
-import org.yakindu.scr.IStatemachine;
-
-public interface ISimpleHierachyStatemachine extends IStatemachine {
-
-	public interface SCIDefault {
-
-		public void raiseEvent1();
-
-	}
-
-	public SCIDefault getSCIDefault();
-
-}
+package org.yakindu.scr.simplehierachy;
+
+import org.yakindu.scr.IStatemachine;
+
+public interface ISimpleHierachyStatemachine extends IStatemachine {
+
+	public interface SCIDefault {
+
+		public void raiseEvent1();
+
+	}
+
+	public SCIDefault getSCIDefault();
+
+}

+ 163 - 163
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/simplehierachy/SimpleHierachyStatemachine.java

@@ -1,163 +1,163 @@
-package org.yakindu.scr.simplehierachy;
-
-public class SimpleHierachyStatemachine implements ISimpleHierachyStatemachine {
-
-	private final class SCIDefaultImpl implements SCIDefault {
-
-		private boolean event1;
-
-		public void raiseEvent1() {
-			event1 = true;
-		}
-
-		public void clearEvents() {
-			event1 = false;
-		}
-
-	}
-
-	private SCIDefaultImpl sCIDefault;
-
-	public enum State {
-		Main_region_A, Main_region_B, Main_region_B_subregion1_B1, $NullState$
-	};
-
-	private final State[] stateVector = new State[1];
-
-	private int nextStateIndex;
-
-	public SimpleHierachyStatemachine() {
-
-		sCIDefault = new SCIDefaultImpl();
-
-	}
-
-	public void init() {
-		for (int i = 0; i < 1; i++) {
-			stateVector[i] = State.$NullState$;
-		}
-
-		clearEvents();
-		clearOutEvents();
-	}
-
-	protected void clearEvents() {
-		sCIDefault.clearEvents();
-
-	}
-
-	protected void clearOutEvents() {
-	}
-
-	public boolean isStateActive(State state) {
-		switch (state) {
-
-			case Main_region_A :
-				return stateVector[0] == State.Main_region_A;
-
-			case Main_region_B :
-				return stateVector[0].ordinal() >= State.Main_region_B
-						.ordinal()
-						&& stateVector[0].ordinal() <= State.Main_region_B_subregion1_B1
-								.ordinal();
-
-			case Main_region_B_subregion1_B1 :
-				return stateVector[0] == State.Main_region_B_subregion1_B1;
-
-			default :
-				return false;
-		}
-		/*
-		for (int i=0;i<stateVector.length;i++){
-			if (stateVector[i]==state) {
-				return true;
-			}
-		}
-		return false;
-		 */
-	}
-
-	public SCIDefault getSCIDefault() {
-		return sCIDefault;
-	}
-
-	public void raiseEvent1() {
-		sCIDefault.raiseEvent1();
-	}
-
-	public void enter() {
-		entryActionSimpleHierachy();
-		nextStateIndex = 0;
-		stateVector[0] = State.Main_region_A;
-
-	}
-
-	public void exit() {
-		//Handle exit of all possible states (of main region) at position 0...
-		switch (stateVector[0]) {
-
-			case Main_region_A :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			case Main_region_B_subregion1_B1 :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			default :
-				break;
-		}
-
-		exitActionSimpleHierachy();
-	}
-
-	private void entryActionSimpleHierachy() {
-
-	}
-
-	private void exitActionSimpleHierachy() {
-
-	}
-
-	private void reactMain_region_A() {
-		if (sCIDefault.event1) {
-			stateVector[0] = State.$NullState$;
-
-			nextStateIndex = 0;
-			stateVector[0] = State.Main_region_B_subregion1_B1;
-
-		}
-
-	}
-	private void reactMain_region_B() {
-	}
-	private void reactMain_region_B_subregion1_B1() {
-
-	}
-
-	public void runCycle() {
-
-		clearOutEvents();
-
-		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
-
-			switch (stateVector[nextStateIndex]) {
-				case Main_region_A :
-					reactMain_region_A();
-					break;
-				case Main_region_B :
-					reactMain_region_B();
-					break;
-				case Main_region_B_subregion1_B1 :
-					reactMain_region_B_subregion1_B1();
-					break;
-				default :
-					// $NullState$
-			}
-		}
-
-		clearEvents();
-	}
-}
+package org.yakindu.scr.simplehierachy;
+
+public class SimpleHierachyStatemachine implements ISimpleHierachyStatemachine {
+
+	private final class SCIDefaultImpl implements SCIDefault {
+
+		private boolean event1;
+
+		public void raiseEvent1() {
+			event1 = true;
+		}
+
+		public void clearEvents() {
+			event1 = false;
+		}
+
+	}
+
+	private SCIDefaultImpl sCIDefault;
+
+	public enum State {
+		Main_region_A, Main_region_B, Main_region_B_subregion1_B1, $NullState$
+	};
+
+	private final State[] stateVector = new State[1];
+
+	private int nextStateIndex;
+
+	public SimpleHierachyStatemachine() {
+
+		sCIDefault = new SCIDefaultImpl();
+
+	}
+
+	public void init() {
+		for (int i = 0; i < 1; i++) {
+			stateVector[i] = State.$NullState$;
+		}
+
+		clearEvents();
+		clearOutEvents();
+	}
+
+	protected void clearEvents() {
+		sCIDefault.clearEvents();
+
+	}
+
+	protected void clearOutEvents() {
+	}
+
+	public boolean isStateActive(State state) {
+		switch (state) {
+
+			case Main_region_A :
+				return stateVector[0] == State.Main_region_A;
+
+			case Main_region_B :
+				return stateVector[0].ordinal() >= State.Main_region_B
+						.ordinal()
+						&& stateVector[0].ordinal() <= State.Main_region_B_subregion1_B1
+								.ordinal();
+
+			case Main_region_B_subregion1_B1 :
+				return stateVector[0] == State.Main_region_B_subregion1_B1;
+
+			default :
+				return false;
+		}
+		/*
+		for (int i=0;i<stateVector.length;i++){
+			if (stateVector[i]==state) {
+				return true;
+			}
+		}
+		return false;
+		 */
+	}
+
+	public SCIDefault getSCIDefault() {
+		return sCIDefault;
+	}
+
+	public void raiseEvent1() {
+		sCIDefault.raiseEvent1();
+	}
+
+	public void enter() {
+		entryActionSimpleHierachy();
+		nextStateIndex = 0;
+		stateVector[0] = State.Main_region_A;
+
+	}
+
+	public void exit() {
+		//Handle exit of all possible states (of main region) at position 0...
+		switch (stateVector[0]) {
+
+			case Main_region_A :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			case Main_region_B_subregion1_B1 :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			default :
+				break;
+		}
+
+		exitActionSimpleHierachy();
+	}
+
+	private void entryActionSimpleHierachy() {
+
+	}
+
+	private void exitActionSimpleHierachy() {
+
+	}
+
+	private void reactMain_region_A() {
+		if (sCIDefault.event1) {
+			stateVector[0] = State.$NullState$;
+
+			nextStateIndex = 0;
+			stateVector[0] = State.Main_region_B_subregion1_B1;
+
+		}
+
+	}
+	private void reactMain_region_B() {
+	}
+	private void reactMain_region_B_subregion1_B1() {
+
+	}
+
+	public void runCycle() {
+
+		clearOutEvents();
+
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+
+			switch (stateVector[nextStateIndex]) {
+				case Main_region_A :
+					reactMain_region_A();
+					break;
+				case Main_region_B :
+					reactMain_region_B();
+					break;
+				case Main_region_B_subregion1_B1 :
+					reactMain_region_B_subregion1_B1();
+					break;
+				default :
+					// $NullState$
+			}
+		}
+
+		clearEvents();
+	}
+}

+ 16 - 16
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/statechartlocalreactions/IStatechartLocalReactionsStatemachine.java

@@ -1,16 +1,16 @@
-package org.yakindu.scr.statechartlocalreactions;
-
-import org.yakindu.scr.IStatemachine;
-
-public interface IStatechartLocalReactionsStatemachine extends IStatemachine {
-
-	public interface SCIDefault {
-
-		public int getMyInt();
-		public void setMyInt(int value);
-
-	}
-
-	public SCIDefault getSCIDefault();
-
-}
+package org.yakindu.scr.statechartlocalreactions;
+
+import org.yakindu.scr.IStatemachine;
+
+public interface IStatechartLocalReactionsStatemachine extends IStatemachine {
+
+	public interface SCIDefault {
+
+		public int getMyInt();
+		public void setMyInt(int value);
+
+	}
+
+	public SCIDefault getSCIDefault();
+
+}

+ 197 - 197
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/statechartlocalreactions/StatechartLocalReactionsStatemachine.java

@@ -1,197 +1,197 @@
-package org.yakindu.scr.statechartlocalreactions;
-
-public class StatechartLocalReactionsStatemachine
-		implements
-			IStatechartLocalReactionsStatemachine {
-
-	private final class SCIDefaultImpl implements SCIDefault {
-
-		private int myInt;
-
-		public int getMyInt() {
-			return myInt;
-		}
-
-		public void setMyInt(int value) {
-			this.myInt = value;
-		}
-
-	}
-
-	private SCIDefaultImpl sCIDefault;
-
-	public enum State {
-		Main_region_S1, Main_region_S2, Region2_a, $NullState$
-	};
-
-	private final State[] stateVector = new State[2];
-
-	private int nextStateIndex;
-
-	public StatechartLocalReactionsStatemachine() {
-
-		sCIDefault = new SCIDefaultImpl();
-
-	}
-
-	public void init() {
-		for (int i = 0; i < 2; i++) {
-			stateVector[i] = State.$NullState$;
-		}
-
-		clearEvents();
-		clearOutEvents();
-	}
-
-	protected void clearEvents() {
-
-	}
-
-	protected void clearOutEvents() {
-	}
-
-	public boolean isStateActive(State state) {
-		switch (state) {
-
-			case Main_region_S1 :
-				return stateVector[0] == State.Main_region_S1;
-
-			case Main_region_S2 :
-				return stateVector[0] == State.Main_region_S2;
-
-			case Region2_a :
-				return stateVector[1] == State.Region2_a;
-
-			default :
-				return false;
-		}
-		/*
-		for (int i=0;i<stateVector.length;i++){
-			if (stateVector[i]==state) {
-				return true;
-			}
-		}
-		return false;
-		 */
-	}
-
-	public SCIDefault getSCIDefault() {
-		return sCIDefault;
-	}
-
-	public int getMyInt() {
-		return sCIDefault.getMyInt();
-	}
-
-	public void setMyInt(int value) {
-		sCIDefault.setMyInt(value);
-	}
-
-	public void enter() {
-		entryActionStatechartLocalReactions();
-		nextStateIndex = 0;
-		stateVector[0] = State.Main_region_S1;
-
-		nextStateIndex = 1;
-		stateVector[1] = State.Region2_a;
-
-	}
-
-	public void exit() {
-		//Handle exit of all possible states (of main region) at position 0...
-		switch (stateVector[0]) {
-
-			case Main_region_S1 :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			case Main_region_S2 :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			default :
-				break;
-		}
-
-		//Handle exit of all possible states (of region2) at position 1...
-		switch (stateVector[1]) {
-
-			case Region2_a :
-				stateVector[1] = State.$NullState$;
-
-				break;
-
-			default :
-				break;
-		}
-
-		exitActionStatechartLocalReactions();
-	}
-
-	private void entryActionStatechartLocalReactions() {
-
-	}
-
-	private void exitActionStatechartLocalReactions() {
-
-	}
-
-	private boolean conditionStatechartLocalReactionsLr0() {
-		return true;
-	}
-	private void actionsStatechartLocalReactionsLr0() {
-		sCIDefault.myInt += 1;
-
-	}
-
-	private void reactMain_region_S1() {
-		actionsStatechartLocalReactionsLr0();
-		if (true) {
-			stateVector[0] = State.$NullState$;
-
-			nextStateIndex = 0;
-			stateVector[0] = State.Main_region_S2;
-
-		}
-
-	}
-	private void reactMain_region_S2() {
-		actionsStatechartLocalReactionsLr0();
-		if (true) {
-			stateVector[0] = State.$NullState$;
-
-			nextStateIndex = 0;
-			stateVector[0] = State.Main_region_S1;
-
-		}
-
-	}
-	private void reactRegion2_a() {
-	}
-
-	public void runCycle() {
-
-		clearOutEvents();
-
-		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
-
-			switch (stateVector[nextStateIndex]) {
-				case Main_region_S1 :
-					reactMain_region_S1();
-					break;
-				case Main_region_S2 :
-					reactMain_region_S2();
-					break;
-				case Region2_a :
-					reactRegion2_a();
-					break;
-				default :
-					// $NullState$
-			}
-		}
-
-		clearEvents();
-	}
-}
+package org.yakindu.scr.statechartlocalreactions;
+
+public class StatechartLocalReactionsStatemachine
+		implements
+			IStatechartLocalReactionsStatemachine {
+
+	private final class SCIDefaultImpl implements SCIDefault {
+
+		private int myInt;
+
+		public int getMyInt() {
+			return myInt;
+		}
+
+		public void setMyInt(int value) {
+			this.myInt = value;
+		}
+
+	}
+
+	private SCIDefaultImpl sCIDefault;
+
+	public enum State {
+		Main_region_S1, Main_region_S2, Region2_a, $NullState$
+	};
+
+	private final State[] stateVector = new State[2];
+
+	private int nextStateIndex;
+
+	public StatechartLocalReactionsStatemachine() {
+
+		sCIDefault = new SCIDefaultImpl();
+
+	}
+
+	public void init() {
+		for (int i = 0; i < 2; i++) {
+			stateVector[i] = State.$NullState$;
+		}
+
+		clearEvents();
+		clearOutEvents();
+	}
+
+	protected void clearEvents() {
+
+	}
+
+	protected void clearOutEvents() {
+	}
+
+	public boolean isStateActive(State state) {
+		switch (state) {
+
+			case Main_region_S1 :
+				return stateVector[0] == State.Main_region_S1;
+
+			case Main_region_S2 :
+				return stateVector[0] == State.Main_region_S2;
+
+			case Region2_a :
+				return stateVector[1] == State.Region2_a;
+
+			default :
+				return false;
+		}
+		/*
+		for (int i=0;i<stateVector.length;i++){
+			if (stateVector[i]==state) {
+				return true;
+			}
+		}
+		return false;
+		 */
+	}
+
+	public SCIDefault getSCIDefault() {
+		return sCIDefault;
+	}
+
+	public int getMyInt() {
+		return sCIDefault.getMyInt();
+	}
+
+	public void setMyInt(int value) {
+		sCIDefault.setMyInt(value);
+	}
+
+	public void enter() {
+		entryActionStatechartLocalReactions();
+		nextStateIndex = 0;
+		stateVector[0] = State.Main_region_S1;
+
+		nextStateIndex = 1;
+		stateVector[1] = State.Region2_a;
+
+	}
+
+	public void exit() {
+		//Handle exit of all possible states (of main region) at position 0...
+		switch (stateVector[0]) {
+
+			case Main_region_S1 :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			case Main_region_S2 :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			default :
+				break;
+		}
+
+		//Handle exit of all possible states (of region2) at position 1...
+		switch (stateVector[1]) {
+
+			case Region2_a :
+				stateVector[1] = State.$NullState$;
+
+				break;
+
+			default :
+				break;
+		}
+
+		exitActionStatechartLocalReactions();
+	}
+
+	private void entryActionStatechartLocalReactions() {
+
+	}
+
+	private void exitActionStatechartLocalReactions() {
+
+	}
+
+	private boolean conditionStatechartLocalReactionsLr0() {
+		return true;
+	}
+	private void actionsStatechartLocalReactionsLr0() {
+		sCIDefault.myInt += 1;
+
+	}
+
+	private void reactMain_region_S1() {
+		actionsStatechartLocalReactionsLr0();
+		if (true) {
+			stateVector[0] = State.$NullState$;
+
+			nextStateIndex = 0;
+			stateVector[0] = State.Main_region_S2;
+
+		}
+
+	}
+	private void reactMain_region_S2() {
+		actionsStatechartLocalReactionsLr0();
+		if (true) {
+			stateVector[0] = State.$NullState$;
+
+			nextStateIndex = 0;
+			stateVector[0] = State.Main_region_S1;
+
+		}
+
+	}
+	private void reactRegion2_a() {
+	}
+
+	public void runCycle() {
+
+		clearOutEvents();
+
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+
+			switch (stateVector[nextStateIndex]) {
+				case Main_region_S1 :
+					reactMain_region_S1();
+					break;
+				case Main_region_S2 :
+					reactMain_region_S2();
+					break;
+				case Region2_a :
+					reactRegion2_a();
+					break;
+				default :
+					// $NullState$
+			}
+		}
+
+		clearEvents();
+	}
+}

+ 15 - 15
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/stateisactive/IStateIsActiveStatemachine.java

@@ -1,15 +1,15 @@
-package org.yakindu.scr.stateisactive;
-
-import org.yakindu.scr.IStatemachine;
-
-public interface IStateIsActiveStatemachine extends IStatemachine {
-
-	public interface SCIDefault {
-
-		public void raiseEvent1();
-
-	}
-
-	public SCIDefault getSCIDefault();
-
-}
+package org.yakindu.scr.stateisactive;
+
+import org.yakindu.scr.IStatemachine;
+
+public interface IStateIsActiveStatemachine extends IStatemachine {
+
+	public interface SCIDefault {
+
+		public void raiseEvent1();
+
+	}
+
+	public SCIDefault getSCIDefault();
+
+}

+ 195 - 195
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/stateisactive/StateIsActiveStatemachine.java

@@ -1,195 +1,195 @@
-package org.yakindu.scr.stateisactive;
-
-public class StateIsActiveStatemachine implements IStateIsActiveStatemachine {
-
-	private final class SCIDefaultImpl implements SCIDefault {
-
-		private boolean event1;
-
-		public void raiseEvent1() {
-			event1 = true;
-		}
-
-		public void clearEvents() {
-			event1 = false;
-		}
-
-	}
-
-	private SCIDefaultImpl sCIDefault;
-
-	public enum State {
-		R1_R1A, R1_R1B, R2_R2A, R2_R2B, $NullState$
-	};
-
-	private final State[] stateVector = new State[2];
-
-	private int nextStateIndex;
-
-	public StateIsActiveStatemachine() {
-
-		sCIDefault = new SCIDefaultImpl();
-
-	}
-
-	public void init() {
-		for (int i = 0; i < 2; i++) {
-			stateVector[i] = State.$NullState$;
-		}
-
-		clearEvents();
-		clearOutEvents();
-	}
-
-	protected void clearEvents() {
-		sCIDefault.clearEvents();
-
-	}
-
-	protected void clearOutEvents() {
-	}
-
-	public boolean isStateActive(State state) {
-		switch (state) {
-
-			case R1_R1A :
-				return stateVector[0] == State.R1_R1A;
-
-			case R1_R1B :
-				return stateVector[0] == State.R1_R1B;
-
-			case R2_R2A :
-				return stateVector[1] == State.R2_R2A;
-
-			case R2_R2B :
-				return stateVector[1] == State.R2_R2B;
-
-			default :
-				return false;
-		}
-		/*
-		for (int i=0;i<stateVector.length;i++){
-			if (stateVector[i]==state) {
-				return true;
-			}
-		}
-		return false;
-		 */
-	}
-
-	public SCIDefault getSCIDefault() {
-		return sCIDefault;
-	}
-
-	public void raiseEvent1() {
-		sCIDefault.raiseEvent1();
-	}
-
-	public void enter() {
-		entryActionStateIsActive();
-		nextStateIndex = 0;
-		stateVector[0] = State.R1_R1A;
-
-		nextStateIndex = 1;
-		stateVector[1] = State.R2_R2A;
-
-	}
-
-	public void exit() {
-		//Handle exit of all possible states (of R1) at position 0...
-		switch (stateVector[0]) {
-
-			case R1_R1A :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			case R1_R1B :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			default :
-				break;
-		}
-
-		//Handle exit of all possible states (of R2) at position 1...
-		switch (stateVector[1]) {
-
-			case R2_R2A :
-				stateVector[1] = State.$NullState$;
-
-				break;
-
-			case R2_R2B :
-				stateVector[1] = State.$NullState$;
-
-				break;
-
-			default :
-				break;
-		}
-
-		exitActionStateIsActive();
-	}
-
-	private void entryActionStateIsActive() {
-
-	}
-
-	private void exitActionStateIsActive() {
-
-	}
-
-	private void reactR1_R1A() {
-		if (isStateActive(State.R2_R2B)) {
-			stateVector[0] = State.$NullState$;
-
-			nextStateIndex = 0;
-			stateVector[0] = State.R1_R1B;
-
-		}
-
-	}
-	private void reactR1_R1B() {
-
-	}
-	private void reactR2_R2A() {
-		if (sCIDefault.event1) {
-			stateVector[1] = State.$NullState$;
-
-			nextStateIndex = 1;
-			stateVector[1] = State.R2_R2B;
-
-		}
-	}
-	private void reactR2_R2B() {
-	}
-
-	public void runCycle() {
-
-		clearOutEvents();
-
-		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
-
-			switch (stateVector[nextStateIndex]) {
-				case R1_R1A :
-					reactR1_R1A();
-					break;
-				case R1_R1B :
-					reactR1_R1B();
-					break;
-				case R2_R2A :
-					reactR2_R2A();
-					break;
-				case R2_R2B :
-					reactR2_R2B();
-					break;
-				default :
-					// $NullState$
-			}
-		}
-
-		clearEvents();
-	}
-}
+package org.yakindu.scr.stateisactive;
+
+public class StateIsActiveStatemachine implements IStateIsActiveStatemachine {
+
+	private final class SCIDefaultImpl implements SCIDefault {
+
+		private boolean event1;
+
+		public void raiseEvent1() {
+			event1 = true;
+		}
+
+		public void clearEvents() {
+			event1 = false;
+		}
+
+	}
+
+	private SCIDefaultImpl sCIDefault;
+
+	public enum State {
+		R1_R1A, R1_R1B, R2_R2A, R2_R2B, $NullState$
+	};
+
+	private final State[] stateVector = new State[2];
+
+	private int nextStateIndex;
+
+	public StateIsActiveStatemachine() {
+
+		sCIDefault = new SCIDefaultImpl();
+
+	}
+
+	public void init() {
+		for (int i = 0; i < 2; i++) {
+			stateVector[i] = State.$NullState$;
+		}
+
+		clearEvents();
+		clearOutEvents();
+	}
+
+	protected void clearEvents() {
+		sCIDefault.clearEvents();
+
+	}
+
+	protected void clearOutEvents() {
+	}
+
+	public boolean isStateActive(State state) {
+		switch (state) {
+
+			case R1_R1A :
+				return stateVector[0] == State.R1_R1A;
+
+			case R1_R1B :
+				return stateVector[0] == State.R1_R1B;
+
+			case R2_R2A :
+				return stateVector[1] == State.R2_R2A;
+
+			case R2_R2B :
+				return stateVector[1] == State.R2_R2B;
+
+			default :
+				return false;
+		}
+		/*
+		for (int i=0;i<stateVector.length;i++){
+			if (stateVector[i]==state) {
+				return true;
+			}
+		}
+		return false;
+		 */
+	}
+
+	public SCIDefault getSCIDefault() {
+		return sCIDefault;
+	}
+
+	public void raiseEvent1() {
+		sCIDefault.raiseEvent1();
+	}
+
+	public void enter() {
+		entryActionStateIsActive();
+		nextStateIndex = 0;
+		stateVector[0] = State.R1_R1A;
+
+		nextStateIndex = 1;
+		stateVector[1] = State.R2_R2A;
+
+	}
+
+	public void exit() {
+		//Handle exit of all possible states (of R1) at position 0...
+		switch (stateVector[0]) {
+
+			case R1_R1A :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			case R1_R1B :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			default :
+				break;
+		}
+
+		//Handle exit of all possible states (of R2) at position 1...
+		switch (stateVector[1]) {
+
+			case R2_R2A :
+				stateVector[1] = State.$NullState$;
+
+				break;
+
+			case R2_R2B :
+				stateVector[1] = State.$NullState$;
+
+				break;
+
+			default :
+				break;
+		}
+
+		exitActionStateIsActive();
+	}
+
+	private void entryActionStateIsActive() {
+
+	}
+
+	private void exitActionStateIsActive() {
+
+	}
+
+	private void reactR1_R1A() {
+		if (isStateActive(State.R2_R2B)) {
+			stateVector[0] = State.$NullState$;
+
+			nextStateIndex = 0;
+			stateVector[0] = State.R1_R1B;
+
+		}
+
+	}
+	private void reactR1_R1B() {
+
+	}
+	private void reactR2_R2A() {
+		if (sCIDefault.event1) {
+			stateVector[1] = State.$NullState$;
+
+			nextStateIndex = 1;
+			stateVector[1] = State.R2_R2B;
+
+		}
+	}
+	private void reactR2_R2B() {
+	}
+
+	public void runCycle() {
+
+		clearOutEvents();
+
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+
+			switch (stateVector[nextStateIndex]) {
+				case R1_R1A :
+					reactR1_R1A();
+					break;
+				case R1_R1B :
+					reactR1_R1B();
+					break;
+				case R2_R2A :
+					reactR2_R2A();
+					break;
+				case R2_R2B :
+					reactR2_R2B();
+					break;
+				default :
+					// $NullState$
+			}
+		}
+
+		clearEvents();
+	}
+}

+ 24 - 24
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/stringexpressions/IStringExpressionsStatemachine.java

@@ -1,24 +1,24 @@
-package org.yakindu.scr.stringexpressions;
-
-import org.yakindu.scr.IStatemachine;
-
-public interface IStringExpressionsStatemachine extends IStatemachine {
-
-	public interface SCIDefault {
-
-		public void raiseE1();
-
-		public String getMyString();
-		public void setMyString(String value);
-		public String getMyString2();
-		public void setMyString2(String value);
-		public boolean getEquals();
-		public void setEquals(boolean value);
-		public boolean getNotEqual();
-		public void setNotEqual(boolean value);
-
-	}
-
-	public SCIDefault getSCIDefault();
-
-}
+package org.yakindu.scr.stringexpressions;
+
+import org.yakindu.scr.IStatemachine;
+
+public interface IStringExpressionsStatemachine extends IStatemachine {
+
+	public interface SCIDefault {
+
+		public void raiseE1();
+
+		public String getMyString();
+		public void setMyString(String value);
+		public String getMyString2();
+		public void setMyString2(String value);
+		public boolean getEquals();
+		public void setEquals(boolean value);
+		public boolean getNotEqual();
+		public void setNotEqual(boolean value);
+
+	}
+
+	public SCIDefault getSCIDefault();
+
+}

+ 235 - 235
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/stringexpressions/StringExpressionsStatemachine.java

@@ -1,235 +1,235 @@
-package org.yakindu.scr.stringexpressions;
-
-public class StringExpressionsStatemachine
-		implements
-			IStringExpressionsStatemachine {
-
-	private final class SCIDefaultImpl implements SCIDefault {
-
-		private boolean e1;
-
-		public void raiseE1() {
-			e1 = true;
-		}
-
-		private String myString;
-
-		public String getMyString() {
-			return myString;
-		}
-
-		public void setMyString(String value) {
-			this.myString = value;
-		}
-
-		private String myString2;
-
-		public String getMyString2() {
-			return myString2;
-		}
-
-		public void setMyString2(String value) {
-			this.myString2 = value;
-		}
-
-		private boolean equals;
-
-		public boolean getEquals() {
-			return equals;
-		}
-
-		public void setEquals(boolean value) {
-			this.equals = value;
-		}
-
-		private boolean notEqual;
-
-		public boolean getNotEqual() {
-			return notEqual;
-		}
-
-		public void setNotEqual(boolean value) {
-			this.notEqual = value;
-		}
-
-		public void clearEvents() {
-			e1 = false;
-		}
-
-	}
-
-	private SCIDefaultImpl sCIDefault;
-
-	public enum State {
-		Main_region_StateA, Main_region_StateB, $NullState$
-	};
-
-	private final State[] stateVector = new State[1];
-
-	private int nextStateIndex;
-
-	public StringExpressionsStatemachine() {
-
-		sCIDefault = new SCIDefaultImpl();
-
-	}
-
-	public void init() {
-		for (int i = 0; i < 1; i++) {
-			stateVector[i] = State.$NullState$;
-		}
-
-		clearEvents();
-		clearOutEvents();
-	}
-
-	protected void clearEvents() {
-		sCIDefault.clearEvents();
-
-	}
-
-	protected void clearOutEvents() {
-	}
-
-	public boolean isStateActive(State state) {
-		switch (state) {
-
-			case Main_region_StateA :
-				return stateVector[0] == State.Main_region_StateA;
-
-			case Main_region_StateB :
-				return stateVector[0] == State.Main_region_StateB;
-
-			default :
-				return false;
-		}
-		/*
-		for (int i=0;i<stateVector.length;i++){
-			if (stateVector[i]==state) {
-				return true;
-			}
-		}
-		return false;
-		 */
-	}
-
-	public SCIDefault getSCIDefault() {
-		return sCIDefault;
-	}
-
-	public void raiseE1() {
-		sCIDefault.raiseE1();
-	}
-
-	public String getMyString() {
-		return sCIDefault.getMyString();
-	}
-
-	public void setMyString(String value) {
-		sCIDefault.setMyString(value);
-	}
-	public String getMyString2() {
-		return sCIDefault.getMyString2();
-	}
-
-	public void setMyString2(String value) {
-		sCIDefault.setMyString2(value);
-	}
-	public boolean getEquals() {
-		return sCIDefault.getEquals();
-	}
-
-	public void setEquals(boolean value) {
-		sCIDefault.setEquals(value);
-	}
-	public boolean getNotEqual() {
-		return sCIDefault.getNotEqual();
-	}
-
-	public void setNotEqual(boolean value) {
-		sCIDefault.setNotEqual(value);
-	}
-
-	public void enter() {
-		entryActionStringExpressions();
-		sCIDefault.myString = "hello";
-
-		sCIDefault.myString2 = "world";
-
-		nextStateIndex = 0;
-		stateVector[0] = State.Main_region_StateA;
-
-	}
-
-	public void exit() {
-		//Handle exit of all possible states (of main region) at position 0...
-		switch (stateVector[0]) {
-
-			case Main_region_StateA :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			case Main_region_StateB :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			default :
-				break;
-		}
-
-		exitActionStringExpressions();
-	}
-
-	private void entryActionStringExpressions() {
-
-	}
-
-	private void exitActionStringExpressions() {
-
-	}
-
-	private void reactMain_region_StateA() {
-		if (sCIDefault.e1) {
-			stateVector[0] = State.$NullState$;
-
-			sCIDefault.equals = (sCIDefault.myString == null
-					? sCIDefault.myString2 == null
-					: sCIDefault.myString.equals(sCIDefault.myString2));
-
-			sCIDefault.notEqual = (sCIDefault.myString == null
-					? sCIDefault.myString2 == null
-					: !sCIDefault.myString.equals(sCIDefault.myString2));
-
-			nextStateIndex = 0;
-			stateVector[0] = State.Main_region_StateB;
-
-		}
-
-	}
-	private void reactMain_region_StateB() {
-
-	}
-
-	public void runCycle() {
-
-		clearOutEvents();
-
-		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
-
-			switch (stateVector[nextStateIndex]) {
-				case Main_region_StateA :
-					reactMain_region_StateA();
-					break;
-				case Main_region_StateB :
-					reactMain_region_StateB();
-					break;
-				default :
-					// $NullState$
-			}
-		}
-
-		clearEvents();
-	}
-}
+package org.yakindu.scr.stringexpressions;
+
+public class StringExpressionsStatemachine
+		implements
+			IStringExpressionsStatemachine {
+
+	private final class SCIDefaultImpl implements SCIDefault {
+
+		private boolean e1;
+
+		public void raiseE1() {
+			e1 = true;
+		}
+
+		private String myString;
+
+		public String getMyString() {
+			return myString;
+		}
+
+		public void setMyString(String value) {
+			this.myString = value;
+		}
+
+		private String myString2;
+
+		public String getMyString2() {
+			return myString2;
+		}
+
+		public void setMyString2(String value) {
+			this.myString2 = value;
+		}
+
+		private boolean equals;
+
+		public boolean getEquals() {
+			return equals;
+		}
+
+		public void setEquals(boolean value) {
+			this.equals = value;
+		}
+
+		private boolean notEqual;
+
+		public boolean getNotEqual() {
+			return notEqual;
+		}
+
+		public void setNotEqual(boolean value) {
+			this.notEqual = value;
+		}
+
+		public void clearEvents() {
+			e1 = false;
+		}
+
+	}
+
+	private SCIDefaultImpl sCIDefault;
+
+	public enum State {
+		Main_region_StateA, Main_region_StateB, $NullState$
+	};
+
+	private final State[] stateVector = new State[1];
+
+	private int nextStateIndex;
+
+	public StringExpressionsStatemachine() {
+
+		sCIDefault = new SCIDefaultImpl();
+
+	}
+
+	public void init() {
+		for (int i = 0; i < 1; i++) {
+			stateVector[i] = State.$NullState$;
+		}
+
+		clearEvents();
+		clearOutEvents();
+	}
+
+	protected void clearEvents() {
+		sCIDefault.clearEvents();
+
+	}
+
+	protected void clearOutEvents() {
+	}
+
+	public boolean isStateActive(State state) {
+		switch (state) {
+
+			case Main_region_StateA :
+				return stateVector[0] == State.Main_region_StateA;
+
+			case Main_region_StateB :
+				return stateVector[0] == State.Main_region_StateB;
+
+			default :
+				return false;
+		}
+		/*
+		for (int i=0;i<stateVector.length;i++){
+			if (stateVector[i]==state) {
+				return true;
+			}
+		}
+		return false;
+		 */
+	}
+
+	public SCIDefault getSCIDefault() {
+		return sCIDefault;
+	}
+
+	public void raiseE1() {
+		sCIDefault.raiseE1();
+	}
+
+	public String getMyString() {
+		return sCIDefault.getMyString();
+	}
+
+	public void setMyString(String value) {
+		sCIDefault.setMyString(value);
+	}
+	public String getMyString2() {
+		return sCIDefault.getMyString2();
+	}
+
+	public void setMyString2(String value) {
+		sCIDefault.setMyString2(value);
+	}
+	public boolean getEquals() {
+		return sCIDefault.getEquals();
+	}
+
+	public void setEquals(boolean value) {
+		sCIDefault.setEquals(value);
+	}
+	public boolean getNotEqual() {
+		return sCIDefault.getNotEqual();
+	}
+
+	public void setNotEqual(boolean value) {
+		sCIDefault.setNotEqual(value);
+	}
+
+	public void enter() {
+		entryActionStringExpressions();
+		sCIDefault.myString = "hello";
+
+		sCIDefault.myString2 = "world";
+
+		nextStateIndex = 0;
+		stateVector[0] = State.Main_region_StateA;
+
+	}
+
+	public void exit() {
+		//Handle exit of all possible states (of main region) at position 0...
+		switch (stateVector[0]) {
+
+			case Main_region_StateA :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			case Main_region_StateB :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			default :
+				break;
+		}
+
+		exitActionStringExpressions();
+	}
+
+	private void entryActionStringExpressions() {
+
+	}
+
+	private void exitActionStringExpressions() {
+
+	}
+
+	private void reactMain_region_StateA() {
+		if (sCIDefault.e1) {
+			stateVector[0] = State.$NullState$;
+
+			sCIDefault.equals = (sCIDefault.myString == null
+					? sCIDefault.myString2 == null
+					: sCIDefault.myString.equals(sCIDefault.myString2));
+
+			sCIDefault.notEqual = (sCIDefault.myString == null
+					? sCIDefault.myString2 == null
+					: !sCIDefault.myString.equals(sCIDefault.myString2));
+
+			nextStateIndex = 0;
+			stateVector[0] = State.Main_region_StateB;
+
+		}
+
+	}
+	private void reactMain_region_StateB() {
+
+	}
+
+	public void runCycle() {
+
+		clearOutEvents();
+
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+
+			switch (stateVector[nextStateIndex]) {
+				case Main_region_StateA :
+					reactMain_region_StateA();
+					break;
+				case Main_region_StateB :
+					reactMain_region_StateB();
+					break;
+				default :
+					// $NullState$
+			}
+		}
+
+		clearEvents();
+	}
+}

+ 17 - 17
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/syncfork/ISyncForkStatemachine.java

@@ -1,17 +1,17 @@
-package org.yakindu.scr.syncfork;
-
-import org.yakindu.scr.IStatemachine;
-
-public interface ISyncForkStatemachine extends IStatemachine {
-
-	public interface SCIDefault {
-
-		public void raiseE();
-
-		public void raiseF();
-
-	}
-
-	public SCIDefault getSCIDefault();
-
-}
+package org.yakindu.scr.syncfork;
+
+import org.yakindu.scr.IStatemachine;
+
+public interface ISyncForkStatemachine extends IStatemachine {
+
+	public interface SCIDefault {
+
+		public void raiseE();
+
+		public void raiseF();
+
+	}
+
+	public SCIDefault getSCIDefault();
+
+}

+ 334 - 334
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/syncfork/SyncForkStatemachine.java

@@ -1,334 +1,334 @@
-package org.yakindu.scr.syncfork;
-
-public class SyncForkStatemachine implements ISyncForkStatemachine {
-
-	private final class SCIDefaultImpl implements SCIDefault {
-
-		private boolean e;
-
-		public void raiseE() {
-			e = true;
-		}
-
-		private boolean f;
-
-		public void raiseF() {
-			f = true;
-		}
-
-		public void clearEvents() {
-			e = false;
-			f = false;
-		}
-
-	}
-
-	private SCIDefaultImpl sCIDefault;
-
-	public enum State {
-		Main_region_A, Main_region_B, Main_region_B_r1_C1, Main_region_B_r1_C2, Main_region_B_r2_D1, Main_region_B_r2_D2, $NullState$
-	};
-
-	private final State[] stateVector = new State[2];
-
-	private int nextStateIndex;
-
-	public SyncForkStatemachine() {
-
-		sCIDefault = new SCIDefaultImpl();
-
-	}
-
-	public void init() {
-		for (int i = 0; i < 2; i++) {
-			stateVector[i] = State.$NullState$;
-		}
-
-		clearEvents();
-		clearOutEvents();
-	}
-
-	protected void clearEvents() {
-		sCIDefault.clearEvents();
-
-	}
-
-	protected void clearOutEvents() {
-	}
-
-	public boolean isStateActive(State state) {
-		switch (state) {
-
-			case Main_region_A :
-				return stateVector[0] == State.Main_region_A;
-
-			case Main_region_B :
-				return stateVector[0].ordinal() >= State.Main_region_B
-						.ordinal()
-						&& stateVector[0].ordinal() <= State.Main_region_B_r2_D2
-								.ordinal();
-
-			case Main_region_B_r1_C1 :
-				return stateVector[0] == State.Main_region_B_r1_C1;
-
-			case Main_region_B_r1_C2 :
-				return stateVector[0] == State.Main_region_B_r1_C2;
-
-			case Main_region_B_r2_D1 :
-				return stateVector[1] == State.Main_region_B_r2_D1;
-
-			case Main_region_B_r2_D2 :
-				return stateVector[1] == State.Main_region_B_r2_D2;
-
-			default :
-				return false;
-		}
-		/*
-		for (int i=0;i<stateVector.length;i++){
-			if (stateVector[i]==state) {
-				return true;
-			}
-		}
-		return false;
-		 */
-	}
-
-	public SCIDefault getSCIDefault() {
-		return sCIDefault;
-	}
-
-	public void raiseE() {
-		sCIDefault.raiseE();
-	}
-
-	public void raiseF() {
-		sCIDefault.raiseF();
-	}
-
-	public void enter() {
-		entryActionSyncFork();
-		nextStateIndex = 0;
-		stateVector[0] = State.Main_region_A;
-
-	}
-
-	public void exit() {
-		//Handle exit of all possible states (of main region) at position 0...
-		switch (stateVector[0]) {
-
-			case Main_region_A :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			case Main_region_B_r1_C1 :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			case Main_region_B_r1_C2 :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			default :
-				break;
-		}
-		//Handle exit of all possible states (of main region) at position 1...
-		switch (stateVector[1]) {
-
-			case Main_region_B_r2_D1 :
-				stateVector[1] = State.$NullState$;
-
-				break;
-
-			case Main_region_B_r2_D2 :
-				stateVector[1] = State.$NullState$;
-
-				break;
-
-			default :
-				break;
-		}
-
-		exitActionSyncFork();
-	}
-
-	private void entryActionSyncFork() {
-
-	}
-
-	private void exitActionSyncFork() {
-
-	}
-
-	private void reactMain_region_A() {
-		if (sCIDefault.e) {
-			stateVector[0] = State.$NullState$;
-
-			react_sync0_();
-
-		} else {
-			if (sCIDefault.f) {
-				stateVector[0] = State.$NullState$;
-
-				nextStateIndex = 0;
-				stateVector[0] = State.Main_region_B_r1_C1;
-
-				nextStateIndex = 1;
-				stateVector[1] = State.Main_region_B_r2_D1;
-
-			}
-		}
-
-	}
-	private void reactMain_region_B() {
-	}
-	private void reactMain_region_B_r1_C1() {
-		if (sCIDefault.e) {
-			//Handle exit of all possible states (of r1) at position 0...
-			switch (stateVector[0]) {
-
-				case Main_region_B_r1_C1 :
-					stateVector[0] = State.$NullState$;
-
-					break;
-
-				case Main_region_B_r1_C2 :
-					stateVector[0] = State.$NullState$;
-
-					break;
-
-				default :
-					break;
-			}
-
-			//Handle exit of all possible states (of r2) at position 1...
-			switch (stateVector[1]) {
-
-				case Main_region_B_r2_D1 :
-					stateVector[1] = State.$NullState$;
-
-					break;
-
-				case Main_region_B_r2_D2 :
-					stateVector[1] = State.$NullState$;
-
-					break;
-
-				default :
-					break;
-			}
-
-			nextStateIndex = 0;
-			stateVector[0] = State.Main_region_A;
-
-		} else {
-			if (sCIDefault.f) {
-				stateVector[0] = State.$NullState$;
-
-				nextStateIndex = 0;
-				stateVector[0] = State.Main_region_B_r1_C2;
-
-			}
-
-		}
-
-	}
-	private void reactMain_region_B_r1_C2() {
-		if (sCIDefault.e) {
-			//Handle exit of all possible states (of r1) at position 0...
-			switch (stateVector[0]) {
-
-				case Main_region_B_r1_C1 :
-					stateVector[0] = State.$NullState$;
-
-					break;
-
-				case Main_region_B_r1_C2 :
-					stateVector[0] = State.$NullState$;
-
-					break;
-
-				default :
-					break;
-			}
-
-			//Handle exit of all possible states (of r2) at position 1...
-			switch (stateVector[1]) {
-
-				case Main_region_B_r2_D1 :
-					stateVector[1] = State.$NullState$;
-
-					break;
-
-				case Main_region_B_r2_D2 :
-					stateVector[1] = State.$NullState$;
-
-					break;
-
-				default :
-					break;
-			}
-
-			nextStateIndex = 0;
-			stateVector[0] = State.Main_region_A;
-
-		} else {
-
-		}
-
-	}
-	private void reactMain_region_B_r2_D1() {
-		if (sCIDefault.f) {
-			stateVector[1] = State.$NullState$;
-
-			nextStateIndex = 1;
-			stateVector[1] = State.Main_region_B_r2_D2;
-
-		}
-	}
-	private void reactMain_region_B_r2_D2() {
-	}
-	private void react_sync0_() {
-		nextStateIndex = 0;
-		stateVector[0] = State.Main_region_B_r1_C2;
-
-		nextStateIndex = 1;
-		stateVector[1] = State.Main_region_B_r2_D2;
-
-	}
-
-	public void runCycle() {
-
-		clearOutEvents();
-
-		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
-
-			switch (stateVector[nextStateIndex]) {
-				case Main_region_A :
-					reactMain_region_A();
-					break;
-				case Main_region_B :
-					reactMain_region_B();
-					break;
-				case Main_region_B_r1_C1 :
-					reactMain_region_B_r1_C1();
-					break;
-				case Main_region_B_r1_C2 :
-					reactMain_region_B_r1_C2();
-					break;
-				case Main_region_B_r2_D1 :
-					reactMain_region_B_r2_D1();
-					break;
-				case Main_region_B_r2_D2 :
-					reactMain_region_B_r2_D2();
-					break;
-				default :
-					// $NullState$
-			}
-		}
-
-		clearEvents();
-	}
-}
+package org.yakindu.scr.syncfork;
+
+public class SyncForkStatemachine implements ISyncForkStatemachine {
+
+	private final class SCIDefaultImpl implements SCIDefault {
+
+		private boolean e;
+
+		public void raiseE() {
+			e = true;
+		}
+
+		private boolean f;
+
+		public void raiseF() {
+			f = true;
+		}
+
+		public void clearEvents() {
+			e = false;
+			f = false;
+		}
+
+	}
+
+	private SCIDefaultImpl sCIDefault;
+
+	public enum State {
+		Main_region_A, Main_region_B, Main_region_B_r1_C1, Main_region_B_r1_C2, Main_region_B_r2_D1, Main_region_B_r2_D2, $NullState$
+	};
+
+	private final State[] stateVector = new State[2];
+
+	private int nextStateIndex;
+
+	public SyncForkStatemachine() {
+
+		sCIDefault = new SCIDefaultImpl();
+
+	}
+
+	public void init() {
+		for (int i = 0; i < 2; i++) {
+			stateVector[i] = State.$NullState$;
+		}
+
+		clearEvents();
+		clearOutEvents();
+	}
+
+	protected void clearEvents() {
+		sCIDefault.clearEvents();
+
+	}
+
+	protected void clearOutEvents() {
+	}
+
+	public boolean isStateActive(State state) {
+		switch (state) {
+
+			case Main_region_A :
+				return stateVector[0] == State.Main_region_A;
+
+			case Main_region_B :
+				return stateVector[0].ordinal() >= State.Main_region_B
+						.ordinal()
+						&& stateVector[0].ordinal() <= State.Main_region_B_r2_D2
+								.ordinal();
+
+			case Main_region_B_r1_C1 :
+				return stateVector[0] == State.Main_region_B_r1_C1;
+
+			case Main_region_B_r1_C2 :
+				return stateVector[0] == State.Main_region_B_r1_C2;
+
+			case Main_region_B_r2_D1 :
+				return stateVector[1] == State.Main_region_B_r2_D1;
+
+			case Main_region_B_r2_D2 :
+				return stateVector[1] == State.Main_region_B_r2_D2;
+
+			default :
+				return false;
+		}
+		/*
+		for (int i=0;i<stateVector.length;i++){
+			if (stateVector[i]==state) {
+				return true;
+			}
+		}
+		return false;
+		 */
+	}
+
+	public SCIDefault getSCIDefault() {
+		return sCIDefault;
+	}
+
+	public void raiseE() {
+		sCIDefault.raiseE();
+	}
+
+	public void raiseF() {
+		sCIDefault.raiseF();
+	}
+
+	public void enter() {
+		entryActionSyncFork();
+		nextStateIndex = 0;
+		stateVector[0] = State.Main_region_A;
+
+	}
+
+	public void exit() {
+		//Handle exit of all possible states (of main region) at position 0...
+		switch (stateVector[0]) {
+
+			case Main_region_A :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			case Main_region_B_r1_C1 :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			case Main_region_B_r1_C2 :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			default :
+				break;
+		}
+		//Handle exit of all possible states (of main region) at position 1...
+		switch (stateVector[1]) {
+
+			case Main_region_B_r2_D1 :
+				stateVector[1] = State.$NullState$;
+
+				break;
+
+			case Main_region_B_r2_D2 :
+				stateVector[1] = State.$NullState$;
+
+				break;
+
+			default :
+				break;
+		}
+
+		exitActionSyncFork();
+	}
+
+	private void entryActionSyncFork() {
+
+	}
+
+	private void exitActionSyncFork() {
+
+	}
+
+	private void reactMain_region_A() {
+		if (sCIDefault.e) {
+			stateVector[0] = State.$NullState$;
+
+			react_sync0_();
+
+		} else {
+			if (sCIDefault.f) {
+				stateVector[0] = State.$NullState$;
+
+				nextStateIndex = 0;
+				stateVector[0] = State.Main_region_B_r1_C1;
+
+				nextStateIndex = 1;
+				stateVector[1] = State.Main_region_B_r2_D1;
+
+			}
+		}
+
+	}
+	private void reactMain_region_B() {
+	}
+	private void reactMain_region_B_r1_C1() {
+		if (sCIDefault.e) {
+			//Handle exit of all possible states (of r1) at position 0...
+			switch (stateVector[0]) {
+
+				case Main_region_B_r1_C1 :
+					stateVector[0] = State.$NullState$;
+
+					break;
+
+				case Main_region_B_r1_C2 :
+					stateVector[0] = State.$NullState$;
+
+					break;
+
+				default :
+					break;
+			}
+
+			//Handle exit of all possible states (of r2) at position 1...
+			switch (stateVector[1]) {
+
+				case Main_region_B_r2_D1 :
+					stateVector[1] = State.$NullState$;
+
+					break;
+
+				case Main_region_B_r2_D2 :
+					stateVector[1] = State.$NullState$;
+
+					break;
+
+				default :
+					break;
+			}
+
+			nextStateIndex = 0;
+			stateVector[0] = State.Main_region_A;
+
+		} else {
+			if (sCIDefault.f) {
+				stateVector[0] = State.$NullState$;
+
+				nextStateIndex = 0;
+				stateVector[0] = State.Main_region_B_r1_C2;
+
+			}
+
+		}
+
+	}
+	private void reactMain_region_B_r1_C2() {
+		if (sCIDefault.e) {
+			//Handle exit of all possible states (of r1) at position 0...
+			switch (stateVector[0]) {
+
+				case Main_region_B_r1_C1 :
+					stateVector[0] = State.$NullState$;
+
+					break;
+
+				case Main_region_B_r1_C2 :
+					stateVector[0] = State.$NullState$;
+
+					break;
+
+				default :
+					break;
+			}
+
+			//Handle exit of all possible states (of r2) at position 1...
+			switch (stateVector[1]) {
+
+				case Main_region_B_r2_D1 :
+					stateVector[1] = State.$NullState$;
+
+					break;
+
+				case Main_region_B_r2_D2 :
+					stateVector[1] = State.$NullState$;
+
+					break;
+
+				default :
+					break;
+			}
+
+			nextStateIndex = 0;
+			stateVector[0] = State.Main_region_A;
+
+		} else {
+
+		}
+
+	}
+	private void reactMain_region_B_r2_D1() {
+		if (sCIDefault.f) {
+			stateVector[1] = State.$NullState$;
+
+			nextStateIndex = 1;
+			stateVector[1] = State.Main_region_B_r2_D2;
+
+		}
+	}
+	private void reactMain_region_B_r2_D2() {
+	}
+	private void react_sync0_() {
+		nextStateIndex = 0;
+		stateVector[0] = State.Main_region_B_r1_C2;
+
+		nextStateIndex = 1;
+		stateVector[1] = State.Main_region_B_r2_D2;
+
+	}
+
+	public void runCycle() {
+
+		clearOutEvents();
+
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+
+			switch (stateVector[nextStateIndex]) {
+				case Main_region_A :
+					reactMain_region_A();
+					break;
+				case Main_region_B :
+					reactMain_region_B();
+					break;
+				case Main_region_B_r1_C1 :
+					reactMain_region_B_r1_C1();
+					break;
+				case Main_region_B_r1_C2 :
+					reactMain_region_B_r1_C2();
+					break;
+				case Main_region_B_r2_D1 :
+					reactMain_region_B_r2_D1();
+					break;
+				case Main_region_B_r2_D2 :
+					reactMain_region_B_r2_D2();
+					break;
+				default :
+					// $NullState$
+			}
+		}
+
+		clearEvents();
+	}
+}

+ 21 - 21
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/syncjoin/ISyncJoinStatemachine.java

@@ -1,21 +1,21 @@
-package org.yakindu.scr.syncjoin;
-
-import org.yakindu.scr.IStatemachine;
-
-public interface ISyncJoinStatemachine extends IStatemachine {
-
-	public interface SCIDefault {
-
-		public void raiseE();
-
-		public void raiseF();
-
-		public void raiseJc();
-
-		public void raiseJd();
-
-	}
-
-	public SCIDefault getSCIDefault();
-
-}
+package org.yakindu.scr.syncjoin;
+
+import org.yakindu.scr.IStatemachine;
+
+public interface ISyncJoinStatemachine extends IStatemachine {
+
+	public interface SCIDefault {
+
+		public void raiseE();
+
+		public void raiseF();
+
+		public void raiseJc();
+
+		public void raiseJd();
+
+	}
+
+	public SCIDefault getSCIDefault();
+
+}

+ 345 - 345
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/syncjoin/SyncJoinStatemachine.java

@@ -1,345 +1,345 @@
-package org.yakindu.scr.syncjoin;
-
-public class SyncJoinStatemachine implements ISyncJoinStatemachine {
-
-	private final class SCIDefaultImpl implements SCIDefault {
-
-		private boolean e;
-
-		public void raiseE() {
-			e = true;
-		}
-
-		private boolean f;
-
-		public void raiseF() {
-			f = true;
-		}
-
-		private boolean jc;
-
-		public void raiseJc() {
-			jc = true;
-		}
-
-		private boolean jd;
-
-		public void raiseJd() {
-			jd = true;
-		}
-
-		public void clearEvents() {
-			e = false;
-			f = false;
-			jc = false;
-			jd = false;
-		}
-
-	}
-
-	private SCIDefaultImpl sCIDefault;
-
-	public enum State {
-		Main_region_A, Main_region_B, Main_region_B_r1_C1, Main_region_B_r1_C2, Main_region_B_r2_D1, Main_region_B_r2_D2, $NullState$
-	};
-
-	private final State[] stateVector = new State[2];
-
-	private int nextStateIndex;
-
-	public SyncJoinStatemachine() {
-
-		sCIDefault = new SCIDefaultImpl();
-
-	}
-
-	public void init() {
-		for (int i = 0; i < 2; i++) {
-			stateVector[i] = State.$NullState$;
-		}
-
-		clearEvents();
-		clearOutEvents();
-	}
-
-	protected void clearEvents() {
-		sCIDefault.clearEvents();
-
-	}
-
-	protected void clearOutEvents() {
-	}
-
-	public boolean isStateActive(State state) {
-		switch (state) {
-
-			case Main_region_A :
-				return stateVector[0] == State.Main_region_A;
-
-			case Main_region_B :
-				return stateVector[0].ordinal() >= State.Main_region_B
-						.ordinal()
-						&& stateVector[0].ordinal() <= State.Main_region_B_r2_D2
-								.ordinal();
-
-			case Main_region_B_r1_C1 :
-				return stateVector[0] == State.Main_region_B_r1_C1;
-
-			case Main_region_B_r1_C2 :
-				return stateVector[0] == State.Main_region_B_r1_C2;
-
-			case Main_region_B_r2_D1 :
-				return stateVector[1] == State.Main_region_B_r2_D1;
-
-			case Main_region_B_r2_D2 :
-				return stateVector[1] == State.Main_region_B_r2_D2;
-
-			default :
-				return false;
-		}
-		/*
-		for (int i=0;i<stateVector.length;i++){
-			if (stateVector[i]==state) {
-				return true;
-			}
-		}
-		return false;
-		 */
-	}
-
-	public SCIDefault getSCIDefault() {
-		return sCIDefault;
-	}
-
-	public void raiseE() {
-		sCIDefault.raiseE();
-	}
-
-	public void raiseF() {
-		sCIDefault.raiseF();
-	}
-
-	public void raiseJc() {
-		sCIDefault.raiseJc();
-	}
-
-	public void raiseJd() {
-		sCIDefault.raiseJd();
-	}
-
-	public void enter() {
-		entryActionSyncJoin();
-		nextStateIndex = 0;
-		stateVector[0] = State.Main_region_B_r1_C1;
-
-		nextStateIndex = 1;
-		stateVector[1] = State.Main_region_B_r2_D1;
-
-	}
-
-	public void exit() {
-		//Handle exit of all possible states (of main region) at position 0...
-		switch (stateVector[0]) {
-
-			case Main_region_A :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			case Main_region_B_r1_C1 :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			case Main_region_B_r1_C2 :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			default :
-				break;
-		}
-		//Handle exit of all possible states (of main region) at position 1...
-		switch (stateVector[1]) {
-
-			case Main_region_B_r2_D1 :
-				stateVector[1] = State.$NullState$;
-
-				break;
-
-			case Main_region_B_r2_D2 :
-				stateVector[1] = State.$NullState$;
-
-				break;
-
-			default :
-				break;
-		}
-
-		exitActionSyncJoin();
-	}
-
-	private void entryActionSyncJoin() {
-
-	}
-
-	private void exitActionSyncJoin() {
-
-	}
-
-	private void reactMain_region_A() {
-		if ((sCIDefault.e || sCIDefault.f)) {
-			stateVector[0] = State.$NullState$;
-
-			nextStateIndex = 0;
-			stateVector[0] = State.Main_region_B_r1_C1;
-
-			nextStateIndex = 1;
-			stateVector[1] = State.Main_region_B_r2_D1;
-
-		}
-
-	}
-	private void reactMain_region_B() {
-	}
-	private void reactMain_region_B_r1_C1() {
-		if (sCIDefault.e) {
-			stateVector[0] = State.$NullState$;
-
-			nextStateIndex = 0;
-			stateVector[0] = State.Main_region_B_r1_C2;
-
-		}
-
-	}
-	private void reactMain_region_B_r1_C2() {
-		if (((sCIDefault.jc && isStateActive(State.Main_region_B_r2_D2)) && sCIDefault.jd)) {
-			//Handle exit of all possible states (of r1) at position 0...
-			switch (stateVector[0]) {
-
-				case Main_region_B_r1_C1 :
-					stateVector[0] = State.$NullState$;
-
-					break;
-
-				case Main_region_B_r1_C2 :
-					stateVector[0] = State.$NullState$;
-
-					break;
-
-				default :
-					break;
-			}
-
-			//Handle exit of all possible states (of r2) at position 1...
-			switch (stateVector[1]) {
-
-				case Main_region_B_r2_D1 :
-					stateVector[1] = State.$NullState$;
-
-					break;
-
-				case Main_region_B_r2_D2 :
-					stateVector[1] = State.$NullState$;
-
-					break;
-
-				default :
-					break;
-			}
-
-			react_sync0_();
-			react_sync0_();
-
-		}
-
-	}
-	private void reactMain_region_B_r2_D1() {
-		if (sCIDefault.f) {
-			stateVector[1] = State.$NullState$;
-
-			nextStateIndex = 1;
-			stateVector[1] = State.Main_region_B_r2_D2;
-
-		}
-	}
-	private void reactMain_region_B_r2_D2() {
-		if (((sCIDefault.jd && isStateActive(State.Main_region_B_r1_C2)) && sCIDefault.jc)) {
-			//Handle exit of all possible states (of r1) at position 0...
-			switch (stateVector[0]) {
-
-				case Main_region_B_r1_C1 :
-					stateVector[0] = State.$NullState$;
-
-					break;
-
-				case Main_region_B_r1_C2 :
-					stateVector[0] = State.$NullState$;
-
-					break;
-
-				default :
-					break;
-			}
-
-			//Handle exit of all possible states (of r2) at position 1...
-			switch (stateVector[1]) {
-
-				case Main_region_B_r2_D1 :
-					stateVector[1] = State.$NullState$;
-
-					break;
-
-				case Main_region_B_r2_D2 :
-					stateVector[1] = State.$NullState$;
-
-					break;
-
-				default :
-					break;
-			}
-
-			react_sync0_();
-			react_sync0_();
-
-		}
-	}
-	private void react_sync0_() {
-		nextStateIndex = 0;
-		stateVector[0] = State.Main_region_A;
-
-	}
-
-	public void runCycle() {
-
-		clearOutEvents();
-
-		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
-
-			switch (stateVector[nextStateIndex]) {
-				case Main_region_A :
-					reactMain_region_A();
-					break;
-				case Main_region_B :
-					reactMain_region_B();
-					break;
-				case Main_region_B_r1_C1 :
-					reactMain_region_B_r1_C1();
-					break;
-				case Main_region_B_r1_C2 :
-					reactMain_region_B_r1_C2();
-					break;
-				case Main_region_B_r2_D1 :
-					reactMain_region_B_r2_D1();
-					break;
-				case Main_region_B_r2_D2 :
-					reactMain_region_B_r2_D2();
-					break;
-				default :
-					// $NullState$
-			}
-		}
-
-		clearEvents();
-	}
-}
+package org.yakindu.scr.syncjoin;
+
+public class SyncJoinStatemachine implements ISyncJoinStatemachine {
+
+	private final class SCIDefaultImpl implements SCIDefault {
+
+		private boolean e;
+
+		public void raiseE() {
+			e = true;
+		}
+
+		private boolean f;
+
+		public void raiseF() {
+			f = true;
+		}
+
+		private boolean jc;
+
+		public void raiseJc() {
+			jc = true;
+		}
+
+		private boolean jd;
+
+		public void raiseJd() {
+			jd = true;
+		}
+
+		public void clearEvents() {
+			e = false;
+			f = false;
+			jc = false;
+			jd = false;
+		}
+
+	}
+
+	private SCIDefaultImpl sCIDefault;
+
+	public enum State {
+		Main_region_A, Main_region_B, Main_region_B_r1_C1, Main_region_B_r1_C2, Main_region_B_r2_D1, Main_region_B_r2_D2, $NullState$
+	};
+
+	private final State[] stateVector = new State[2];
+
+	private int nextStateIndex;
+
+	public SyncJoinStatemachine() {
+
+		sCIDefault = new SCIDefaultImpl();
+
+	}
+
+	public void init() {
+		for (int i = 0; i < 2; i++) {
+			stateVector[i] = State.$NullState$;
+		}
+
+		clearEvents();
+		clearOutEvents();
+	}
+
+	protected void clearEvents() {
+		sCIDefault.clearEvents();
+
+	}
+
+	protected void clearOutEvents() {
+	}
+
+	public boolean isStateActive(State state) {
+		switch (state) {
+
+			case Main_region_A :
+				return stateVector[0] == State.Main_region_A;
+
+			case Main_region_B :
+				return stateVector[0].ordinal() >= State.Main_region_B
+						.ordinal()
+						&& stateVector[0].ordinal() <= State.Main_region_B_r2_D2
+								.ordinal();
+
+			case Main_region_B_r1_C1 :
+				return stateVector[0] == State.Main_region_B_r1_C1;
+
+			case Main_region_B_r1_C2 :
+				return stateVector[0] == State.Main_region_B_r1_C2;
+
+			case Main_region_B_r2_D1 :
+				return stateVector[1] == State.Main_region_B_r2_D1;
+
+			case Main_region_B_r2_D2 :
+				return stateVector[1] == State.Main_region_B_r2_D2;
+
+			default :
+				return false;
+		}
+		/*
+		for (int i=0;i<stateVector.length;i++){
+			if (stateVector[i]==state) {
+				return true;
+			}
+		}
+		return false;
+		 */
+	}
+
+	public SCIDefault getSCIDefault() {
+		return sCIDefault;
+	}
+
+	public void raiseE() {
+		sCIDefault.raiseE();
+	}
+
+	public void raiseF() {
+		sCIDefault.raiseF();
+	}
+
+	public void raiseJc() {
+		sCIDefault.raiseJc();
+	}
+
+	public void raiseJd() {
+		sCIDefault.raiseJd();
+	}
+
+	public void enter() {
+		entryActionSyncJoin();
+		nextStateIndex = 0;
+		stateVector[0] = State.Main_region_B_r1_C1;
+
+		nextStateIndex = 1;
+		stateVector[1] = State.Main_region_B_r2_D1;
+
+	}
+
+	public void exit() {
+		//Handle exit of all possible states (of main region) at position 0...
+		switch (stateVector[0]) {
+
+			case Main_region_A :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			case Main_region_B_r1_C1 :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			case Main_region_B_r1_C2 :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			default :
+				break;
+		}
+		//Handle exit of all possible states (of main region) at position 1...
+		switch (stateVector[1]) {
+
+			case Main_region_B_r2_D1 :
+				stateVector[1] = State.$NullState$;
+
+				break;
+
+			case Main_region_B_r2_D2 :
+				stateVector[1] = State.$NullState$;
+
+				break;
+
+			default :
+				break;
+		}
+
+		exitActionSyncJoin();
+	}
+
+	private void entryActionSyncJoin() {
+
+	}
+
+	private void exitActionSyncJoin() {
+
+	}
+
+	private void reactMain_region_A() {
+		if ((sCIDefault.e || sCIDefault.f)) {
+			stateVector[0] = State.$NullState$;
+
+			nextStateIndex = 0;
+			stateVector[0] = State.Main_region_B_r1_C1;
+
+			nextStateIndex = 1;
+			stateVector[1] = State.Main_region_B_r2_D1;
+
+		}
+
+	}
+	private void reactMain_region_B() {
+	}
+	private void reactMain_region_B_r1_C1() {
+		if (sCIDefault.e) {
+			stateVector[0] = State.$NullState$;
+
+			nextStateIndex = 0;
+			stateVector[0] = State.Main_region_B_r1_C2;
+
+		}
+
+	}
+	private void reactMain_region_B_r1_C2() {
+		if (((sCIDefault.jc && isStateActive(State.Main_region_B_r2_D2)) && sCIDefault.jd)) {
+			//Handle exit of all possible states (of r1) at position 0...
+			switch (stateVector[0]) {
+
+				case Main_region_B_r1_C1 :
+					stateVector[0] = State.$NullState$;
+
+					break;
+
+				case Main_region_B_r1_C2 :
+					stateVector[0] = State.$NullState$;
+
+					break;
+
+				default :
+					break;
+			}
+
+			//Handle exit of all possible states (of r2) at position 1...
+			switch (stateVector[1]) {
+
+				case Main_region_B_r2_D1 :
+					stateVector[1] = State.$NullState$;
+
+					break;
+
+				case Main_region_B_r2_D2 :
+					stateVector[1] = State.$NullState$;
+
+					break;
+
+				default :
+					break;
+			}
+
+			react_sync0_();
+			react_sync0_();
+
+		}
+
+	}
+	private void reactMain_region_B_r2_D1() {
+		if (sCIDefault.f) {
+			stateVector[1] = State.$NullState$;
+
+			nextStateIndex = 1;
+			stateVector[1] = State.Main_region_B_r2_D2;
+
+		}
+	}
+	private void reactMain_region_B_r2_D2() {
+		if (((sCIDefault.jd && isStateActive(State.Main_region_B_r1_C2)) && sCIDefault.jc)) {
+			//Handle exit of all possible states (of r1) at position 0...
+			switch (stateVector[0]) {
+
+				case Main_region_B_r1_C1 :
+					stateVector[0] = State.$NullState$;
+
+					break;
+
+				case Main_region_B_r1_C2 :
+					stateVector[0] = State.$NullState$;
+
+					break;
+
+				default :
+					break;
+			}
+
+			//Handle exit of all possible states (of r2) at position 1...
+			switch (stateVector[1]) {
+
+				case Main_region_B_r2_D1 :
+					stateVector[1] = State.$NullState$;
+
+					break;
+
+				case Main_region_B_r2_D2 :
+					stateVector[1] = State.$NullState$;
+
+					break;
+
+				default :
+					break;
+			}
+
+			react_sync0_();
+			react_sync0_();
+
+		}
+	}
+	private void react_sync0_() {
+		nextStateIndex = 0;
+		stateVector[0] = State.Main_region_A;
+
+	}
+
+	public void runCycle() {
+
+		clearOutEvents();
+
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+
+			switch (stateVector[nextStateIndex]) {
+				case Main_region_A :
+					reactMain_region_A();
+					break;
+				case Main_region_B :
+					reactMain_region_B();
+					break;
+				case Main_region_B_r1_C1 :
+					reactMain_region_B_r1_C1();
+					break;
+				case Main_region_B_r1_C2 :
+					reactMain_region_B_r1_C2();
+					break;
+				case Main_region_B_r2_D1 :
+					reactMain_region_B_r2_D1();
+					break;
+				case Main_region_B_r2_D2 :
+					reactMain_region_B_r2_D2();
+					break;
+				default :
+					// $NullState$
+			}
+		}
+
+		clearEvents();
+	}
+}

+ 17 - 17
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/valuedevents/IValuedEventsStatemachine.java

@@ -1,17 +1,17 @@
-package org.yakindu.scr.valuedevents;
-
-import org.yakindu.scr.IStatemachine;
-
-public interface IValuedEventsStatemachine extends IStatemachine {
-
-	public interface SCIDefault {
-		public void raiseIntegerEvent(int value);
-
-		public int getMyVar();
-		public void setMyVar(int value);
-
-	}
-
-	public SCIDefault getSCIDefault();
-
-}
+package org.yakindu.scr.valuedevents;
+
+import org.yakindu.scr.IStatemachine;
+
+public interface IValuedEventsStatemachine extends IStatemachine {
+
+	public interface SCIDefault {
+		public void raiseIntegerEvent(int value);
+
+		public int getMyVar();
+		public void setMyVar(int value);
+
+	}
+
+	public SCIDefault getSCIDefault();
+
+}

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

@@ -1,206 +1,206 @@
-package org.yakindu.scr.valuedevents;
-
-public class ValuedEventsStatemachine implements IValuedEventsStatemachine {
-
-	private final class SCIDefaultImpl implements SCIDefault {
-
-		private boolean integerEvent;
-
-		private int integerEventValue;
-
-		public void raiseIntegerEvent(int value) {
-			integerEvent = true;
-			integerEventValue = value;
-		}
-
-		private int getIntegerEventValue() {
-			if (!integerEvent)
-				throw new IllegalStateException(
-						"Illegal event value acces. Event IntegerEvent is not raised!");
-			return integerEventValue;
-		}
-
-		private int myVar;
-
-		public int getMyVar() {
-			return myVar;
-		}
-
-		public void setMyVar(int value) {
-			this.myVar = value;
-		}
-
-		public void clearEvents() {
-			integerEvent = false;
-		}
-
-	}
-
-	private SCIDefaultImpl sCIDefault;
-
-	public enum State {
-		Main_region_A, _region1_B, _region1_C, $NullState$
-	};
-
-	private final State[] stateVector = new State[2];
-
-	private int nextStateIndex;
-
-	public ValuedEventsStatemachine() {
-
-		sCIDefault = new SCIDefaultImpl();
-
-	}
-
-	public void init() {
-		for (int i = 0; i < 2; i++) {
-			stateVector[i] = State.$NullState$;
-		}
-
-		clearEvents();
-		clearOutEvents();
-	}
-
-	protected void clearEvents() {
-		sCIDefault.clearEvents();
-
-	}
-
-	protected void clearOutEvents() {
-	}
-
-	public boolean isStateActive(State state) {
-		switch (state) {
-
-			case Main_region_A :
-				return stateVector[0] == State.Main_region_A;
-
-			case _region1_B :
-				return stateVector[1] == State._region1_B;
-
-			case _region1_C :
-				return stateVector[1] == State._region1_C;
-
-			default :
-				return false;
-		}
-		/*
-		for (int i=0;i<stateVector.length;i++){
-			if (stateVector[i]==state) {
-				return true;
-			}
-		}
-		return false;
-		 */
-	}
-
-	public SCIDefault getSCIDefault() {
-		return sCIDefault;
-	}
-
-	public void raiseIntegerEvent(int value) {
-		sCIDefault.raiseIntegerEvent(value);
-	}
-
-	public int getMyVar() {
-		return sCIDefault.getMyVar();
-	}
-
-	public void setMyVar(int value) {
-		sCIDefault.setMyVar(value);
-	}
-
-	public void enter() {
-		entryActionValuedEvents();
-		sCIDefault.raiseIntegerEvent((2 * 21));
-
-		nextStateIndex = 0;
-		stateVector[0] = State.Main_region_A;
-
-		nextStateIndex = 1;
-		stateVector[1] = State._region1_B;
-
-	}
-
-	public void exit() {
-		//Handle exit of all possible states (of main region) at position 0...
-		switch (stateVector[0]) {
-
-			case Main_region_A :
-				stateVector[0] = State.$NullState$;
-
-				break;
-
-			default :
-				break;
-		}
-
-		//Handle exit of all possible states (of region1) at position 1...
-		switch (stateVector[1]) {
-
-			case _region1_B :
-				stateVector[1] = State.$NullState$;
-
-				break;
-
-			case _region1_C :
-				stateVector[1] = State.$NullState$;
-
-				break;
-
-			default :
-				break;
-		}
-
-		exitActionValuedEvents();
-	}
-
-	private void entryActionValuedEvents() {
-
-	}
-
-	private void exitActionValuedEvents() {
-
-	}
-
-	private void reactMain_region_A() {
-
-	}
-	private void react_region1_B() {
-		if (sCIDefault.integerEvent) {
-			stateVector[1] = State.$NullState$;
-
-			sCIDefault.myVar = sCIDefault.integerEventValue;
-
-			nextStateIndex = 1;
-			stateVector[1] = State._region1_C;
-
-		}
-	}
-	private void react_region1_C() {
-	}
-
-	public void runCycle() {
-
-		clearOutEvents();
-
-		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
-
-			switch (stateVector[nextStateIndex]) {
-				case Main_region_A :
-					reactMain_region_A();
-					break;
-				case _region1_B :
-					react_region1_B();
-					break;
-				case _region1_C :
-					react_region1_C();
-					break;
-				default :
-					// $NullState$
-			}
-		}
-
-		clearEvents();
-	}
-}
+package org.yakindu.scr.valuedevents;
+
+public class ValuedEventsStatemachine implements IValuedEventsStatemachine {
+
+	private final class SCIDefaultImpl implements SCIDefault {
+
+		private boolean integerEvent;
+
+		private int integerEventValue;
+
+		public void raiseIntegerEvent(int value) {
+			integerEvent = true;
+			integerEventValue = value;
+		}
+
+		private int getIntegerEventValue() {
+			if (!integerEvent)
+				throw new IllegalStateException(
+						"Illegal event value acces. Event IntegerEvent is not raised!");
+			return integerEventValue;
+		}
+
+		private int myVar;
+
+		public int getMyVar() {
+			return myVar;
+		}
+
+		public void setMyVar(int value) {
+			this.myVar = value;
+		}
+
+		public void clearEvents() {
+			integerEvent = false;
+		}
+
+	}
+
+	private SCIDefaultImpl sCIDefault;
+
+	public enum State {
+		Main_region_A, _region1_B, _region1_C, $NullState$
+	};
+
+	private final State[] stateVector = new State[2];
+
+	private int nextStateIndex;
+
+	public ValuedEventsStatemachine() {
+
+		sCIDefault = new SCIDefaultImpl();
+
+	}
+
+	public void init() {
+		for (int i = 0; i < 2; i++) {
+			stateVector[i] = State.$NullState$;
+		}
+
+		clearEvents();
+		clearOutEvents();
+	}
+
+	protected void clearEvents() {
+		sCIDefault.clearEvents();
+
+	}
+
+	protected void clearOutEvents() {
+	}
+
+	public boolean isStateActive(State state) {
+		switch (state) {
+
+			case Main_region_A :
+				return stateVector[0] == State.Main_region_A;
+
+			case _region1_B :
+				return stateVector[1] == State._region1_B;
+
+			case _region1_C :
+				return stateVector[1] == State._region1_C;
+
+			default :
+				return false;
+		}
+		/*
+		for (int i=0;i<stateVector.length;i++){
+			if (stateVector[i]==state) {
+				return true;
+			}
+		}
+		return false;
+		 */
+	}
+
+	public SCIDefault getSCIDefault() {
+		return sCIDefault;
+	}
+
+	public void raiseIntegerEvent(int value) {
+		sCIDefault.raiseIntegerEvent(value);
+	}
+
+	public int getMyVar() {
+		return sCIDefault.getMyVar();
+	}
+
+	public void setMyVar(int value) {
+		sCIDefault.setMyVar(value);
+	}
+
+	public void enter() {
+		entryActionValuedEvents();
+		sCIDefault.raiseIntegerEvent((2 * 21));
+
+		nextStateIndex = 0;
+		stateVector[0] = State.Main_region_A;
+
+		nextStateIndex = 1;
+		stateVector[1] = State._region1_B;
+
+	}
+
+	public void exit() {
+		//Handle exit of all possible states (of main region) at position 0...
+		switch (stateVector[0]) {
+
+			case Main_region_A :
+				stateVector[0] = State.$NullState$;
+
+				break;
+
+			default :
+				break;
+		}
+
+		//Handle exit of all possible states (of region1) at position 1...
+		switch (stateVector[1]) {
+
+			case _region1_B :
+				stateVector[1] = State.$NullState$;
+
+				break;
+
+			case _region1_C :
+				stateVector[1] = State.$NullState$;
+
+				break;
+
+			default :
+				break;
+		}
+
+		exitActionValuedEvents();
+	}
+
+	private void entryActionValuedEvents() {
+
+	}
+
+	private void exitActionValuedEvents() {
+
+	}
+
+	private void reactMain_region_A() {
+
+	}
+	private void react_region1_B() {
+		if (sCIDefault.integerEvent) {
+			stateVector[1] = State.$NullState$;
+
+			sCIDefault.myVar = sCIDefault.integerEventValue;
+
+			nextStateIndex = 1;
+			stateVector[1] = State._region1_C;
+
+		}
+	}
+	private void react_region1_C() {
+	}
+
+	public void runCycle() {
+
+		clearOutEvents();
+
+		for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) {
+
+			switch (stateVector[nextStateIndex]) {
+				case Main_region_A :
+					reactMain_region_A();
+					break;
+				case _region1_B :
+					react_region1_B();
+					break;
+				case _region1_C :
+					react_region1_C();
+					break;
+				default :
+					// $NullState$
+			}
+		}
+
+		clearEvents();
+	}
+}

+ 29 - 0
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/AllTestsTest.java

@@ -0,0 +1,29 @@
+/**
+ * Copyright (c) 2012 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.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(Suite.class)
+@SuiteClasses({AlwaysOncycleTest.class, BitExpressionsTest.class,
+		BooleanExpressionsTest.class, CKeywordsTest.class, ChoiceTest.class,
+		DeepHistoryTest.class, ExitOnSelfTransitionTest.class, GuardTest.class,
+		GuardedEntryTest.class, GuardedExitTest.class,
+		IntegerExpressionsTest.class, InternalEventLifeCycleTest.class,
+		PriorityValuesTest.class, RaiseEventTest.class,
+		SameNameDifferentRegionTest.class, ShallowHistoryTest.class,
+		SimpleHietachyTest.class, StateIsActiveTest.class,
+		StatechartLocalReactionsTest.class, StringExpressionsTest.class,
+		SyncForkTest.class, SyncJoinTest.class, ValuedEventTest.class,
+		SimpleEventTest.class})
+public class AllTestsTest {
+}

+ 55 - 55
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/AlwaysOncycleTest.java

@@ -1,55 +1,55 @@
-/**
- * Copyright (c) 2012 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.alwaysoncycle.AlwaysOncycleStatemachine;
-import org.yakindu.scr.alwaysoncycle.AlwaysOncycleStatemachine.State;
-/**
- *  Unit TestCase for AlwaysOncycle
- */
-@SuppressWarnings("all")
-public class AlwaysOncycleTest {
-
-	private AlwaysOncycleStatemachine statemachine;
-
-	@Before
-	public void setUp() {
-		statemachine = new AlwaysOncycleStatemachine();
-		statemachine.init();
-		statemachine.enter();
-	}
-
-	@After
-	public void tearDown() {
-		statemachine = null;
-	}
-
-	@Test
-	public void testalwaysOncycleTest() {
-		assertTrue(statemachine.isStateActive(State.Main_region_StateA));
-		while (statemachine.getValue() < 5) {
-			statemachine.runCycle();
-			assertTrue(statemachine.isStateActive(State.Main_region_StateA));
-		}
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_StateB));
-		while (statemachine.getValue() < 5) {
-			statemachine.runCycle();
-			assertTrue(statemachine.isStateActive(State.Main_region_StateB));
-		}
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_StateA));
-	}
-}
+/**
+ * Copyright (c) 2012 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.alwaysoncycle.AlwaysOncycleStatemachine;
+import org.yakindu.scr.alwaysoncycle.AlwaysOncycleStatemachine.State;
+/**
+ *  Unit TestCase for AlwaysOncycle
+ */
+@SuppressWarnings("all")
+public class AlwaysOncycleTest {
+
+	private AlwaysOncycleStatemachine statemachine;
+
+	@Before
+	public void setUp() {
+		statemachine = new AlwaysOncycleStatemachine();
+		statemachine.init();
+		statemachine.enter();
+	}
+
+	@After
+	public void tearDown() {
+		statemachine = null;
+	}
+
+	@Test
+	public void testalwaysOncycleTest() {
+		assertTrue(statemachine.isStateActive(State.Main_region_StateA));
+		while (statemachine.getValue() < 5) {
+			statemachine.runCycle();
+			assertTrue(statemachine.isStateActive(State.Main_region_StateA));
+		}
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_StateB));
+		while (statemachine.getValue() < 5) {
+			statemachine.runCycle();
+			assertTrue(statemachine.isStateActive(State.Main_region_StateB));
+		}
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_StateA));
+	}
+}

+ 54 - 54
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/BitExpressionsTest.java

@@ -1,54 +1,54 @@
-/**
- * Copyright (c) 2012 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.bitexpressions.BitExpressionsStatemachine;
-import org.yakindu.scr.bitexpressions.BitExpressionsStatemachine.State;
-/**
- *  Unit TestCase for BitExpressions
- */
-@SuppressWarnings("all")
-public class BitExpressionsTest {
-
-	private BitExpressionsStatemachine statemachine;
-
-	@Before
-	public void setUp() {
-		statemachine = new BitExpressionsStatemachine();
-		statemachine.init();
-		statemachine.enter();
-	}
-
-	@After
-	public void tearDown() {
-		statemachine = null;
-	}
-
-	@Test
-	public void testBitExpressions() {
-		assertTrue(statemachine.isStateActive(State.Main_region_StateA));
-		assertTrue(statemachine.getMyBit1() == 5);
-		assertTrue(statemachine.getMyBit2() == 7);
-		statemachine.raiseE1();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_StateB));
-		assertTrue(statemachine.getLeftBitshift() == 10);
-		assertTrue(statemachine.getRightBitshift() == 2);
-		assertTrue(statemachine.getComplementBitshift() == -6);
-		assertTrue(statemachine.getBitwiseAnd() == 5);
-		assertTrue(statemachine.getBitwiseOr() == 7);
-		assertTrue(statemachine.getBitwiseXor() == 2);
-	}
-}
+/**
+ * Copyright (c) 2012 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.bitexpressions.BitExpressionsStatemachine;
+import org.yakindu.scr.bitexpressions.BitExpressionsStatemachine.State;
+/**
+ *  Unit TestCase for BitExpressions
+ */
+@SuppressWarnings("all")
+public class BitExpressionsTest {
+
+	private BitExpressionsStatemachine statemachine;
+
+	@Before
+	public void setUp() {
+		statemachine = new BitExpressionsStatemachine();
+		statemachine.init();
+		statemachine.enter();
+	}
+
+	@After
+	public void tearDown() {
+		statemachine = null;
+	}
+
+	@Test
+	public void testBitExpressions() {
+		assertTrue(statemachine.isStateActive(State.Main_region_StateA));
+		assertTrue(statemachine.getMyBit1() == 5);
+		assertTrue(statemachine.getMyBit2() == 7);
+		statemachine.raiseE1();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_StateB));
+		assertTrue(statemachine.getLeftBitshift() == 10);
+		assertTrue(statemachine.getRightBitshift() == 2);
+		assertTrue(statemachine.getComplementBitshift() == -6);
+		assertTrue(statemachine.getBitwiseAnd() == 5);
+		assertTrue(statemachine.getBitwiseOr() == 7);
+		assertTrue(statemachine.getBitwiseXor() == 2);
+	}
+}

+ 53 - 53
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/BooleanExpressionsTest.java

@@ -1,53 +1,53 @@
-/**
- * Copyright (c) 2012 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.booleanexpressions.BooleanExpressionsStatemachine;
-import org.yakindu.scr.booleanexpressions.BooleanExpressionsStatemachine.State;
-/**
- *  Unit TestCase for BooleanExpressions
- */
-@SuppressWarnings("all")
-public class BooleanExpressionsTest {
-
-	private BooleanExpressionsStatemachine statemachine;
-
-	@Before
-	public void setUp() {
-		statemachine = new BooleanExpressionsStatemachine();
-		statemachine.init();
-		statemachine.enter();
-	}
-
-	@After
-	public void tearDown() {
-		statemachine = null;
-	}
-
-	@Test
-	public void testbooleanExpressions() {
-		assertTrue(statemachine.isStateActive(State.Main_region_StateA));
-		assertTrue(statemachine.getMyBool1() == true);
-		assertTrue(statemachine.getMyBool2() == false);
-		statemachine.raiseE1();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_StateB));
-		assertTrue(statemachine.getAnd() == false);
-		assertTrue(statemachine.getOr() == true);
-		assertTrue(statemachine.getNot() == false);
-		assertTrue(statemachine.getEqual() == false);
-		assertTrue(statemachine.getNotequal() == true);
-	}
-}
+/**
+ * Copyright (c) 2012 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.booleanexpressions.BooleanExpressionsStatemachine;
+import org.yakindu.scr.booleanexpressions.BooleanExpressionsStatemachine.State;
+/**
+ *  Unit TestCase for BooleanExpressions
+ */
+@SuppressWarnings("all")
+public class BooleanExpressionsTest {
+
+	private BooleanExpressionsStatemachine statemachine;
+
+	@Before
+	public void setUp() {
+		statemachine = new BooleanExpressionsStatemachine();
+		statemachine.init();
+		statemachine.enter();
+	}
+
+	@After
+	public void tearDown() {
+		statemachine = null;
+	}
+
+	@Test
+	public void testbooleanExpressions() {
+		assertTrue(statemachine.isStateActive(State.Main_region_StateA));
+		assertTrue(statemachine.getMyBool1() == true);
+		assertTrue(statemachine.getMyBool2() == false);
+		statemachine.raiseE1();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_StateB));
+		assertTrue(statemachine.getAnd() == false);
+		assertTrue(statemachine.getOr() == true);
+		assertTrue(statemachine.getNot() == false);
+		assertTrue(statemachine.getEqual() == false);
+		assertTrue(statemachine.getNotequal() == true);
+	}
+}

+ 49 - 0
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/CKeywordsTest.java

@@ -0,0 +1,49 @@
+/**
+ * Copyright (c) 2012 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.ckeywords.CKeywordsStatemachine;
+import org.yakindu.scr.ckeywords.CKeywordsStatemachine.State;
+/**
+ *  Unit TestCase for CKeywords
+ */
+@SuppressWarnings("all")
+public class CKeywordsTest {
+
+	private CKeywordsStatemachine statemachine;
+
+	@Before
+	public void setUp() {
+		statemachine = new CKeywordsStatemachine();
+		statemachine.init();
+		statemachine.enter();
+	}
+
+	@After
+	public void tearDown() {
+		statemachine = null;
+	}
+
+	@Test
+	public void testCKeywordsTest() {
+		assertTrue(statemachine.isStateActive(State.Auto_char));
+		statemachine.raiseAuto();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Auto_const));
+		assertTrue(statemachine.isStateActive(State.Auto_const_switch_case));
+		assertTrue(statemachine
+				.isStateActive(State.Auto_const_switch_case_enum_asm));
+	}
+}

+ 70 - 70
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/ChoiceTest.java

@@ -1,70 +1,70 @@
-/**
- * Copyright (c) 2012 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.choice.ChoiceStatemachine;
-import org.yakindu.scr.choice.ChoiceStatemachine.State;
-/**
- *  Unit TestCase for Choice
- */
-@SuppressWarnings("all")
-public class ChoiceTest {
-
-	private ChoiceStatemachine statemachine;
-
-	@Before
-	public void setUp() {
-		statemachine = new ChoiceStatemachine();
-		statemachine.init();
-		statemachine.enter();
-	}
-
-	@After
-	public void tearDown() {
-		statemachine = null;
-	}
-
-	@Test
-	public void testchoiceTest() {
-		assertTrue(statemachine.isStateActive(State.Main_region_A));
-		assertTrue(statemachine.getValue() == 4);
-		statemachine.raisePressKey();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_B));
-		assertTrue(statemachine.getValue() == 3);
-		statemachine.raisePressKey();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_A));
-		statemachine.raisePressKey();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_C));
-		assertTrue(statemachine.getValue() == 2);
-		statemachine.raisePressKey();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_B));
-		assertTrue(statemachine.getValue() == 1);
-		statemachine.raisePressKey();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_A));
-		assertTrue(statemachine.getValue() == 1);
-		statemachine.raisePressKey();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_C));
-		assertTrue(statemachine.getValue() == 0);
-		statemachine.raisePressKey();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_A));
-	}
-}
+/**
+ * Copyright (c) 2012 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.choice.ChoiceStatemachine;
+import org.yakindu.scr.choice.ChoiceStatemachine.State;
+/**
+ *  Unit TestCase for Choice
+ */
+@SuppressWarnings("all")
+public class ChoiceTest {
+
+	private ChoiceStatemachine statemachine;
+
+	@Before
+	public void setUp() {
+		statemachine = new ChoiceStatemachine();
+		statemachine.init();
+		statemachine.enter();
+	}
+
+	@After
+	public void tearDown() {
+		statemachine = null;
+	}
+
+	@Test
+	public void testchoiceTest() {
+		assertTrue(statemachine.isStateActive(State.Main_region_A));
+		assertTrue(statemachine.getValue() == 4);
+		statemachine.raisePressKey();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_B));
+		assertTrue(statemachine.getValue() == 3);
+		statemachine.raisePressKey();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_A));
+		statemachine.raisePressKey();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_C));
+		assertTrue(statemachine.getValue() == 2);
+		statemachine.raisePressKey();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_B));
+		assertTrue(statemachine.getValue() == 1);
+		statemachine.raisePressKey();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_A));
+		assertTrue(statemachine.getValue() == 1);
+		statemachine.raisePressKey();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_C));
+		assertTrue(statemachine.getValue() == 0);
+		statemachine.raisePressKey();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_A));
+	}
+}

+ 63 - 63
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/DeepHistoryTest.java

@@ -1,63 +1,63 @@
-/**
- * Copyright (c) 2012 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.deephistory.DeepHistoryStatemachine;
-import org.yakindu.scr.deephistory.DeepHistoryStatemachine.State;
-/**
- *  Unit TestCase for DeepHistory
- */
-@SuppressWarnings("all")
-public class DeepHistoryTest {
-
-	private DeepHistoryStatemachine statemachine;
-
-	@Before
-	public void setUp() {
-		statemachine = new DeepHistoryStatemachine();
-		statemachine.init();
-		statemachine.enter();
-	}
-
-	@After
-	public void tearDown() {
-		statemachine = null;
-	}
-
-	@Test
-	public void testdeepHistoryTest() {
-		statemachine.raiseEvent1();
-		statemachine.runCycle();
-		statemachine.raiseEvent3();
-		statemachine.runCycle();
-		statemachine.raiseEvent5();
-		statemachine.runCycle();
-		statemachine.raiseEvent7();
-		statemachine.runCycle();
-		assertTrue(!statemachine.isStateActive(State.MainRegion_State1));
-		assertTrue(statemachine
-				.isStateActive(State.MainRegion_State2__region0_State4__region0_State7__region0_State9));
-		statemachine.raiseEvent2();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.MainRegion_State1));
-		assertTrue(!statemachine
-				.isStateActive(State.MainRegion_State2__region0_State4__region0_State7__region0_State9));
-		statemachine.raiseEvent1();
-		statemachine.runCycle();
-		assertTrue(!statemachine.isStateActive(State.MainRegion_State1));
-		assertTrue(statemachine
-				.isStateActive(State.MainRegion_State2__region0_State4__region0_State7__region0_State9));
-	}
-}
+/**
+ * Copyright (c) 2012 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.deephistory.DeepHistoryStatemachine;
+import org.yakindu.scr.deephistory.DeepHistoryStatemachine.State;
+/**
+ *  Unit TestCase for DeepHistory
+ */
+@SuppressWarnings("all")
+public class DeepHistoryTest {
+
+	private DeepHistoryStatemachine statemachine;
+
+	@Before
+	public void setUp() {
+		statemachine = new DeepHistoryStatemachine();
+		statemachine.init();
+		statemachine.enter();
+	}
+
+	@After
+	public void tearDown() {
+		statemachine = null;
+	}
+
+	@Test
+	public void testdeepHistoryTest() {
+		statemachine.raiseEvent1();
+		statemachine.runCycle();
+		statemachine.raiseEvent3();
+		statemachine.runCycle();
+		statemachine.raiseEvent5();
+		statemachine.runCycle();
+		statemachine.raiseEvent7();
+		statemachine.runCycle();
+		assertTrue(!statemachine.isStateActive(State.MainRegion_State1));
+		assertTrue(statemachine
+				.isStateActive(State.MainRegion_State2__region0_State4__region0_State7__region0_State9));
+		statemachine.raiseEvent2();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.MainRegion_State1));
+		assertTrue(!statemachine
+				.isStateActive(State.MainRegion_State2__region0_State4__region0_State7__region0_State9));
+		statemachine.raiseEvent1();
+		statemachine.runCycle();
+		assertTrue(!statemachine.isStateActive(State.MainRegion_State1));
+		assertTrue(statemachine
+				.isStateActive(State.MainRegion_State2__region0_State4__region0_State7__region0_State9));
+	}
+}

+ 53 - 0
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/ExitOnSelfTransitionTest.java

@@ -0,0 +1,53 @@
+/**
+ * Copyright (c) 2012 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.exitonselftransition.ExitOnSelfTransitionStatemachine;
+import org.yakindu.scr.exitonselftransition.ExitOnSelfTransitionStatemachine.State;
+/**
+ *  Unit TestCase for ExitOnSelfTransition
+ */
+@SuppressWarnings("all")
+public class ExitOnSelfTransitionTest {
+
+	private ExitOnSelfTransitionStatemachine statemachine;
+
+	@Before
+	public void setUp() {
+		statemachine = new ExitOnSelfTransitionStatemachine();
+		statemachine.init();
+		statemachine.enter();
+	}
+
+	@After
+	public void tearDown() {
+		statemachine = null;
+	}
+
+	@Test
+	public void testExitOnSelfTransitionTest() {
+		assertTrue(statemachine.isStateActive(State.Main_region_A));
+		assertTrue(statemachine.getEntryCount() == 1);
+		assertTrue(statemachine.getExitCount() == 0);
+		statemachine.raiseE();
+		statemachine.runCycle();
+		assertTrue(statemachine.getEntryCount() == 2);
+		assertTrue(statemachine.getExitCount() == 1);
+		statemachine.raiseF();
+		statemachine.runCycle();
+		assertTrue(statemachine.getEntryCount() == 2);
+		assertTrue(statemachine.getExitCount() == 2);
+	}
+}

+ 58 - 58
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/GuardTest.java

@@ -1,58 +1,58 @@
-/**
- * Copyright (c) 2012 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.guard.GuardStatemachine;
-import org.yakindu.scr.guard.GuardStatemachine.State;
-/**
- *  Unit TestCase for Guard
- */
-@SuppressWarnings("all")
-public class GuardTest {
-
-	private GuardStatemachine statemachine;
-
-	@Before
-	public void setUp() {
-		statemachine = new GuardStatemachine();
-		statemachine.init();
-		statemachine.enter();
-	}
-
-	@After
-	public void tearDown() {
-		statemachine = null;
-	}
-
-	@Test
-	public void testguardTest() {
-		assertTrue(statemachine.isStateActive(State.Main_region_A));
-		statemachine.raiseEvent1();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_A));
-		statemachine.raiseEvent2();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_B));
-		statemachine.raiseReturn();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_A));
-		statemachine.raiseEvent1();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_B));
-		statemachine.raiseReturn();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_A));
-	}
-}
+/**
+ * Copyright (c) 2012 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.guard.GuardStatemachine;
+import org.yakindu.scr.guard.GuardStatemachine.State;
+/**
+ *  Unit TestCase for Guard
+ */
+@SuppressWarnings("all")
+public class GuardTest {
+
+	private GuardStatemachine statemachine;
+
+	@Before
+	public void setUp() {
+		statemachine = new GuardStatemachine();
+		statemachine.init();
+		statemachine.enter();
+	}
+
+	@After
+	public void tearDown() {
+		statemachine = null;
+	}
+
+	@Test
+	public void testguardTest() {
+		assertTrue(statemachine.isStateActive(State.Main_region_A));
+		statemachine.raiseEvent1();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_A));
+		statemachine.raiseEvent2();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_B));
+		statemachine.raiseReturn();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_A));
+		statemachine.raiseEvent1();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_B));
+		statemachine.raiseReturn();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_A));
+	}
+}

+ 79 - 0
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/GuardedEntryTest.java

@@ -0,0 +1,79 @@
+/**
+ * Copyright (c) 2012 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.guardedentry.GuardedEntryStatemachine;
+import org.yakindu.scr.guardedentry.GuardedEntryStatemachine.State;
+/**
+ *  Unit TestCase for GuardedEntry
+ */
+@SuppressWarnings("all")
+public class GuardedEntryTest {
+
+	private GuardedEntryStatemachine statemachine;
+
+	@Before
+	public void setUp() {
+		statemachine = new GuardedEntryStatemachine();
+		statemachine.init();
+		statemachine.enter();
+	}
+
+	@After
+	public void tearDown() {
+		statemachine = null;
+	}
+
+	@Test
+	public void testEntryNotTakenOnStatechartEnter() {
+		assertTrue(statemachine.isStateActive(State.Main_region_A));
+		assertTrue(statemachine.getDone() == false);
+	}
+	@Test
+	public void testEntryTakenOnStatechartEnter() {
+		statemachine.setGuard(true);
+		assertTrue(
+				"sctunit does not allow modifiing variables before entering the state machine!",
+				false);
+		assertTrue(statemachine.isStateActive(State.Main_region_A));
+		assertTrue(statemachine.getDone() == true);
+	}
+	@Test
+	public void testEntryTakenInTransition() {
+		assertTrue(statemachine.isStateActive(State.Main_region_A));
+		statemachine.raiseE();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_B));
+		statemachine.setGuard(true);
+		statemachine.setDone(false);
+		statemachine.raiseE();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_A));
+		assertTrue(statemachine.getDone());
+	}
+	@Test
+	public void testEntryNotTakenInTransition() {
+		assertTrue(statemachine.isStateActive(State.Main_region_A));
+		statemachine.raiseE();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_B));
+		statemachine.setGuard(false);
+		statemachine.setDone(false);
+		statemachine.raiseE();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_A));
+		assertTrue(!statemachine.getDone());
+	}
+}

+ 57 - 0
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/GuardedExitTest.java

@@ -0,0 +1,57 @@
+/**
+ * Copyright (c) 2012 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.guardedexit.GuardedExitStatemachine;
+import org.yakindu.scr.guardedexit.GuardedExitStatemachine.State;
+/**
+ *  Unit TestCase for GuardedExit
+ */
+@SuppressWarnings("all")
+public class GuardedExitTest {
+
+	private GuardedExitStatemachine statemachine;
+
+	@Before
+	public void setUp() {
+		statemachine = new GuardedExitStatemachine();
+		statemachine.init();
+		statemachine.enter();
+	}
+
+	@After
+	public void tearDown() {
+		statemachine = null;
+	}
+
+	@Test
+	public void testExitTaken() {
+		assertTrue(statemachine.isStateActive(State.Main_region_A));
+		assertTrue(!statemachine.getGuard());
+		statemachine.raiseE();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_B));
+		assertTrue(!statemachine.getDone());
+	}
+	@Test
+	public void testExitNotTaken() {
+		assertTrue(statemachine.isStateActive(State.Main_region_A));
+		statemachine.setGuard(true);
+		statemachine.raiseE();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_B));
+		assertTrue(statemachine.getDone());
+	}
+}

+ 64 - 64
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/IntegerExpressionsTest.java

@@ -1,64 +1,64 @@
-/**
- * Copyright (c) 2012 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.integerexpressions.IntegerExpressionsStatemachine;
-import org.yakindu.scr.integerexpressions.IntegerExpressionsStatemachine.State;
-/**
- *  Unit TestCase for IntegerExpressions
- */
-@SuppressWarnings("all")
-public class IntegerExpressionsTest {
-
-	private IntegerExpressionsStatemachine statemachine;
-
-	@Before
-	public void setUp() {
-		statemachine = new IntegerExpressionsStatemachine();
-		statemachine.init();
-		statemachine.enter();
-	}
-
-	@After
-	public void tearDown() {
-		statemachine = null;
-	}
-
-	@Test
-	public void testintegerExpressions() {
-		assertTrue(statemachine.isStateActive(State.Main_region_StateA));
-		assertTrue(statemachine.getMyInt1() == 10);
-		assertTrue(statemachine.getMyInt2() == 5);
-		statemachine.raiseE1();
-		statemachine.runCycle();
-		assertTrue(statemachine.getLess() == false);
-		assertTrue(statemachine.getGreater() == true);
-		assertTrue(statemachine.getEqualOrLess() == false);
-		assertTrue(statemachine.getEqualOrGreater() == true);
-		assertTrue(statemachine.getEqual() == false);
-		assertTrue(statemachine.getNotEqual() == true);
-		assertTrue(statemachine.getPlus() == 15);
-		assertTrue(statemachine.getMinus() == 5);
-		assertTrue(statemachine.getMultiply() == 50);
-		assertTrue(statemachine.getDivision() == 2);
-		assertTrue(statemachine.getModulo() == 0);
-		assertTrue(statemachine.getNegat() == -10);
-		assertTrue(statemachine.getMultiAssign() == 20);
-		assertTrue(statemachine.getDivAssign() == 2);
-		assertTrue(statemachine.getPlusAssign() == 12);
-		assertTrue(statemachine.getMinusAssign() == -8);
-		assertTrue(statemachine.getModuloAssign() == 0);
-	}
-}
+/**
+ * Copyright (c) 2012 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.integerexpressions.IntegerExpressionsStatemachine;
+import org.yakindu.scr.integerexpressions.IntegerExpressionsStatemachine.State;
+/**
+ *  Unit TestCase for IntegerExpressions
+ */
+@SuppressWarnings("all")
+public class IntegerExpressionsTest {
+
+	private IntegerExpressionsStatemachine statemachine;
+
+	@Before
+	public void setUp() {
+		statemachine = new IntegerExpressionsStatemachine();
+		statemachine.init();
+		statemachine.enter();
+	}
+
+	@After
+	public void tearDown() {
+		statemachine = null;
+	}
+
+	@Test
+	public void testintegerExpressions() {
+		assertTrue(statemachine.isStateActive(State.Main_region_StateA));
+		assertTrue(statemachine.getMyInt1() == 10);
+		assertTrue(statemachine.getMyInt2() == 5);
+		statemachine.raiseE1();
+		statemachine.runCycle();
+		assertTrue(statemachine.getLess() == false);
+		assertTrue(statemachine.getGreater() == true);
+		assertTrue(statemachine.getEqualOrLess() == false);
+		assertTrue(statemachine.getEqualOrGreater() == true);
+		assertTrue(statemachine.getEqual() == false);
+		assertTrue(statemachine.getNotEqual() == true);
+		assertTrue(statemachine.getPlus() == 15);
+		assertTrue(statemachine.getMinus() == 5);
+		assertTrue(statemachine.getMultiply() == 50);
+		assertTrue(statemachine.getDivision() == 2);
+		assertTrue(statemachine.getModulo() == 0);
+		assertTrue(statemachine.getNegat() == -10);
+		assertTrue(statemachine.getMultiAssign() == 20);
+		assertTrue(statemachine.getDivAssign() == 2);
+		assertTrue(statemachine.getPlusAssign() == 12);
+		assertTrue(statemachine.getMinusAssign() == -8);
+		assertTrue(statemachine.getModuloAssign() == 0);
+	}
+}

+ 58 - 0
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/InternalEventLifeCycleTest.java

@@ -0,0 +1,58 @@
+/**
+ * Copyright (c) 2012 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.internaleventlifecycle.InternalEventLifeCycleStatemachine;
+import org.yakindu.scr.internaleventlifecycle.InternalEventLifeCycleStatemachine.State;
+/**
+ *  Unit TestCase for InternalEventLifeCycle
+ */
+@SuppressWarnings("all")
+public class InternalEventLifeCycleTest {
+
+	private InternalEventLifeCycleStatemachine statemachine;
+
+	@Before
+	public void setUp() {
+		statemachine = new InternalEventLifeCycleStatemachine();
+		statemachine.init();
+		statemachine.enter();
+	}
+
+	@After
+	public void tearDown() {
+		statemachine = null;
+	}
+
+	@Test
+	public void testInternalEventLifeCycleTest() {
+		assertTrue(statemachine.isStateActive(State.R1_A));
+		assertTrue(statemachine.isStateActive(State.R2_C));
+		statemachine.raiseE();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.R1_A));
+		assertTrue(statemachine.isStateActive(State.R2_D));
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.R1_A));
+		assertTrue(statemachine.isStateActive(State.R2_D));
+		statemachine.raiseF();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.R1_A));
+		assertTrue(statemachine.isStateActive(State.R2_C));
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.R1_A));
+		assertTrue(statemachine.isStateActive(State.R2_C));
+	}
+}

+ 54 - 54
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/PriorityValuesTest.java

@@ -1,54 +1,54 @@
-/**
- * Copyright (c) 2012 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.priorityvalues.PriorityValuesStatemachine;
-import org.yakindu.scr.priorityvalues.PriorityValuesStatemachine.State;
-/**
- *  Unit TestCase for PriorityValues
- */
-@SuppressWarnings("all")
-public class PriorityValuesTest {
-
-	private PriorityValuesStatemachine statemachine;
-
-	@Before
-	public void setUp() {
-		statemachine = new PriorityValuesStatemachine();
-		statemachine.init();
-		statemachine.enter();
-	}
-
-	@After
-	public void tearDown() {
-		statemachine = null;
-	}
-
-	@Test
-	public void testtransitionPriority() {
-		assertTrue(statemachine.isStateActive(State.Main_region_A));
-		statemachine.raiseEvent1();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_C));
-	}
-	@Test
-	public void testregionPriority() {
-		assertTrue(statemachine.isStateActive(State.SomeRegion_A));
-		statemachine.raiseEvent2();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.SomeRegion_B));
-		assertTrue(!statemachine.isStateActive(State.Main_region_E));
-	}
-}
+/**
+ * Copyright (c) 2012 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.priorityvalues.PriorityValuesStatemachine;
+import org.yakindu.scr.priorityvalues.PriorityValuesStatemachine.State;
+/**
+ *  Unit TestCase for PriorityValues
+ */
+@SuppressWarnings("all")
+public class PriorityValuesTest {
+
+	private PriorityValuesStatemachine statemachine;
+
+	@Before
+	public void setUp() {
+		statemachine = new PriorityValuesStatemachine();
+		statemachine.init();
+		statemachine.enter();
+	}
+
+	@After
+	public void tearDown() {
+		statemachine = null;
+	}
+
+	@Test
+	public void testtransitionPriority() {
+		assertTrue(statemachine.isStateActive(State.Main_region_A));
+		statemachine.raiseEvent1();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_C));
+	}
+	@Test
+	public void testregionPriority() {
+		assertTrue(statemachine.isStateActive(State.SomeRegion_A));
+		statemachine.raiseEvent2();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.SomeRegion_B));
+		assertTrue(!statemachine.isStateActive(State.Main_region_E));
+	}
+}

+ 49 - 0
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/RaiseEventTest.java

@@ -0,0 +1,49 @@
+/**
+ * Copyright (c) 2012 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.raiseevent.RaiseEventStatemachine;
+import org.yakindu.scr.raiseevent.RaiseEventStatemachine.State;
+/**
+ *  Unit TestCase for RaiseEvent
+ */
+@SuppressWarnings("all")
+public class RaiseEventTest {
+
+	private RaiseEventStatemachine statemachine;
+
+	@Before
+	public void setUp() {
+		statemachine = new RaiseEventStatemachine();
+		statemachine.init();
+		statemachine.enter();
+	}
+
+	@After
+	public void tearDown() {
+		statemachine = null;
+	}
+
+	@Test
+	public void testraiseEvent() {
+		assertTrue(statemachine.isStateActive(State.Second_region_SateA));
+		assertTrue(statemachine.isStateActive(State.Main_region_StateA));
+		statemachine.raiseE2();
+		statemachine.runCycle();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Second_region_StateB));
+		assertTrue(statemachine.isStateActive(State.Main_region_StateB));
+	}
+}

+ 53 - 53
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/SameNameDifferentRegionTest.java

@@ -1,53 +1,53 @@
-/**
- * Copyright (c) 2012 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.samenamedifferentregion.SameNameDifferentRegionStatemachine;
-import org.yakindu.scr.samenamedifferentregion.SameNameDifferentRegionStatemachine.State;
-/**
- *  Unit TestCase for SameNameDifferentRegion
- */
-@SuppressWarnings("all")
-public class SameNameDifferentRegionTest {
-
-	private SameNameDifferentRegionStatemachine statemachine;
-
-	@Before
-	public void setUp() {
-		statemachine = new SameNameDifferentRegionStatemachine();
-		statemachine.init();
-		statemachine.enter();
-	}
-
-	@After
-	public void tearDown() {
-		statemachine = null;
-	}
-
-	@Test
-	public void testsameNameDifferenRegionTest() {
-		assertTrue(statemachine.isStateActive(State.Main_region_StateA));
-		statemachine.raiseE1();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_StateB));
-		assertTrue(statemachine
-				.isStateActive(State.Main_region_StateB_r1_StateA));
-		statemachine.raiseE1();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_StateB));
-		assertTrue(statemachine
-				.isStateActive(State.Main_region_StateB_r1_StateB));
-	}
-}
+/**
+ * Copyright (c) 2012 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.samenamedifferentregion.SameNameDifferentRegionStatemachine;
+import org.yakindu.scr.samenamedifferentregion.SameNameDifferentRegionStatemachine.State;
+/**
+ *  Unit TestCase for SameNameDifferentRegion
+ */
+@SuppressWarnings("all")
+public class SameNameDifferentRegionTest {
+
+	private SameNameDifferentRegionStatemachine statemachine;
+
+	@Before
+	public void setUp() {
+		statemachine = new SameNameDifferentRegionStatemachine();
+		statemachine.init();
+		statemachine.enter();
+	}
+
+	@After
+	public void tearDown() {
+		statemachine = null;
+	}
+
+	@Test
+	public void testsameNameDifferenRegionTest() {
+		assertTrue(statemachine.isStateActive(State.Main_region_StateA));
+		statemachine.raiseE1();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_StateB));
+		assertTrue(statemachine
+				.isStateActive(State.Main_region_StateB_r1_StateA));
+		statemachine.raiseE1();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_StateB));
+		assertTrue(statemachine
+				.isStateActive(State.Main_region_StateB_r1_StateB));
+	}
+}

+ 81 - 81
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/ShallowHistoryTest.java

@@ -1,81 +1,81 @@
-/**
- * Copyright (c) 2012 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.shallowhistory.ShallowHistoryStatemachine;
-import org.yakindu.scr.shallowhistory.ShallowHistoryStatemachine.State;
-/**
- *  Unit TestCase for ShallowHistory
- */
-@SuppressWarnings("all")
-public class ShallowHistoryTest {
-
-	private ShallowHistoryStatemachine statemachine;
-
-	@Before
-	public void setUp() {
-		statemachine = new ShallowHistoryStatemachine();
-		statemachine.init();
-		statemachine.enter();
-	}
-
-	@After
-	public void tearDown() {
-		statemachine = null;
-	}
-
-	@Test
-	public void testshallowHistoryTest() {
-		statemachine.raiseEvent1();
-		statemachine.runCycle();
-		statemachine.raiseEvent3();
-		statemachine.runCycle();
-		statemachine.raiseEvent5();
-		statemachine.runCycle();
-		statemachine.raiseEvent7();
-		statemachine.runCycle();
-		assertTrue(!statemachine.isStateActive(State.MainRegion_State1));
-		assertTrue(statemachine
-				.isStateActive(State.MainRegion_State2__region0_State4__region0_State7__region0_State9));
-		statemachine.raiseEvent6();
-		statemachine.runCycle();
-		assertTrue(!statemachine
-				.isStateActive(State.MainRegion_State2__region0_State4__region0_State7__region0_State9));
-		assertTrue(statemachine
-				.isStateActive(State.MainRegion_State2__region0_State4__region0_State6));
-		statemachine.raiseEvent5();
-		statemachine.runCycle();
-		assertTrue(!statemachine
-				.isStateActive(State.MainRegion_State2__region0_State4__region0_State7__region0_State8));
-		assertTrue(statemachine
-				.isStateActive(State.MainRegion_State2__region0_State4__region0_State7__region0_State9));
-		statemachine.raiseEvent2();
-		statemachine.runCycle();
-		assertTrue(!statemachine
-				.isStateActive(State.MainRegion_State2__region0_State4__region0_State7__region0_State9));
-		assertTrue(statemachine.isStateActive(State.MainRegion_State1));
-		statemachine.raiseEvent1();
-		statemachine.runCycle();
-		assertTrue(statemachine
-				.isStateActive(State.MainRegion_State2__region0_State4__region0_State6));
-		assertTrue(!statemachine.isStateActive(State.MainRegion_State1));
-		statemachine.raiseEvent5();
-		statemachine.runCycle();
-		assertTrue(!statemachine
-				.isStateActive(State.MainRegion_State2__region0_State4__region0_State6));
-		assertTrue(statemachine
-				.isStateActive(State.MainRegion_State2__region0_State4__region0_State7__region0_State9));
-	}
-}
+/**
+ * Copyright (c) 2012 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.shallowhistory.ShallowHistoryStatemachine;
+import org.yakindu.scr.shallowhistory.ShallowHistoryStatemachine.State;
+/**
+ *  Unit TestCase for ShallowHistory
+ */
+@SuppressWarnings("all")
+public class ShallowHistoryTest {
+
+	private ShallowHistoryStatemachine statemachine;
+
+	@Before
+	public void setUp() {
+		statemachine = new ShallowHistoryStatemachine();
+		statemachine.init();
+		statemachine.enter();
+	}
+
+	@After
+	public void tearDown() {
+		statemachine = null;
+	}
+
+	@Test
+	public void testshallowHistoryTest() {
+		statemachine.raiseEvent1();
+		statemachine.runCycle();
+		statemachine.raiseEvent3();
+		statemachine.runCycle();
+		statemachine.raiseEvent5();
+		statemachine.runCycle();
+		statemachine.raiseEvent7();
+		statemachine.runCycle();
+		assertTrue(!statemachine.isStateActive(State.MainRegion_State1));
+		assertTrue(statemachine
+				.isStateActive(State.MainRegion_State2__region0_State4__region0_State7__region0_State9));
+		statemachine.raiseEvent6();
+		statemachine.runCycle();
+		assertTrue(!statemachine
+				.isStateActive(State.MainRegion_State2__region0_State4__region0_State7__region0_State9));
+		assertTrue(statemachine
+				.isStateActive(State.MainRegion_State2__region0_State4__region0_State6));
+		statemachine.raiseEvent5();
+		statemachine.runCycle();
+		assertTrue(!statemachine
+				.isStateActive(State.MainRegion_State2__region0_State4__region0_State7__region0_State8));
+		assertTrue(statemachine
+				.isStateActive(State.MainRegion_State2__region0_State4__region0_State7__region0_State9));
+		statemachine.raiseEvent2();
+		statemachine.runCycle();
+		assertTrue(!statemachine
+				.isStateActive(State.MainRegion_State2__region0_State4__region0_State7__region0_State9));
+		assertTrue(statemachine.isStateActive(State.MainRegion_State1));
+		statemachine.raiseEvent1();
+		statemachine.runCycle();
+		assertTrue(statemachine
+				.isStateActive(State.MainRegion_State2__region0_State4__region0_State6));
+		assertTrue(!statemachine.isStateActive(State.MainRegion_State1));
+		statemachine.raiseEvent5();
+		statemachine.runCycle();
+		assertTrue(!statemachine
+				.isStateActive(State.MainRegion_State2__region0_State4__region0_State6));
+		assertTrue(statemachine
+				.isStateActive(State.MainRegion_State2__region0_State4__region0_State7__region0_State9));
+	}
+}

+ 49 - 49
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/SimpleEventTest.java

@@ -1,49 +1,49 @@
-/**
- * Copyright (c) 2012 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.simpleevent.SimpleEventStatemachine;
-import org.yakindu.scr.simpleevent.SimpleEventStatemachine.State;
-/**
- *  Unit TestCase for SimpleEvent
- */
-@SuppressWarnings("all")
-public class SimpleEventTest {
-
-	private SimpleEventStatemachine statemachine;
-
-	@Before
-	public void setUp() {
-		statemachine = new SimpleEventStatemachine();
-		statemachine.init();
-		statemachine.enter();
-	}
-
-	@After
-	public void tearDown() {
-		statemachine = null;
-	}
-
-	@Test
-	public void testsimpleEventTest() {
-		assertTrue("Expected A to be active",
-				statemachine.isStateActive(State.Main_region_A));
-		assertTrue(5 == 5);
-		statemachine.raiseEvent1();
-		statemachine.runCycle();
-		assertTrue("Expected B to be active",
-				statemachine.isStateActive(State.Main_region_B));
-	}
-}
+/**
+ * Copyright (c) 2012 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.simpleevent.SimpleEventStatemachine;
+import org.yakindu.scr.simpleevent.SimpleEventStatemachine.State;
+/**
+ *  Unit TestCase for SimpleEvent
+ */
+@SuppressWarnings("all")
+public class SimpleEventTest {
+
+	private SimpleEventStatemachine statemachine;
+
+	@Before
+	public void setUp() {
+		statemachine = new SimpleEventStatemachine();
+		statemachine.init();
+		statemachine.enter();
+	}
+
+	@After
+	public void tearDown() {
+		statemachine = null;
+	}
+
+	@Test
+	public void testsimpleEventTest() {
+		assertTrue("Expected A to be active",
+				statemachine.isStateActive(State.Main_region_A));
+		assertTrue(5 == 5);
+		statemachine.raiseEvent1();
+		statemachine.runCycle();
+		assertTrue("Expected B to be active",
+				statemachine.isStateActive(State.Main_region_B));
+	}
+}

+ 50 - 0
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/SimpleHietachyTest.java

@@ -0,0 +1,50 @@
+/**
+ * Copyright (c) 2012 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.simplehierachy.SimpleHierachyStatemachine;
+import org.yakindu.scr.simplehierachy.SimpleHierachyStatemachine.State;
+/**
+ *  Unit TestCase for SimpleHierachy
+ */
+@SuppressWarnings("all")
+public class SimpleHietachyTest {
+
+	private SimpleHierachyStatemachine statemachine;
+
+	@Before
+	public void setUp() {
+		statemachine = new SimpleHierachyStatemachine();
+		statemachine.init();
+		statemachine.enter();
+	}
+
+	@After
+	public void tearDown() {
+		statemachine = null;
+	}
+
+	@Test
+	public void testsimpleHierachyTest() {
+		assertTrue(statemachine.isStateActive(State.Main_region_A));
+		statemachine.raiseEvent1();
+		statemachine.raiseEvent1();
+		statemachine.raiseEvent1();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_B));
+		assertTrue(statemachine
+				.isStateActive(State.Main_region_B_subregion1_B1));
+	}
+}

+ 49 - 49
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/StateIsActiveTest.java

@@ -1,49 +1,49 @@
-/**
- * Copyright (c) 2012 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.stateisactive.StateIsActiveStatemachine;
-import org.yakindu.scr.stateisactive.StateIsActiveStatemachine.State;
-/**
- *  Unit TestCase for StateIsActive
- */
-@SuppressWarnings("all")
-public class StateIsActiveTest {
-
-	private StateIsActiveStatemachine statemachine;
-
-	@Before
-	public void setUp() {
-		statemachine = new StateIsActiveStatemachine();
-		statemachine.init();
-		statemachine.enter();
-	}
-
-	@After
-	public void tearDown() {
-		statemachine = null;
-	}
-
-	@Test
-	public void teststateIsActive() {
-		assertTrue(statemachine.isStateActive(State.R1_R1A));
-		assertTrue(statemachine.isStateActive(State.R2_R2A));
-		statemachine.raiseEvent1();
-		statemachine.runCycle();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.R1_R1B));
-		assertTrue(statemachine.isStateActive(State.R2_R2B));
-	}
-}
+/**
+ * Copyright (c) 2012 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.stateisactive.StateIsActiveStatemachine;
+import org.yakindu.scr.stateisactive.StateIsActiveStatemachine.State;
+/**
+ *  Unit TestCase for StateIsActive
+ */
+@SuppressWarnings("all")
+public class StateIsActiveTest {
+
+	private StateIsActiveStatemachine statemachine;
+
+	@Before
+	public void setUp() {
+		statemachine = new StateIsActiveStatemachine();
+		statemachine.init();
+		statemachine.enter();
+	}
+
+	@After
+	public void tearDown() {
+		statemachine = null;
+	}
+
+	@Test
+	public void teststateIsActive() {
+		assertTrue(statemachine.isStateActive(State.R1_R1A));
+		assertTrue(statemachine.isStateActive(State.R2_R2A));
+		statemachine.raiseEvent1();
+		statemachine.runCycle();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.R1_R1B));
+		assertTrue(statemachine.isStateActive(State.R2_R2B));
+	}
+}

+ 53 - 53
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/StatechartLocalReactionsTest.java

@@ -1,53 +1,53 @@
-/**
- * Copyright (c) 2012 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.statechartlocalreactions.StatechartLocalReactionsStatemachine;
-import org.yakindu.scr.statechartlocalreactions.StatechartLocalReactionsStatemachine.State;
-/**
- *  Unit TestCase for StatechartLocalReactions
- */
-@SuppressWarnings("all")
-public class StatechartLocalReactionsTest {
-
-	private StatechartLocalReactionsStatemachine statemachine;
-
-	@Before
-	public void setUp() {
-		statemachine = new StatechartLocalReactionsStatemachine();
-		statemachine.init();
-		statemachine.enter();
-	}
-
-	@After
-	public void tearDown() {
-		statemachine = null;
-	}
-
-	@Test
-	public void teststatechartLocalReactionsTest() {
-		assertTrue(statemachine.isStateActive(State.Main_region_S1));
-		assertTrue(statemachine.isStateActive(State.Region2_a));
-		while (statemachine.getMyInt() < 10) {
-			assertTrue(statemachine.isStateActive(State.Region2_a));
-			if (statemachine.getMyInt() % 2 == 0) {
-				assertTrue(statemachine.isStateActive(State.Main_region_S1));;
-			} else {
-				assertTrue(statemachine.isStateActive(State.Main_region_S2));;
-			}
-			statemachine.runCycle();
-		}
-	}
-}
+/**
+ * Copyright (c) 2012 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.statechartlocalreactions.StatechartLocalReactionsStatemachine;
+import org.yakindu.scr.statechartlocalreactions.StatechartLocalReactionsStatemachine.State;
+/**
+ *  Unit TestCase for StatechartLocalReactions
+ */
+@SuppressWarnings("all")
+public class StatechartLocalReactionsTest {
+
+	private StatechartLocalReactionsStatemachine statemachine;
+
+	@Before
+	public void setUp() {
+		statemachine = new StatechartLocalReactionsStatemachine();
+		statemachine.init();
+		statemachine.enter();
+	}
+
+	@After
+	public void tearDown() {
+		statemachine = null;
+	}
+
+	@Test
+	public void teststatechartLocalReactionsTest() {
+		assertTrue(statemachine.isStateActive(State.Main_region_S1));
+		assertTrue(statemachine.isStateActive(State.Region2_a));
+		while (statemachine.getMyInt() < 10) {
+			assertTrue(statemachine.isStateActive(State.Region2_a));
+			if (statemachine.getMyInt() % 2 == 0) {
+				assertTrue(statemachine.isStateActive(State.Main_region_S1));;
+			} else {
+				assertTrue(statemachine.isStateActive(State.Main_region_S2));;
+			}
+			statemachine.runCycle();
+		}
+	}
+}

+ 50 - 50
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/StringExpressionsTest.java

@@ -1,50 +1,50 @@
-/**
- * Copyright (c) 2012 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.stringexpressions.StringExpressionsStatemachine;
-import org.yakindu.scr.stringexpressions.StringExpressionsStatemachine.State;
-/**
- *  Unit TestCase for StringExpressions
- */
-@SuppressWarnings("all")
-public class StringExpressionsTest {
-
-	private StringExpressionsStatemachine statemachine;
-
-	@Before
-	public void setUp() {
-		statemachine = new StringExpressionsStatemachine();
-		statemachine.init();
-		statemachine.enter();
-	}
-
-	@After
-	public void tearDown() {
-		statemachine = null;
-	}
-
-	@Test
-	public void testStringExpressionsTest() {
-		assertTrue(statemachine.isStateActive(State.Main_region_StateA));
-		assertTrue(statemachine.getMyString().equals("hello"));
-		assertTrue(statemachine.getMyString2().equals("world"));
-		statemachine.raiseE1();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_StateB));
-		assertTrue(statemachine.getEquals() == false);
-		assertTrue(statemachine.getNotEqual() == true);
-	}
-}
+/**
+ * Copyright (c) 2012 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.stringexpressions.StringExpressionsStatemachine;
+import org.yakindu.scr.stringexpressions.StringExpressionsStatemachine.State;
+/**
+ *  Unit TestCase for StringExpressions
+ */
+@SuppressWarnings("all")
+public class StringExpressionsTest {
+
+	private StringExpressionsStatemachine statemachine;
+
+	@Before
+	public void setUp() {
+		statemachine = new StringExpressionsStatemachine();
+		statemachine.init();
+		statemachine.enter();
+	}
+
+	@After
+	public void tearDown() {
+		statemachine = null;
+	}
+
+	@Test
+	public void testStringExpressionsTest() {
+		assertTrue(statemachine.isStateActive(State.Main_region_StateA));
+		assertTrue(statemachine.getMyString().equals("hello"));
+		assertTrue(statemachine.getMyString2().equals("world"));
+		statemachine.raiseE1();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_StateB));
+		assertTrue(statemachine.getEquals() == false);
+		assertTrue(statemachine.getNotEqual() == true);
+	}
+}

+ 61 - 61
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/SyncForkTest.java

@@ -1,61 +1,61 @@
-/**
- * Copyright (c) 2012 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.syncfork.SyncForkStatemachine;
-import org.yakindu.scr.syncfork.SyncForkStatemachine.State;
-/**
- *  Unit TestCase for SyncFork
- */
-@SuppressWarnings("all")
-public class SyncForkTest {
-
-	private SyncForkStatemachine statemachine;
-
-	@Before
-	public void setUp() {
-		statemachine = new SyncForkStatemachine();
-		statemachine.init();
-		statemachine.enter();
-	}
-
-	@After
-	public void tearDown() {
-		statemachine = null;
-	}
-
-	@Test
-	public void testsyncForkTest() {
-		assertTrue(statemachine.isStateActive(State.Main_region_A));
-		statemachine.raiseF();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_B));
-		assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C1));
-		assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D1));
-		statemachine.raiseF();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_B));
-		assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C2));
-		assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D2));
-		statemachine.raiseE();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_A));
-		statemachine.raiseF();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_B));
-		assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C1));
-		assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D1));
-	}
-}
+/**
+ * Copyright (c) 2012 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.syncfork.SyncForkStatemachine;
+import org.yakindu.scr.syncfork.SyncForkStatemachine.State;
+/**
+ *  Unit TestCase for SyncFork
+ */
+@SuppressWarnings("all")
+public class SyncForkTest {
+
+	private SyncForkStatemachine statemachine;
+
+	@Before
+	public void setUp() {
+		statemachine = new SyncForkStatemachine();
+		statemachine.init();
+		statemachine.enter();
+	}
+
+	@After
+	public void tearDown() {
+		statemachine = null;
+	}
+
+	@Test
+	public void testsyncForkTest() {
+		assertTrue(statemachine.isStateActive(State.Main_region_A));
+		statemachine.raiseF();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_B));
+		assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C1));
+		assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D1));
+		statemachine.raiseF();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_B));
+		assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C2));
+		assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D2));
+		statemachine.raiseE();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_A));
+		statemachine.raiseF();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_B));
+		assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C1));
+		assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D1));
+	}
+}

+ 105 - 105
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/SyncJoinTest.java

@@ -1,105 +1,105 @@
-/**
- * Copyright (c) 2012 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.syncjoin.SyncJoinStatemachine;
-import org.yakindu.scr.syncjoin.SyncJoinStatemachine.State;
-/**
- *  Unit TestCase for SyncJoin
- */
-@SuppressWarnings("all")
-public class SyncJoinTest {
-
-	private SyncJoinStatemachine statemachine;
-
-	@Before
-	public void setUp() {
-		statemachine = new SyncJoinStatemachine();
-		statemachine.init();
-		statemachine.enter();
-	}
-
-	@After
-	public void tearDown() {
-		statemachine = null;
-	}
-
-	@Test
-	public void testsyncJoin_C2_Waits() {
-		assertTrue(statemachine.isStateActive(State.Main_region_B));
-		assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C1));
-		assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D1));
-		statemachine.raiseE();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C2));
-		assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D1));
-		statemachine.raiseJc();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C2));
-		assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D1));
-		statemachine.raiseJd();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C2));
-		assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D1));
-		statemachine.raiseJc();
-		statemachine.raiseJd();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C2));
-		assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D1));
-		statemachine.raiseF();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C2));
-		assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D2));
-		statemachine.raiseJc();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C2));
-		assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D2));
-		statemachine.raiseJd();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C2));
-		assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D2));
-		statemachine.raiseJc();
-		statemachine.raiseJd();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_A));
-	}
-	@Test
-	public void testsyncJoin_D2_Waits() {
-		assertTrue(statemachine.isStateActive(State.Main_region_B));
-		assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C1));
-		assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D1));
-		statemachine.raiseF();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C1));
-		assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D2));
-		statemachine.raiseJc();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C1));
-		assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D2));
-		statemachine.raiseJd();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C1));
-		assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D2));
-		statemachine.raiseJc();
-		statemachine.raiseJd();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C1));
-		assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D2));
-		statemachine.raiseE();
-		statemachine.runCycle();
-		assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C2));
-		assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D2));
-	}
-}
+/**
+ * Copyright (c) 2012 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.syncjoin.SyncJoinStatemachine;
+import org.yakindu.scr.syncjoin.SyncJoinStatemachine.State;
+/**
+ *  Unit TestCase for SyncJoin
+ */
+@SuppressWarnings("all")
+public class SyncJoinTest {
+
+	private SyncJoinStatemachine statemachine;
+
+	@Before
+	public void setUp() {
+		statemachine = new SyncJoinStatemachine();
+		statemachine.init();
+		statemachine.enter();
+	}
+
+	@After
+	public void tearDown() {
+		statemachine = null;
+	}
+
+	@Test
+	public void testsyncJoin_C2_Waits() {
+		assertTrue(statemachine.isStateActive(State.Main_region_B));
+		assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C1));
+		assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D1));
+		statemachine.raiseE();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C2));
+		assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D1));
+		statemachine.raiseJc();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C2));
+		assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D1));
+		statemachine.raiseJd();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C2));
+		assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D1));
+		statemachine.raiseJc();
+		statemachine.raiseJd();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C2));
+		assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D1));
+		statemachine.raiseF();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C2));
+		assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D2));
+		statemachine.raiseJc();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C2));
+		assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D2));
+		statemachine.raiseJd();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C2));
+		assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D2));
+		statemachine.raiseJc();
+		statemachine.raiseJd();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_A));
+	}
+	@Test
+	public void testsyncJoin_D2_Waits() {
+		assertTrue(statemachine.isStateActive(State.Main_region_B));
+		assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C1));
+		assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D1));
+		statemachine.raiseF();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C1));
+		assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D2));
+		statemachine.raiseJc();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C1));
+		assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D2));
+		statemachine.raiseJd();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C1));
+		assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D2));
+		statemachine.raiseJc();
+		statemachine.raiseJd();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C1));
+		assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D2));
+		statemachine.raiseE();
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C2));
+		assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D2));
+	}
+}

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

@@ -0,0 +1,46 @@
+/**
+ * Copyright (c) 2012 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.valuedevents.ValuedEventsStatemachine;
+import org.yakindu.scr.valuedevents.ValuedEventsStatemachine.State;
+/**
+ *  Unit TestCase for ValuedEvents
+ */
+@SuppressWarnings("all")
+public class ValuedEventTest {
+
+	private ValuedEventsStatemachine statemachine;
+
+	@Before
+	public void setUp() {
+		statemachine = new ValuedEventsStatemachine();
+		statemachine.init();
+		statemachine.enter();
+	}
+
+	@After
+	public void tearDown() {
+		statemachine = null;
+	}
+
+	@Test
+	public void testvaluedEventTest() {
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.Main_region_A));
+		assertTrue(statemachine.isStateActive(State._region1_C));
+		assertTrue(statemachine.getMyVar() == 42);
+	}
+}

+ 0 - 0
test-plugins/org.yakindu.sct.model.sexec.interpreter.test/src-gen/org/yakindu/sct/model/sexec/interpreter/test/AllTests.java


Some files were not shown because too many files changed in this diff