Browse Source

refactoring of sgraph basic tests

- split in own validators
- separate tests
- use validation infrastructure
andreas muelder 7 years ago
parent
commit
4fbdf5f9f7
68 changed files with 2265 additions and 1935 deletions
  1. 1 1
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/validation/DFS.java
  2. 54 66
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/util/SGgraphUtil.java
  3. 36 0
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/validation/AbstractSGraphValidator.java
  4. 34 0
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/validation/ChoiceValidator.java
  5. 134 0
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/validation/EntryExitValidator.java
  6. 34 0
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/validation/FinalStateValidator.java
  7. 55 80
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/validation/SCTResourceValidator.java
  8. 9 404
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/validation/SGraphJavaValidator.java
  9. 45 0
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/validation/StateValidator.java
  10. 52 0
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/validation/StatechartValidator.java
  11. 129 0
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/validation/SynchronizationValidator.java
  12. 68 0
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/validation/TransitionValidator.java
  13. 91 0
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/validation/VertexValidator.java
  14. 5 4
      plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/validation/STextJavaValidator.java
  15. 67 89
      plugins/org.yakindu.sct.ui.navigator/src/org/yakindu/sct/ui/navigator/StatechartNavigatorContentProvider.java
  16. 39 0
      plugins/org.yakindu.sct.ui.navigator/test.launch
  17. 5 5
      test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/FlowOptimizer_ExecutionEntryTest.java
  18. 5 5
      test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/HistoryTest.java
  19. 4 5
      test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/LocalReactionTest.java
  20. 4 5
      test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/ModelSequencerHierarchyTest.java
  21. 5 6
      test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/ModelSequencerHistoryTest.java
  22. 5 6
      test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/ModelSequencerOrthogonalityTest.java
  23. 5 6
      test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/ModelSequencerSCTest.java
  24. 5 6
      test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/ModelSequencerStateReactionTest.java
  25. 6 7
      test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/ModelSequencerStateTest.java
  26. 5 6
      test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/ModelSequencerStateVectorTest.java
  27. 4 5
      test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/ModelSequencertDeclarationsTest.java
  28. 5 4
      test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/NullCallTest.xtend
  29. 5 6
      test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/SCTTestUtil.java
  30. 5 6
      test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/SelfTransitionTest.java
  31. 5 6
      test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/StatechartEnterExistActionTest.java
  32. 2 2
      test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/StatechartExtensionsTest.java
  33. 1 1
      test-plugins/org.yakindu.sct.model.sgraph.test/src/org/yakindu/sct/model/sgraph/test/util/SGraphTestFactory.java
  34. 2 0
      test-plugins/org.yakindu.sct.model.sgraph.test/.settings/org.eclipse.core.resources.prefs
  35. 0 2
      test-plugins/org.yakindu.sct.model.sgraph.test/META-INF/MANIFEST.MF
  36. 0 60
      test-plugins/org.yakindu.sct.model.sgraph.test/src/org/yakindu/sct/model/sgraph/test/Activator.java
  37. 11 5
      test-plugins/org.yakindu.sct.model.sgraph.test/src/org/yakindu/sct/model/sgraph/test/AllTests.java
  38. 0 945
      test-plugins/org.yakindu.sct.model.sgraph.test/src/org/yakindu/sct/model/sgraph/test/SGraphJavaValidationTest.java
  39. 0 63
      test-plugins/org.yakindu.sct.model.sgraph.test/src/org/yakindu/sct/model/sgraph/test/StateImplTest.java
  40. 30 28
      test-plugins/org.yakindu.sct.model.sgraph.test/src/org/yakindu/sct/model/sgraph/test/SGraphTestInjectorProvider.java
  41. 1 1
      test-plugins/org.yakindu.sct.model.sgraph.test/src/org/yakindu/sct/model/sgraph/test/SGraphTestModule.java
  42. 75 0
      test-plugins/org.yakindu.sct.model.sgraph.test/src/org/yakindu/sct/model/sgraph/validation/test/AbstractSGraphValidatorTest.java
  43. 46 0
      test-plugins/org.yakindu.sct.model.sgraph.test/src/org/yakindu/sct/model/sgraph/validation/test/ChoiceValidatorTest.java
  44. 242 0
      test-plugins/org.yakindu.sct.model.sgraph.test/src/org/yakindu/sct/model/sgraph/validation/test/EntryExitValidatorTest.java
  45. 65 0
      test-plugins/org.yakindu.sct.model.sgraph.test/src/org/yakindu/sct/model/sgraph/validation/test/FinalStateValidatorTest.java
  46. 39 0
      test-plugins/org.yakindu.sct.model.sgraph.test/src/org/yakindu/sct/model/sgraph/validation/test/SGraphJavaValidatorTester.java
  47. 60 0
      test-plugins/org.yakindu.sct.model.sgraph.test/src/org/yakindu/sct/model/sgraph/validation/test/StateValidatorTest.java
  48. 40 0
      test-plugins/org.yakindu.sct.model.sgraph.test/src/org/yakindu/sct/model/sgraph/validation/test/StatechartValidatorTest.java
  49. 169 0
      test-plugins/org.yakindu.sct.model.sgraph.test/src/org/yakindu/sct/model/sgraph/validation/test/SynchronizationValidatorTest.java
  50. 50 0
      test-plugins/org.yakindu.sct.model.sgraph.test/src/org/yakindu/sct/model/sgraph/validation/test/TransitionValidatorTest.java
  51. 169 0
      test-plugins/org.yakindu.sct.model.sgraph.test/src/org/yakindu/sct/model/sgraph/validation/test/VertexValidatorTest.java
  52. 24 24
      test-plugins/org.yakindu.sct.test.models/testmodels/validation/RegionCantBeEnteredUsingShallowHistory.sct
  53. 0 0
      test-plugins/org.yakindu.sct.model.sgraph.test/testmodels/entry/TopLevelEntryIsDefaultEntryError.sct
  54. 0 0
      test-plugins/org.yakindu.sct.model.sgraph.test/testmodels/entry/TopLevelEntryIsDefaultEntryWarn.sct
  55. 0 0
      test-plugins/org.yakindu.sct.model.sgraph.test/testmodels/entry/TopLevelRegionNoEntryPoint.sct
  56. 164 0
      test-plugins/org.yakindu.sct.model.sgraph.test/testmodels/entry/ValidTransitionToInnerChoice.sct
  57. 0 0
      test-plugins/org.yakindu.sct.model.sgraph.test/testmodels/synchronization/NotOrthogonalRegion01.sct
  58. 0 0
      test-plugins/org.yakindu.sct.model.sgraph.test/testmodels/synchronization/NotOrthogonalRegion02.sct
  59. 0 0
      test-plugins/org.yakindu.sct.model.sgraph.test/testmodels/synchronization/NotOrthogonalRegion03.sct
  60. 0 0
      test-plugins/org.yakindu.sct.model.sgraph.test/testmodels/synchronization/OrthogonalRegion01.sct
  61. 5 4
      test-plugins/org.yakindu.sct.test.models/testmodels/validation/SyncLocation_Issue58.sct
  62. 0 0
      test-plugins/org.yakindu.sct.model.sgraph.test/testmodels/synchronization/SyncOutgoingTransition.sct
  63. 0 0
      test-plugins/org.yakindu.sct.model.sgraph.test/testmodels/synchronization/SynchronizationTransitionCount.sct
  64. 0 0
      test-plugins/org.yakindu.sct.model.sgraph.test/testmodels/synchronization/ValidEmptyTransitionFromSync.sct
  65. 0 0
      test-plugins/org.yakindu.sct.model.sgraph.test/testmodels/transition/EntryTransitionToParentState.sct
  66. 143 0
      test-plugins/org.yakindu.sct.model.sgraph.test/testmodels/transition/OrthogonalTransition01.sct
  67. 1 68
      test-plugins/org.yakindu.sct.test.models/testmodels/validation/OrthogonalTransition.sct
  68. 0 4
      test-plugins/org.yakindu.sct.test.models/.settings/org.eclipse.core.resources.prefs

+ 1 - 1
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/validation/DFS.java

@@ -8,7 +8,7 @@
  * committers of YAKINDU - initial API and implementation
  *
 */
-package org.yakindu.sct.model.sgraph.validation;
+package org.yakindu.sct.model.sgraph.util;
 
 import java.util.ArrayList;
 import java.util.Collection;

+ 54 - 66
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/util/SGgraphUtil.java

@@ -10,7 +10,6 @@
  */
 package org.yakindu.sct.model.sgraph.util;
 
-
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
@@ -22,150 +21,139 @@ import org.yakindu.sct.model.sgraph.Transition;
 import org.yakindu.sct.model.sgraph.Vertex;
 
 /**
- * Provides a collection of static functions that perform set operations and calculate derived properties based on the sgraph structure.
- *  
+ * Provides a collection of static functions that perform set operations and
+ * calculate derived properties based on the sgraph structure.
+ * 
  * @author terfloth
  */
 public class SGgraphUtil {
 
-	
 	/**
 	 * Calculates the common ancestor of to EObjects
-	 *  
-	 * @param o1
-	 * @param o2
-	 * @return
+	 * 
 	 */
 	public static EObject commonAncestor(EObject o1, EObject o2) {
-		
+
 		List<EObject> o1Anchestors = collectAncestors(o1, new ArrayList<EObject>());
 		List<EObject> o2Anchestors = collectAncestors(o2, new ArrayList<EObject>());
-		
+
 		return findCommonAncestor(o1Anchestors, o2Anchestors);
 	}
 
-	
 	/**
-	 * Calculates the common ancestor of to EObjects based on two ancestor list.  The lists are compareredstarting from the root. 
-	 * The last same element is the common ancestor.
-	 *  
-	 * @param o1Anchestors
-	 * @param o2Anchestors
-	 * @return
+	 * Calculates the common ancestor of to EObjects based on two ancestor list. The
+	 * lists are compareredstarting from the root. The last same element is the
+	 * common ancestor.
+	 * 
 	 */
 	public static EObject findCommonAncestor(List<EObject> o1Anchestors, List<EObject> o2Anchestors) {
 		int max = Math.min(o1Anchestors.size(), o2Anchestors.size());
 		EObject commonAncestor = null;
-		
-		for (int i=0; i<max; i++) {
+
+		for (int i = 0; i < max; i++) {
 			if (o1Anchestors.get(i) == o2Anchestors.get(i)) {
 				commonAncestor = o1Anchestors.get(i);
 			} else {
 				break; // do not continue if we came across different amcestors.
 			}
 		}
-		
+
 		return commonAncestor;
 	}
-	
 
 	/**
-	 * Adds all ancestors of an EObject to the provided list. Ancestors are all eContainers starting from the specified element. The ancestors are added starting with the root.
-	 *  
-	 * @param o1 The EObject instance for which we want to get the ancestors.
-	 * @param al A list where the ancestors are added.
-	 * @return The list with ancestors (same as @param al) 
+	 * Adds all ancestors of an EObject to the provided list. Ancestors are all
+	 * eContainers starting from the specified element. The ancestors are added
+	 * starting with the root.
+	 * 
+	 * @param o1
+	 *            The EObject instance for which we want to get the ancestors.
+	 * @param al
+	 *            A list where the ancestors are added.
+	 * @return The list with ancestors (same as @param al)
 	 */
 	public static List<EObject> collectAncestors(EObject o1, List<EObject> al) {
 
-		if ( o1 != null ) {
-		
-			if ( o1.eContainer() != null ) {
+		if (o1 != null) {
+
+			if (o1.eContainer() != null) {
 				collectAncestors(o1.eContainer(), al);
 				al.add(o1.eContainer());
 			}
-		
-		}		
+
+		}
 		return al;
 	}
-	
 
 	/**
 	 * Checks if all provided vertices are orthogonal to each other.
 	 * 
-	 * @param vertices
-	 * @return true if the vertices are orthogonal to each other.
 	 */
 	public static boolean areOrthogonal(List<Vertex> vertices) {
-		
-		if (vertices == null || vertices.isEmpty()) return true;
-		
+
+		if (vertices == null || vertices.isEmpty())
+			return true;
+
 		List<List<EObject>> ancestorLists = new ArrayList<List<EObject>>();
-		
+
 		for (Vertex vertex : vertices) {
 			ancestorLists.add(collectAncestors(vertex, new ArrayList<EObject>()));
 		}
-		
+
 		// check all pairs of verices for orthogonality ...
-		for ( int i=0; i<vertices.size()-1; i++) {
-			for ( int j=i+1; j<vertices.size(); j++) {
-				// ... by checking their common ancestor. f it is a region then the pair of vertices are not orthogonal.
+		for (int i = 0; i < vertices.size() - 1; i++) {
+			for (int j = i + 1; j < vertices.size(); j++) {
+				// ... by checking their common ancestor. f it is a region then the pair of
+				// vertices are not orthogonal.
 				EObject commonAncestor = findCommonAncestor(ancestorLists.get(i), ancestorLists.get(j));
-				if ( commonAncestor instanceof Region ) {
+				if (commonAncestor instanceof Region) {
 					return false;
 				}
 			}
 		}
-		
+
 		return true;
 	}
-	
-	
+
 	/**
-	 * Provides a list of Vertex objects that are source of the provided transitions.
+	 * Provides a list of Vertex objects that are source of the provided
+	 * transitions.
 	 * 
-	 * @param transitions
-	 * @return
 	 */
 	public static List<Vertex> sources(List<Transition> transitions) {
 		List<Vertex> vertices = new ArrayList<Vertex>();
-		
+
 		for (Transition transition : transitions) {
 			vertices.add(transition.getSource());
 		}
-		
+
 		return vertices;
 	}
-	
-	
+
 	/**
-	 * Provides a list of Vertex objects that are target of the provided transitions.
+	 * Provides a list of Vertex objects that are target of the provided
+	 * transitions.
 	 * 
-	 * @param transitions
-	 * @return
 	 */
 	public static List<Vertex> targets(List<Transition> transitions) {
 		List<Vertex> vertices = new ArrayList<Vertex>();
-		
+
 		for (Transition transition : transitions) {
 			vertices.add(transition.getTarget());
 		}
-		
+
 		return vertices;
 	}
-	
-	
+
 	/**
-	 * Returns the first NamedElement from the specified collection that matches the specified name.
+	 * Returns the first NamedElement from the specified collection that matches the
+	 * specified name.
 	 * 
-	 * @param coll
-	 * @param name
-	 * @return
 	 */
 	public static <T extends NamedElement> T firstNamed(Collection<T> coll, String name) {
-		
 		for (T t : coll) {
-			if (name.equals(t.getName())) return t;
+			if (name.equals(t.getName()))
+				return t;
 		}
 		return null;
 	}

+ 36 - 0
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/validation/AbstractSGraphValidator.java

@@ -0,0 +1,36 @@
+/**
+ * Copyright (c) 2012-2018 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.model.sgraph.validation;
+
+import org.eclipse.xtext.validation.AbstractDeclarativeValidator;
+import org.eclipse.xtext.validation.EValidatorRegistrar;
+
+import com.google.inject.Inject;
+
+/**
+ * Abstract base class for all validators that are contributed as composite
+ * checks
+ *
+ */
+public abstract class AbstractSGraphValidator extends AbstractDeclarativeValidator {
+
+	@Override
+	public boolean isLanguageSpecific() {
+		return false;
+	}
+
+	@Override
+	@Inject
+	public void register(EValidatorRegistrar registrar) {
+		// Do not register because this validator is only a composite #398987
+	}
+
+}

+ 34 - 0
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/validation/ChoiceValidator.java

@@ -0,0 +1,34 @@
+/**
+ * Copyright (c) 2012-2018 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.model.sgraph.validation;
+
+import org.eclipse.xtext.validation.Check;
+import org.eclipse.xtext.validation.CheckType;
+import org.yakindu.sct.model.sgraph.Choice;
+
+/**
+ * 
+ * All validation contraints for the meta model element {@link Choice}
+ * 
+ */
+public class ChoiceValidator extends AbstractSGraphValidator {
+
+	private static final String OUTGOING_TRANSITION_COUNT_MSG = "A choice must have at least one outgoing transition.";
+	public static final String OUTGOING_TRANSITION_COUNT_CODE = "choice.out.transition";
+
+	@Check(CheckType.FAST)
+	public void choiceHasOutgoingTransition(Choice choice) {
+		if (choice.getOutgoingTransitions().size() == 0) {
+			error(OUTGOING_TRANSITION_COUNT_MSG, choice, null, -1, OUTGOING_TRANSITION_COUNT_CODE);
+		}
+	}
+
+}

+ 134 - 0
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/validation/EntryExitValidator.java

@@ -0,0 +1,134 @@
+/**
+ * Copyright (c) 2012-2018 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.model.sgraph.validation;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.xtext.validation.Check;
+import org.eclipse.xtext.validation.CheckType;
+import org.yakindu.sct.model.sgraph.CompositeElement;
+import org.yakindu.sct.model.sgraph.Entry;
+import org.yakindu.sct.model.sgraph.EntryKind;
+import org.yakindu.sct.model.sgraph.Exit;
+import org.yakindu.sct.model.sgraph.Region;
+import org.yakindu.sct.model.sgraph.Statechart;
+import org.yakindu.sct.model.sgraph.Transition;
+import org.yakindu.sct.model.sgraph.Vertex;
+
+/**
+ * 
+ * All validation contraints for the meta model elements {@link Entry} and
+ * {@link Exit}
+ *
+ */
+public class EntryExitValidator extends AbstractSGraphValidator {
+
+	private static final String INITIAL_ENTRY_NO_IN_TRANSITION_MSG = "Initial entry should have no incoming transition.";
+	public static final String INITIAL_ENTRY_NO_IN_TRANSITION_CODE = "entry.in.transition";
+
+	public static final String ENTRY_WITH_MULTIPLE_OUT_TRANS_MSG = "Entries must not have more than one outgoing transition.";
+	private static final String INITIAL_ENTRY_ONE_OUT_TRANSITION_MSG = "Initial entry should have exactly one outgoing transition.";
+	public static final String INITIAL_ENTRY_ONE_OUT_TRANSITION_CODE = "entry.out.transition";
+
+	private static final String EXIT_AT_LEAST_ONE_IN_TRANSITION_MSG = "Exit node should have at least one incoming transition.";
+	public static final String EXIT_AT_LEAST_ONE_IN_TRANSITION_CODE = "exit.in.transition";
+
+	private static final String EXIT_NO_OUTGOING_TRANSITION_MSG = "Exit node should have no outgoing transition.";
+	public static final String EXIT_NO_OUTGOING_TRANSITION_CODE = "exit.out.transition";
+
+	private static final String EXIT_NO_TOPLEVEL_REGION_MSG = "Exit node in top level region not supported - use final states instead.";
+	public static final String EXIT_NO_TOPLEVEL_REGION_CODE = "exit.not.toplevel";
+
+	private static final String ENTRY_NO_TRIGGER_MSG = "Outgoing transitions from entry points can not have a trigger or guard.";
+	public static final String ENTRY_NO_TRIGGER_CODE = "entry.no.trigger";
+
+	@Check(CheckType.FAST)
+	public void initialEntryWithoutIncomingTransitions(Entry entry) {
+		if (entry.getIncomingTransitions().size() > 0 && entry.getKind().equals(EntryKind.INITIAL)) {
+			warning(INITIAL_ENTRY_NO_IN_TRANSITION_MSG, entry, null, -1, INITIAL_ENTRY_NO_IN_TRANSITION_CODE);
+		}
+	}
+
+	@Check(CheckType.FAST)
+	public void initialEntryWithoutOutgoingTransition(Entry entry) {
+		if (entry.getOutgoingTransitions().size() > 1) {
+			error(ENTRY_WITH_MULTIPLE_OUT_TRANS_MSG, entry, null, -1, INITIAL_ENTRY_ONE_OUT_TRANSITION_CODE);
+		} else if (entry.getOutgoingTransitions().size() != 1 && ((Entry) entry).getKind().equals(EntryKind.INITIAL)) {
+			warning(INITIAL_ENTRY_ONE_OUT_TRANSITION_MSG, entry, null, -1, INITIAL_ENTRY_ONE_OUT_TRANSITION_CODE);
+		}
+	}
+
+	@Check(CheckType.FAST)
+	public void exitWithoutIncomingTransition(Exit exit) {
+		if (exit.getIncomingTransitions().size() == 0) {
+			warning(EXIT_AT_LEAST_ONE_IN_TRANSITION_MSG, exit, null, -1, EXIT_AT_LEAST_ONE_IN_TRANSITION_CODE);
+		}
+	}
+
+	@Check(CheckType.FAST)
+	public void exitWithOutgoingTransition(Exit exit) {
+		if (exit.getOutgoingTransitions().size() > 0) {
+			error(EXIT_NO_OUTGOING_TRANSITION_MSG, exit, null, -1, EXIT_NO_OUTGOING_TRANSITION_CODE);
+		}
+	}
+
+	@Check(CheckType.FAST)
+	public void exitOnStatechart(Exit exit) {
+		if (exit.getParentRegion().getComposite() instanceof Statechart) {
+			error(EXIT_NO_TOPLEVEL_REGION_MSG, exit, null, -1, EXIT_NO_TOPLEVEL_REGION_CODE);
+		}
+	}
+
+	@Check(CheckType.FAST)
+	public void disallowTrigger(Entry entry) {
+		for (Transition transition : entry.getOutgoingTransitions()) {
+			if (transition.getTrigger() != null) {
+				error(ENTRY_NO_TRIGGER_MSG, entry, null, -1, ENTRY_NO_TRIGGER_CODE);
+			}
+		}
+	}
+
+	private static final String ISSUE_REGION_CANT_BE_ENTERED_USING_SHALLOW_HISTORY_NO_DEFAULT_ENTRY = "The region can't be entered using the shallow history. Add a default entry node.";
+	private static final String ISSUE_REGION_CANT_BE_ENTERED_USING_SHALLOW_HISTORY_NON_CONNECTED_DEFAULT_ENTRY = "The region can't be entered using the shallow history. Add a transition from default entry to a state.";
+
+	@Check(CheckType.FAST)
+	public void regionCantBeEnteredUsingShallowHistory(Entry e) {
+		if (e.getKind() == EntryKind.SHALLOW_HISTORY) {
+			List<Region> regions = new ArrayList<>();
+			for (Vertex v : e.getParentRegion().getVertices()) {
+				if (v instanceof CompositeElement) {
+					regions.addAll(((CompositeElement) v).getRegions());
+				}
+			}
+			for (Region r : regions) {
+				Entry defaultEntry = null;
+				for (Vertex v : r.getVertices()) {
+					if (v instanceof Entry) {
+						String name = v.getName().trim().toLowerCase();
+						if (name != null || "".equals(name) || "default".equals(name)) {
+							defaultEntry = (Entry) v;
+							break;
+						}
+					}
+				}
+				if (defaultEntry == null) {
+					error(ISSUE_REGION_CANT_BE_ENTERED_USING_SHALLOW_HISTORY_NO_DEFAULT_ENTRY, r, null, -1);
+				} else if (defaultEntry.getOutgoingTransitions().size() != 1) {
+					error(ISSUE_REGION_CANT_BE_ENTERED_USING_SHALLOW_HISTORY_NON_CONNECTED_DEFAULT_ENTRY, r, null, -1);
+				}
+			}
+
+		}
+
+	}
+
+}

+ 34 - 0
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/validation/FinalStateValidator.java

@@ -0,0 +1,34 @@
+/**
+ * Copyright (c) 2012-2018 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.model.sgraph.validation;
+
+import org.eclipse.xtext.validation.Check;
+import org.eclipse.xtext.validation.CheckType;
+import org.yakindu.sct.model.sgraph.FinalState;
+
+/**
+ * 
+ * All validation contraints for the meta model element {@link FinalState}
+ * 
+ */
+public class FinalStateValidator extends AbstractSGraphValidator {
+
+	private static final String FINAL_STATE_NO_OUT_TRANSITION_MSG = "A final state should have no outgoing transition.";
+	public static final String FINAL_STATE_NO_OUT_TRANSITION_CODE = "finalstate.out.transition";
+
+	@Check(CheckType.FAST)
+	public void finalStateWithOutgoingTransition(FinalState finalState) {
+		if ((finalState.getOutgoingTransitions().size() > 0)) {
+			warning(FINAL_STATE_NO_OUT_TRANSITION_MSG, finalState, null, -1, FINAL_STATE_NO_OUT_TRANSITION_CODE);
+		}
+	}
+
+}

+ 55 - 80
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/validation/SCTResourceValidator.java

@@ -1,80 +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.model.sgraph.validation;
-
-import java.util.Collection;
-import java.util.Map;
-
-import org.eclipse.emf.ecore.resource.Resource.Diagnostic;
-import org.eclipse.xtext.validation.AbstractDeclarativeValidator;
-import org.eclipse.xtext.validation.Check;
-import org.eclipse.xtext.validation.CheckType;
-import org.eclipse.xtext.validation.EValidatorRegistrar;
-import org.yakindu.sct.model.sgraph.SpecificationElement;
-import org.yakindu.sct.model.sgraph.Statechart;
-import org.yakindu.sct.model.sgraph.resource.AbstractSCTResource;
-
-import com.google.inject.Inject;
-
-/**
- * This validator is intended to be used by a compositeValidator (See
- * {@link org.eclipse.xtext.validation.ComposedChecks}) of another language
- * specific validator. It does not register itself as an EValidator.
- * 
- * It checks for resource errors in {@link AbstractSCTResource}s.
- * 
- * @author andreas muelder - Initial contribution and API
- * @author benjamin schwertfeger
- * 
- */
-public class SCTResourceValidator extends AbstractDeclarativeValidator {
-
-	@Check(CheckType.FAST)
-	public void checkUnresolvableProxies(Statechart sc) {
-		if (!(sc.eResource() instanceof AbstractSCTResource)) {
-			return;
-		}
-		AbstractSCTResource resource = (AbstractSCTResource) sc.eResource();
-		for (Map.Entry<SpecificationElement, Collection<Diagnostic>> entry : resource.getLinkingDiagnostics().asMap()
-				.entrySet()) {
-			for (Diagnostic diag : entry.getValue()) {
-				if (entry.getKey().eResource() != null)
-					error(diag.getMessage(), entry.getKey(), null, -1);
-			}
-		}
-	}
-
-	@Check(CheckType.FAST)
-	public void checkSyntaxErrors(Statechart sc) {
-		if (!(sc.eResource() instanceof AbstractSCTResource)) {
-			return;
-		}
-		AbstractSCTResource resource = (AbstractSCTResource) sc.eResource();
-		for (Map.Entry<SpecificationElement, Collection<Diagnostic>> entry : resource.getSyntaxDiagnostics().asMap()
-				.entrySet()) {
-			for (Diagnostic diag : entry.getValue()) {
-				if (entry.getKey().eResource() != null)
-					error(diag.getMessage(), entry.getKey(), null, -1);
-			}
-		}
-	}
-	
-	@Override
-	public boolean isLanguageSpecific() {
-		return false;
-	}
-
-	@Override
-	@Inject
-	public void register(EValidatorRegistrar registrar) {
-		// Do not register because this validator is only a composite #398987
-	}
-}
+/**
+ * Copyright (c) 2012-2018 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.model.sgraph.validation;
+
+import java.util.Collection;
+import java.util.Map;
+
+import org.eclipse.emf.ecore.resource.Resource.Diagnostic;
+import org.eclipse.xtext.validation.Check;
+import org.eclipse.xtext.validation.CheckType;
+import org.yakindu.sct.model.sgraph.SpecificationElement;
+import org.yakindu.sct.model.sgraph.Statechart;
+import org.yakindu.sct.model.sgraph.resource.AbstractSCTResource;
+
+public class ResourceValidator extends AbstractSGraphValidator {
+
+	@Check(CheckType.FAST)
+	public void checkUnresolvableProxies(Statechart sc) {
+		if (!(sc.eResource() instanceof AbstractSCTResource)) {
+			return;
+		}
+		AbstractSCTResource resource = (AbstractSCTResource) sc.eResource();
+		for (Map.Entry<SpecificationElement, Collection<Diagnostic>> entry : resource.getLinkingDiagnostics().asMap()
+				.entrySet()) {
+			for (Diagnostic diag : entry.getValue()) {
+				if (entry.getKey().eResource() != null)
+					error(diag.getMessage(), entry.getKey(), null, -1);
+			}
+		}
+	}
+
+	@Check(CheckType.FAST)
+	public void checkSyntaxErrors(Statechart sc) {
+		if (!(sc.eResource() instanceof AbstractSCTResource)) {
+			return;
+		}
+		AbstractSCTResource resource = (AbstractSCTResource) sc.eResource();
+		for (Map.Entry<SpecificationElement, Collection<Diagnostic>> entry : resource.getSyntaxDiagnostics().asMap()
+				.entrySet()) {
+			for (Diagnostic diag : entry.getValue()) {
+				if (entry.getKey().eResource() != null)
+					error(diag.getMessage(), entry.getKey(), null, -1);
+			}
+		}
+	}
+
+}

+ 9 - 404
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/validation/SGraphJavaValidator.java

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2012-2016 committers of YAKINDU and others.
+ * Copyright (c) 2012-2018 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
@@ -10,416 +10,21 @@
  */
 package org.yakindu.sct.model.sgraph.validation;
 
-import static org.yakindu.sct.model.sgraph.util.SGgraphUtil.areOrthogonal;
-import static org.yakindu.sct.model.sgraph.util.SGgraphUtil.collectAncestors;
-import static org.yakindu.sct.model.sgraph.util.SGgraphUtil.commonAncestor;
-import static org.yakindu.sct.model.sgraph.util.SGgraphUtil.sources;
-import static org.yakindu.sct.model.sgraph.util.SGgraphUtil.targets;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.emf.common.util.TreeIterator;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.xtext.EcoreUtil2;
-import org.eclipse.xtext.validation.AbstractDeclarativeValidator;
-import org.eclipse.xtext.validation.Check;
-import org.eclipse.xtext.validation.CheckType;
-import org.eclipse.xtext.validation.EValidatorRegistrar;
-import org.yakindu.base.base.BasePackage;
-import org.yakindu.sct.model.sgraph.Choice;
-import org.yakindu.sct.model.sgraph.CompositeElement;
-import org.yakindu.sct.model.sgraph.Entry;
-import org.yakindu.sct.model.sgraph.EntryKind;
-import org.yakindu.sct.model.sgraph.Exit;
-import org.yakindu.sct.model.sgraph.FinalState;
-import org.yakindu.sct.model.sgraph.Region;
-import org.yakindu.sct.model.sgraph.Statechart;
-import org.yakindu.sct.model.sgraph.Synchronization;
-import org.yakindu.sct.model.sgraph.Transition;
-import org.yakindu.sct.model.sgraph.Vertex;
-
-import com.google.inject.Inject;
+import org.eclipse.xtext.validation.ComposedChecks;
+import org.yakindu.sct.model.sgraph.SGraphPackage;
 
 /**
+ * Root validator for all elements contained in {@link SGraphPackage}
+ * 
  * This validator is intended to be used by a compositeValidator (See
  * {@link org.eclipse.xtext.validation.ComposedChecks}) of another language
  * specific validator. It does not register itself as an EValidator.
  *
- * This validator checks for common graphical constraints for all kinds of state
- * charts.
  *
- * @author terfloth
- * @author muelder
- * @author bohl - migrated to xtext infrastruture
- * @author schwertfeger
- * @author antony
  */
-public class SGraphJavaValidator extends AbstractDeclarativeValidator {
-
-	public static final String ISSUE_STATE_WITHOUT_NAME = "A state must have a name.";
-	public static final String ISSUE_NODE_NOT_REACHABLE = "Node is not reachable.";
-	public static final String ISSUE_FINAL_STATE_OUTGOING_TRANSITION = "A final state should have no outgoing transition.";
-	public static final String ISSUE_STATE_WITHOUT_OUTGOING_TRANSITION = "A state should have at least one outgoing transition.";
-	public static final String ISSUE_INITIAL_ENTRY_WITH_IN_TRANS = "Initial entry should have no incoming transition.";
-	public static final String ISSUE_INITIAL_ENTRY_WITHOUT_OUT_TRANS = "Initial entry should have a single outgoing transition.";
-	public static final String ISSUE_ENTRY_WITH_MULTIPLE_OUT_TRANS = "Entries must not have more than one outgoing transition.";
-	public static final String ISSUE_ENTRY_WITH_TRIGGER = "Outgoing transitions from entry points can not have a trigger or guard.";
-	public static final String ISSUE_EXIT_WITH_OUT_TRANS = "Exit node should have no outgoing transition.";
-	public static final String ISSUE_EXIT_WITHOUT_IN_TRANS = "Exit node should have at least one incoming transition.";
-	public static final String ISSUE_EXIT_ON_STATECHART = "Exit node in top level region not supported - use final states instead.";
-	public static final String ISSUE_CHOICE_WITHOUT_OUTGOING_TRANSITION = "A choice must have at least one outgoing transition.";
-	public static final String ISSUE_REGION_CANT_BE_ENTERED_USING_SHALLOW_HISTORY_NO_DEFAULT_ENTRY = "The region can't be entered using the shallow history. Add a default entry node.";
-	public static final String ISSUE_REGION_CANT_BE_ENTERED_USING_SHALLOW_HISTORY_NON_CONNECTED_DEFAULT_ENTRY = "The region can't be entered using the shallow history. Add a transition from default entry to a state.";
-	public static final String ISSUE_SUBMACHINE_UNRESOLVABLE = "Referenced substate machine '%s'does not exist!";
-	public static final String ISSUE_SYNCHRONIZATION_TARGET_STATES_NOT_ORTHOGONAL = "The target states of a synchronization must be orthogonal!";
-	public static final String ISSUE_SYNCHRONIZATION_SOURCE_STATES_NOT_ORTHOGONAL = "The source states of a synchronization must be orthogonal!";
-	public static final String ISSUE_SYNCHRONIZATION_TRANSITION_COUNT = "A synchronization must have at least two incoming or two outgoing transitions.";
-	public static final String ISSUE_SYNCHRONIZATION_TRANSITION_OUTGOING = "A synchronization must have an outgoing transition.";
-	public static final String ISSUE_SYNCHRONIZATION_SOURCE_TARGET_STATES_PARENT_REGION = "A synchronization's source- and parent states last common ancestor has to be a region!";
-	public static final String ISSUE_TRANSITION_ORTHOGONAL = "Source and target of a transition must not be located in orthogonal regions!";
-	public static final String ISSUE_INITIAL_ENTRY_WITH_TRANSITION_TO_CONTAINER = "Outgoing transitions from entries can only target to sibling or inner states.";
-	public static final String ISSUE_STATECHART_NAME_NO_IDENTIFIER = "%s is not a valid identifier!";
-
-	@Check(CheckType.FAST)
-	public void vertexNotReachable(final Vertex vertex) {
-		if (!(vertex instanceof Entry)) {
-
-			final Set<Object> stateScopeSet = new HashSet<>();
-			for (EObject obj : EcoreUtil2.eAllContents(vertex)) {
-				stateScopeSet.add(obj);
-			}
-			stateScopeSet.add(vertex);
-
-			final List<Object> externalPredecessors = new ArrayList<>();
-
-			DFS dfs = new DFS() {
-
-				@Override
-				public Iterator<Object> getElementLinks(Object element) {
-					List<Object> elements = new ArrayList<>();
-
-					if (element instanceof org.yakindu.sct.model.sgraph.State) {
-						if (!stateScopeSet.contains(element)) {
-							externalPredecessors.add(element);
-						} else {
-							elements.addAll(((org.yakindu.sct.model.sgraph.State) element).getRegions());
-							elements.addAll(((org.yakindu.sct.model.sgraph.State) element).getIncomingTransitions());
-						}
-
-					} else if (element instanceof Region) {
-						elements.addAll(((Region) element).getVertices());
-					} else if (element instanceof Entry) {
-						if (!stateScopeSet.contains(element)) {
-							externalPredecessors.add(element);
-						} else {
-							elements.addAll(((Entry) element).getIncomingTransitions());
-						}
-
-					} else if (element instanceof Vertex) {
-						elements.addAll(((Vertex) element).getIncomingTransitions());
-
-					} else if (element instanceof Transition) {
-						elements.add(((Transition) element).getSource());
-
-					}
-
-					return elements.iterator();
-				}
-			};
-
-			dfs.perform(vertex);
-
-			if (externalPredecessors.size() == 0) {
-				error(ISSUE_NODE_NOT_REACHABLE, vertex, null, -1);
-			}
-		}
-	}
-
-	/**
-	 * Calculates all predecessor states
-	 */
-
-	@Check(CheckType.FAST)
-	public void finalStateWithOutgoingTransition(FinalState finalState) {
-		if ((finalState.getOutgoingTransitions().size() > 0)) {
-			warning(ISSUE_FINAL_STATE_OUTGOING_TRANSITION, finalState, null, -1);
-		}
-	}
-
-	@Check(CheckType.FAST)
-	public void nameIsNotEmpty(org.yakindu.sct.model.sgraph.State state) {
-		if ((state.getName() == null || state.getName().trim().length() == 0) && !(state instanceof FinalState)) {
-			error(ISSUE_STATE_WITHOUT_NAME, state, null, -1, ISSUE_STATE_WITHOUT_NAME,
-					BasePackage.Literals.NAMED_ELEMENT__NAME.getName());
-		}
-	}
-
-	@Check(CheckType.FAST)
-	public void choiceWithoutOutgoingTransition(Choice choice) {
-		// Choice without outgoing transition
-		if (choice.getOutgoingTransitions().size() == 0) {
-			error(ISSUE_CHOICE_WITHOUT_OUTGOING_TRANSITION, choice, null, -1);
-		}
-	}
-
-	@Check(CheckType.FAST)
-	public void disallowTrigger(Entry entry) {
-		for (Transition transition : entry.getOutgoingTransitions()) {
-			if (transition.getTrigger() != null) {
-				error(ISSUE_ENTRY_WITH_TRIGGER, entry, null, -1);
-			}
-		}
-	}
-
-	@Check(CheckType.FAST)
-	public void initialEntryWithoutIncomingTransitions(Entry entry) {
-		if (entry.getIncomingTransitions().size() > 0 && entry.getKind().equals(EntryKind.INITIAL)) {
-			warning(ISSUE_INITIAL_ENTRY_WITH_IN_TRANS, entry, null, -1);
-		}
-	}
-
-	@Check(CheckType.FAST)
-	public void initialEntryWithoutOutgoingTransition(Entry entry) {
-		if (entry.getOutgoingTransitions().size() == 0 && ((Entry) entry).getKind().equals(EntryKind.INITIAL)) {
-			warning(ISSUE_INITIAL_ENTRY_WITHOUT_OUT_TRANS, entry, null, -1);
-		}
-	}
-
-	@Check(CheckType.FAST)
-	public void initialEntryWithMultipleOutgoingTransition(Entry entry) {
-		if (entry.getOutgoingTransitions().size() > 1) {
-			error(ISSUE_ENTRY_WITH_MULTIPLE_OUT_TRANS, entry, null, -1);
-		}
-	}
-
-	@Check(CheckType.FAST)
-	public void exitWithoutIncomingTransition(Exit exit) {
-		if (exit.getIncomingTransitions().size() == 0) {
-			warning(ISSUE_EXIT_WITHOUT_IN_TRANS, exit, null, -1);
-		}
-	}
-
-	@Check(CheckType.FAST)
-	public void exitWithOutgoingTransition(Exit exit) {
-		if (exit.getOutgoingTransitions().size() > 0) {
-			error(ISSUE_EXIT_WITH_OUT_TRANS, exit, null, -1);
-		}
-	}
-
-	/**
-	 * Exit nodes in top level regions are not supported.
-	 *
-	 * @param exit
-	 */
-	@Check(CheckType.FAST)
-	public void exitOnStatechart(Exit exit) {
-		if (exit.getParentRegion().getComposite() instanceof Statechart) {
-			error(ISSUE_EXIT_ON_STATECHART, exit, null, -1);
-		}
-	}
-
-	@Check(CheckType.FAST)
-	public void synchronizationOutgoingTransitionCount(Synchronization sync) {
-		if (sync.getOutgoingTransitions().size() == 0) {
-			error(ISSUE_SYNCHRONIZATION_TRANSITION_OUTGOING, sync, null, -1);
-		}
-	}
-
-	@Check(CheckType.FAST)
-	public void synchronizationTransitionCount(Synchronization sync) {
-		int in = sync.getIncomingTransitions().size();
-		int out = sync.getOutgoingTransitions().size();
-		if (in < 2 && out < 2) {
-			error(ISSUE_SYNCHRONIZATION_TRANSITION_COUNT, sync, null, -1);
-		}
-	}
-
-	@Check(CheckType.FAST)
-	public void initialEntryWithTransitionToContainer(Transition t) {
-		if (t.getSource() instanceof Entry && !isChildOrSibling(t.getSource(), t.getTarget())) {
-			error(ISSUE_INITIAL_ENTRY_WITH_TRANSITION_TO_CONTAINER, t, null, -1);
-		}
-	}
-
-	private boolean isChildOrSibling(Vertex source, Vertex target) {
-		TreeIterator<EObject> iter = source.getParentRegion().eAllContents();
-		while (iter.hasNext()) {
-			if (target == iter.next()) {
-				return true;
-			}
-		}
-		return false;
-	}
-
-	/**
-	 * Checks if all composite states that are siblings of a shallow history can
-	 * enter their regions.
-	 *
-	 * @param e
-	 */
-	@Check(CheckType.FAST)
-	public void regionCantBeEnteredUsingShallowHistory(Entry e) {
-
-		if (e.getKind() == EntryKind.SHALLOW_HISTORY) {
-
-			// get all regions off all sibling states
-			List<Region> regions = new ArrayList<>();
-			for (Vertex v : e.getParentRegion().getVertices()) {
-				if (v instanceof org.yakindu.sct.model.sgraph.State) {
-					org.yakindu.sct.model.sgraph.State state = (org.yakindu.sct.model.sgraph.State) v;
-					regions.addAll(state.getRegions());
-				}
-			}
-
-			// check each region
-			for (Region r : regions) {
-
-				// first determine if the region contains a default entry
-				Entry defaultEntry = null;
-				for (Vertex v : r.getVertices()) {
-					if (v instanceof Entry) {
-						String name = v.getName().trim().toLowerCase();
-						if (name != null || "".equals(name) || "default".equals(name)) {
-							defaultEntry = (Entry) v;
-							break;
-						}
-					}
-				}
-
-				// now check error conditions
-				if (defaultEntry == null) {
-					error(ISSUE_REGION_CANT_BE_ENTERED_USING_SHALLOW_HISTORY_NO_DEFAULT_ENTRY, r, null, -1);
-				} else if (defaultEntry.getOutgoingTransitions().size() != 1) {
-					error(ISSUE_REGION_CANT_BE_ENTERED_USING_SHALLOW_HISTORY_NON_CONNECTED_DEFAULT_ENTRY, r, null, -1);
-				}
-			}
-
-		}
-
-	}
-
-	@Check
-	public void orthogonalTransition(Transition transition) {
-
-		Vertex source = transition.getSource();
-		Vertex target = transition.getTarget();
-
-		if ((source instanceof Synchronization) || (target instanceof Synchronization))
-			return; // ... the check does not apply.
-
-		EObject commonAncestor = commonAncestor(source, target);
-
-		if (commonAncestor instanceof CompositeElement) {
-
-			error(ISSUE_TRANSITION_ORTHOGONAL, transition, null, -1);
-		}
-	}
-
-	@Check
-	public void orthogonalSourceStates(Synchronization sync) {
-
-		List<Vertex> sourceVertices = sources(sync.getIncomingTransitions());
-
-		if (!areOrthogonal(sourceVertices)) {
-			error(ISSUE_SYNCHRONIZATION_SOURCE_STATES_NOT_ORTHOGONAL, sync, null, -1);
-		}
-	}
-
-	@Check
-	public void orthogonalTargetStates(Synchronization sync) {
-
-		List<Vertex> sourceVertices = targets(sync.getOutgoingTransitions());
-
-		if (!areOrthogonal(sourceVertices)) {
-			error(ISSUE_SYNCHRONIZATION_TARGET_STATES_NOT_ORTHOGONAL, sync, null, -1);
-		}
-	}
-
-	@Check
-	public void orthogonalSynchronizedTransition(Synchronization sync) {
-
-		List<Transition> incoming = sync.getIncomingTransitions();
-		List<List<EObject>> inAncestorsList = new ArrayList<>();
-		for (Transition trans : incoming) {
-			inAncestorsList.add(collectAncestors(trans.getSource(), new ArrayList<EObject>()));
-		}
-
-		List<Transition> outgoing = sync.getOutgoingTransitions();
-		List<List<EObject>> outAncestorsList = new ArrayList<>();
-		for (Transition trans : outgoing) {
-			outAncestorsList.add(collectAncestors(trans.getTarget(), new ArrayList<EObject>()));
-		}
-
-		Set<Transition> inOrthogonal = new HashSet<>();
-		Set<Transition> outOrthogonal = new HashSet<>();
-
-		if (incoming.size() == 0 || outgoing.size() == 0) {
-			return;
-		}
-
-		for (int i = 0; i < incoming.size(); i++) {
-			for (int j = 0; j < outgoing.size(); j++) {
-
-				List<Vertex> states = new ArrayList<>(
-						Arrays.asList(incoming.get(i).getSource(), outgoing.get(j).getTarget()));
-
-				if (areOrthogonal(states)) {
-					inOrthogonal.add(incoming.get(i));
-					outOrthogonal.add(outgoing.get(j));
-				}
-			}
-		}
-
-		for (Transition trans : inOrthogonal) {
-			error(ISSUE_SYNCHRONIZATION_SOURCE_TARGET_STATES_PARENT_REGION, trans, null, -1);
-		}
-
-		for (Transition trans : outOrthogonal) {
-			error(ISSUE_SYNCHRONIZATION_SOURCE_TARGET_STATES_PARENT_REGION, trans, null, -1);
-		}
-
-	}
-
-	@Check
-	public void checkStatechartNameIsIdentifier(Statechart statechart) {
-		if (!isValidJavaIdentifier(statechart.getName())) {
-			error(String.format(ISSUE_STATECHART_NAME_NO_IDENTIFIER, statechart.getName()), statechart,
-					BasePackage.Literals.NAMED_ELEMENT__NAME, -1);
-
-		}
-	}
-
-	protected boolean isValidJavaIdentifier(String s) {
-		if (s == null || s.length() == 0) {
-			return false;
-		}
-
-		char[] c = s.toCharArray();
-		if (!Character.isJavaIdentifierStart(c[0])) {
-			return false;
-		}
-
-		for (int i = 1; i < c.length; i++) {
-			if (!Character.isJavaIdentifierPart(c[i])) {
-				return false;
-			}
-		}
-		return true;
-	}
-
-	@Override
-	public boolean isLanguageSpecific() {
-		return false;
-	}
+@ComposedChecks(validators = { ResourceValidator.class, StatechartValidator.class, StateValidator.class,
+		ChoiceValidator.class, EntryExitValidator.class, FinalStateValidator.class, SynchronizationValidator.class,
+		TransitionValidator.class, VertexValidator.class })
+public class SGraphJavaValidator extends AbstractSGraphValidator {
 
-	@Override
-	@Inject
-	public void register(EValidatorRegistrar registrar) {
-		// Do not register because this validator is only a composite #398987
-	}
 }

+ 45 - 0
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/validation/StateValidator.java

@@ -0,0 +1,45 @@
+/**
+ * Copyright (c) 2012-2018 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.model.sgraph.validation;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.xtext.validation.Check;
+import org.eclipse.xtext.validation.CheckType;
+import org.yakindu.base.base.BasePackage;
+import org.yakindu.sct.model.sgraph.FinalState;
+
+/**
+ * 
+ * All validation contraints for the meta model element {@link State}
+ * 
+ */
+public class StateValidator extends AbstractSGraphValidator {
+
+	private static final String ISSUE_STATE_NAME_MSG = "A state must have a name.";
+	public static final String ISSUE_STATE_NAME_CODE = "state.name";
+
+	@Check(CheckType.FAST)
+	public void nameIsNotEmpty(org.yakindu.sct.model.sgraph.State state) {
+		if ((state.getName() == null || state.getName().trim().length() == 0) && !(state instanceof FinalState)) {
+			error(ISSUE_STATE_NAME_MSG, state, null, -1, ISSUE_STATE_NAME_CODE,
+					BasePackage.Literals.NAMED_ELEMENT__NAME.getName());
+		}
+	}
+	
+	@Override
+	protected List<EPackage> getEPackages() {
+		// TODO Auto-generated method stub
+		return super.getEPackages();
+	}
+	
+}

+ 52 - 0
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/validation/StatechartValidator.java

@@ -0,0 +1,52 @@
+/**
+ * Copyright (c) 2012-2018 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.model.sgraph.validation;
+
+import org.eclipse.xtext.validation.Check;
+import org.yakindu.base.base.BasePackage;
+import org.yakindu.sct.model.sgraph.Statechart;
+
+/**
+ * 
+ * All validation contraints for the meta model element {@link Statechart}
+ * 
+ */
+public class StatechartValidator extends AbstractSGraphValidator {
+
+	private static final String STATECHART_NAME_VALID_IDENTIFIER_MSG = "%s is not a valid identifier!";
+	public static final String STATECHART_NAME_VALID_IDENTIFIER_CODE = "statechart.name";
+
+	@Check
+	public void checkStatechartNameIsIdentifier(Statechart statechart) {
+		if (!isValidJavaIdentifier(statechart.getName())) {
+			error(String.format(STATECHART_NAME_VALID_IDENTIFIER_MSG, statechart.getName()), statechart,
+					BasePackage.Literals.NAMED_ELEMENT__NAME, -1, STATECHART_NAME_VALID_IDENTIFIER_CODE);
+
+		}
+	}
+
+	protected boolean isValidJavaIdentifier(String s) {
+		if (s == null || s.length() == 0) {
+			return false;
+		}
+		char[] c = s.toCharArray();
+		if (!Character.isJavaIdentifierStart(c[0])) {
+			return false;
+		}
+		for (int i = 1; i < c.length; i++) {
+			if (!Character.isJavaIdentifierPart(c[i])) {
+				return false;
+			}
+		}
+		return true;
+	}
+
+}

+ 129 - 0
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/validation/SynchronizationValidator.java

@@ -0,0 +1,129 @@
+/**
+ * Copyright (c) 2012-2018 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.model.sgraph.validation;
+
+import static org.yakindu.sct.model.sgraph.util.SGgraphUtil.areOrthogonal;
+import static org.yakindu.sct.model.sgraph.util.SGgraphUtil.collectAncestors;
+import static org.yakindu.sct.model.sgraph.util.SGgraphUtil.sources;
+import static org.yakindu.sct.model.sgraph.util.SGgraphUtil.targets;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.validation.Check;
+import org.eclipse.xtext.validation.CheckType;
+import org.yakindu.sct.model.sgraph.Synchronization;
+import org.yakindu.sct.model.sgraph.Transition;
+import org.yakindu.sct.model.sgraph.Vertex;
+
+/**
+ * 
+ * All validation constraints for the meta model element {@link Synchronization}
+ * 
+ */
+public class SynchronizationValidator extends AbstractSGraphValidator {
+
+	private static final String SYNCHRONIZATION_TRANSITION_OUTGOING_MSG = "A synchronization must have an outgoing transition.";
+	public static final String SYNCHRONIZATION_TRANSITION_OUTGOING_CODE = "synchronization.out.transition";
+
+	private static final String SYNCHRONIZATION_TRANSITION_COUNT_MSG = "A synchronization must have at least two incoming or two outgoing transitions.";
+	public static final String SYNCHRONIZATION_TRANSITION_COUNT_CODE = "synchronization.transition";
+
+	private static final String SYNCHRONIZATION_SOURCE_ORTHOGONAL_MSG = "The source states of a synchronization must be orthogonal.";
+	public static final String SYNCHRONIZATION_SOURCE_ORTHOGONAL_CODE = "synchronization.source.orthogonal";
+
+	private static final String SYNCHRONIZATION_TARGET_ORTHOGONAL_MSG = "The target states of a synchronization must be orthogonal.";
+	public static final String SYNCHRONIZATION_TARGET_ORTHOGONAL_CODE = "synchronization.target.orthogonal";
+
+	private static final String SYNCHRONIZATION_SOURCE_TARGET_PARENT_REGION_MSG = "A synchronization's source- and parent states common ancestor has to be a region.";
+	public static final String SYNCHRONIZATION_SOURCE_TARGET_PARENT_REGION_CODE = "synchronization.source.target.ancestor";
+
+	@Check(CheckType.FAST)
+	public void synchronizationOutgoingTransitionCount(Synchronization sync) {
+		if (sync.getOutgoingTransitions().size() == 0) {
+			error(SYNCHRONIZATION_TRANSITION_OUTGOING_MSG, sync, null, -1, SYNCHRONIZATION_TRANSITION_OUTGOING_CODE);
+		}
+	}
+
+	@Check(CheckType.FAST)
+	public void synchronizationTransitionCount(Synchronization sync) {
+		int in = sync.getIncomingTransitions().size();
+		int out = sync.getOutgoingTransitions().size();
+		if (in < 2 && out < 2) {
+			error(SYNCHRONIZATION_TRANSITION_COUNT_MSG, sync, null, -1, SYNCHRONIZATION_TRANSITION_COUNT_CODE);
+		}
+	}
+
+	@Check
+	public void orthogonalSourceStates(Synchronization sync) {
+		List<Vertex> sourceVertices = sources(sync.getIncomingTransitions());
+		if (!areOrthogonal(sourceVertices)) {
+			error(SYNCHRONIZATION_SOURCE_ORTHOGONAL_MSG, sync, null, -1, SYNCHRONIZATION_SOURCE_ORTHOGONAL_CODE);
+		}
+	}
+
+	@Check
+	public void orthogonalTargetStates(Synchronization sync) {
+		List<Vertex> sourceVertices = targets(sync.getOutgoingTransitions());
+		if (!areOrthogonal(sourceVertices)) {
+			error(SYNCHRONIZATION_TARGET_ORTHOGONAL_MSG, sync, null, -1, SYNCHRONIZATION_TARGET_ORTHOGONAL_CODE);
+		}
+	}
+
+	@Check
+	public void orthogonalSynchronizedTransition(Synchronization sync) {
+		List<Transition> incoming = sync.getIncomingTransitions();
+		List<List<EObject>> inAncestorsList = new ArrayList<>();
+		for (Transition trans : incoming) {
+			inAncestorsList.add(collectAncestors(trans.getSource(), new ArrayList<EObject>()));
+		}
+
+		List<Transition> outgoing = sync.getOutgoingTransitions();
+		List<List<EObject>> outAncestorsList = new ArrayList<>();
+		for (Transition trans : outgoing) {
+			outAncestorsList.add(collectAncestors(trans.getTarget(), new ArrayList<EObject>()));
+		}
+
+		Set<Transition> inOrthogonal = new HashSet<>();
+		Set<Transition> outOrthogonal = new HashSet<>();
+
+		if (incoming.size() == 0 || outgoing.size() == 0) {
+			return;
+		}
+
+		for (int i = 0; i < incoming.size(); i++) {
+			for (int j = 0; j < outgoing.size(); j++) {
+
+				List<Vertex> states = new ArrayList<>(
+						Arrays.asList(incoming.get(i).getSource(), outgoing.get(j).getTarget()));
+
+				if (areOrthogonal(states)) {
+					inOrthogonal.add(incoming.get(i));
+					outOrthogonal.add(outgoing.get(j));
+				}
+			}
+		}
+		for (Transition trans : inOrthogonal) {
+			error(SYNCHRONIZATION_SOURCE_TARGET_PARENT_REGION_MSG, trans, null, -1,
+					SYNCHRONIZATION_SOURCE_TARGET_PARENT_REGION_CODE);
+		}
+		for (Transition trans : outOrthogonal) {
+			error(SYNCHRONIZATION_SOURCE_TARGET_PARENT_REGION_MSG, trans, null, -1,
+					SYNCHRONIZATION_SOURCE_TARGET_PARENT_REGION_CODE);
+		}
+
+	}
+
+}

+ 68 - 0
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/validation/TransitionValidator.java

@@ -0,0 +1,68 @@
+/**
+ * Copyright (c) 2012-2018 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.model.sgraph.validation;
+
+import static org.yakindu.sct.model.sgraph.util.SGgraphUtil.commonAncestor;
+
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.validation.Check;
+import org.eclipse.xtext.validation.CheckType;
+import org.yakindu.sct.model.sgraph.CompositeElement;
+import org.yakindu.sct.model.sgraph.Entry;
+import org.yakindu.sct.model.sgraph.Synchronization;
+import org.yakindu.sct.model.sgraph.Transition;
+import org.yakindu.sct.model.sgraph.Vertex;
+
+/**
+ * 
+ * All validation constraints for the meta model element {@link Transition}
+ * 
+ */
+public class TransitionValidator extends AbstractSGraphValidator {
+
+	private static final String TRANSITION_SOURCE_TARGET_NOT_ORTHOGONAL_MSG = "Source and target of a transition must not be located in orthogonal regions!";
+	public static final String TRANSITION_SOURCE_TARGET_NOT_ORTHOGONAL_CODE = "transition.source.target";
+
+	private static final String INITIAL_ENTRY_WITH_TRANSITION_TO_CONTAINER_MSG = "Outgoing transitions from entries can only target to sibling or inner states.";
+	public static final String INITIAL_ENTRY_WITH_TRANSITION_TO_CONTAINER_CODE = "transition.source.entry";
+
+	@Check
+	public void orthogonalTransition(Transition transition) {
+		Vertex source = transition.getSource();
+		Vertex target = transition.getTarget();
+		if ((source instanceof Synchronization) || (target instanceof Synchronization))
+			return;
+		EObject commonAncestor = commonAncestor(source, target);
+		if (commonAncestor instanceof CompositeElement) {
+			error(TRANSITION_SOURCE_TARGET_NOT_ORTHOGONAL_MSG, transition, null, -1,
+					TRANSITION_SOURCE_TARGET_NOT_ORTHOGONAL_CODE);
+		}
+	}
+
+	@Check(CheckType.FAST)
+	public void initialEntryWithTransitionToContainer(Transition t) {
+		if (t.getSource() instanceof Entry && !isChildOrSibling(t.getSource(), t.getTarget())) {
+			error(INITIAL_ENTRY_WITH_TRANSITION_TO_CONTAINER_MSG, t, null, -1,
+					INITIAL_ENTRY_WITH_TRANSITION_TO_CONTAINER_CODE);
+		}
+	}
+
+	protected boolean isChildOrSibling(Vertex source, Vertex target) {
+		TreeIterator<EObject> iter = source.getParentRegion().eAllContents();
+		while (iter.hasNext()) {
+			if (target == iter.next()) {
+				return true;
+			}
+		}
+		return false;
+	}
+}

+ 91 - 0
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/validation/VertexValidator.java

@@ -0,0 +1,91 @@
+/**
+ * Copyright (c) 2012-2018 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.model.sgraph.validation;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.EcoreUtil2;
+import org.eclipse.xtext.validation.Check;
+import org.eclipse.xtext.validation.CheckType;
+import org.yakindu.sct.model.sgraph.Entry;
+import org.yakindu.sct.model.sgraph.Region;
+import org.yakindu.sct.model.sgraph.Transition;
+import org.yakindu.sct.model.sgraph.Vertex;
+import org.yakindu.sct.model.sgraph.util.DFS;
+
+/**
+ * 
+ * All validation constraints for the meta model element {@link Vertex}
+ * 
+ */
+public class VertexValidator extends AbstractSGraphValidator {
+
+	private static final String VERTEX_REACHABLE_MSG = "Node is not reachable.";
+	public static final String VERTEX_REACHABLE_CODE = "vertex.reachable";
+
+	@Check(CheckType.FAST)
+	public void vertexNotReachable(final Vertex vertex) {
+		if (!(vertex instanceof Entry)) {
+			final Set<Object> stateScopeSet = new HashSet<>();
+			for (EObject obj : EcoreUtil2.eAllContents(vertex)) {
+				stateScopeSet.add(obj);
+			}
+			stateScopeSet.add(vertex);
+			final List<Object> externalPredecessors = new ArrayList<>();
+			DFS dfs = new DFS() {
+
+				@Override
+				public Iterator<Object> getElementLinks(Object element) {
+					List<Object> elements = new ArrayList<>();
+
+					if (element instanceof org.yakindu.sct.model.sgraph.State) {
+						if (!stateScopeSet.contains(element)) {
+							externalPredecessors.add(element);
+						} else {
+							elements.addAll(((org.yakindu.sct.model.sgraph.State) element).getRegions());
+							elements.addAll(((org.yakindu.sct.model.sgraph.State) element).getIncomingTransitions());
+						}
+
+					} else if (element instanceof Region) {
+						elements.addAll(((Region) element).getVertices());
+					} else if (element instanceof Entry) {
+						if (!stateScopeSet.contains(element)) {
+							externalPredecessors.add(element);
+						} else {
+							elements.addAll(((Entry) element).getIncomingTransitions());
+						}
+
+					} else if (element instanceof Vertex) {
+						elements.addAll(((Vertex) element).getIncomingTransitions());
+
+					} else if (element instanceof Transition) {
+						elements.add(((Transition) element).getSource());
+
+					}
+
+					return elements.iterator();
+				}
+			};
+
+			dfs.perform(vertex);
+
+			if (externalPredecessors.size() == 0) {
+				error(VERTEX_REACHABLE_MSG, vertex, null, -1, VERTEX_REACHABLE_CODE);
+			}
+		}
+	}
+
+}

+ 5 - 4
plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/validation/STextJavaValidator.java

@@ -78,7 +78,6 @@ import org.yakindu.sct.model.sgraph.Trigger;
 import org.yakindu.sct.model.sgraph.Vertex;
 import org.yakindu.sct.model.sgraph.resource.AbstractSCTResource;
 import org.yakindu.sct.model.sgraph.util.ContextElementAdapter;
-import org.yakindu.sct.model.sgraph.validation.SCTResourceValidator;
 import org.yakindu.sct.model.sgraph.validation.SGraphJavaValidator;
 import org.yakindu.sct.model.stext.scoping.IPackageImport2URIMapper;
 import org.yakindu.sct.model.stext.scoping.IPackageImport2URIMapper.PackageImport;
@@ -120,7 +119,7 @@ import com.google.inject.name.Named;
  * @author muelder
  * 
  */
-@ComposedChecks(validators = { SGraphJavaValidator.class, SCTResourceValidator.class, ExpressionsJavaValidator.class,
+@ComposedChecks(validators = { SGraphJavaValidator.class, ExpressionsJavaValidator.class,
 		STextNamesAreUniqueValidator.class })
 public class STextJavaValidator extends AbstractSTextJavaValidator implements STextValidationMessages {
 
@@ -588,7 +587,8 @@ public class STextJavaValidator extends AbstractSTextJavaValidator implements ST
 
 	@Check(CheckType.FAST)
 	public void checkAnnotationArguments(ArgumentedAnnotation annotation) {
-		if (annotation.getType() != null && annotation.getExpressions().size() != annotation.getType().getProperties().size()) {
+		if (annotation.getType() != null
+				&& annotation.getExpressions().size() != annotation.getType().getProperties().size()) {
 			error(String.format(ERROR_WRONG_NUMBER_OF_ARGUMENTS_MSG, annotation.getType().getProperties()), null,
 					ERROR_WRONG_NUMBER_OF_ARGUMENTS_CODE);
 		}
@@ -959,7 +959,8 @@ public class STextJavaValidator extends AbstractSTextJavaValidator implements ST
 		if (provider == null || provider.getElement() == null) {
 			return EcoreUtil2.getContainerOfType(context, Statechart.class);
 		} else {
-			if(provider.getElement().eResource() == null) return null;
+			if (provider.getElement().eResource() == null)
+				return null;
 			return (Statechart) EcoreUtil.getObjectByType(provider.getElement().eResource().getContents(),
 					SGraphPackage.Literals.STATECHART);
 		}

+ 67 - 89
plugins/org.yakindu.sct.ui.navigator/src/org/yakindu/sct/ui/navigator/StatechartNavigatorContentProvider.java

@@ -40,8 +40,7 @@ import org.yakindu.sct.ui.navigator.utils.ComposedAdapterFactoryUtil;
  * @author markus.muehlbrandt
  * 
  */
-public class StatechartNavigatorContentProvider implements
-		ICommonContentProvider {
+public class StatechartNavigatorContentProvider implements ICommonContentProvider {
 
 	private AdapterFactoryContentProvider myAdapterFctoryContentProvier;
 
@@ -60,26 +59,23 @@ public class StatechartNavigatorContentProvider implements
 	private ViewerFilter viewerFilter;
 
 	public StatechartNavigatorContentProvider() {
-		myAdapterFctoryContentProvier = new AdapterFactoryContentProvider(
-				ComposedAdapterFactoryUtil.FACTORY);
+		myAdapterFctoryContentProvier = new AdapterFactoryContentProvider(ComposedAdapterFactoryUtil.FACTORY);
 
-		TransactionalEditingDomain editingDomain = GMFEditingDomainFactory.INSTANCE
-				.createEditingDomain();
+		TransactionalEditingDomain editingDomain = GMFEditingDomainFactory.INSTANCE.createEditingDomain();
 		myEditingDomain = (AdapterFactoryEditingDomain) editingDomain;
-		myEditingDomain
-				.setResourceToReadOnlyMap(new HashMap<Resource, Boolean>() {
-					/**
-			 * 
-			 */
-					private static final long serialVersionUID = -7623655803631543084L;
-
-					public Boolean get(Object key) {
-						if (!containsKey(key)) {
-							put((Resource) key, Boolean.TRUE);
-						}
-						return super.get(key);
-					}
-				});
+		myEditingDomain.setResourceToReadOnlyMap(new HashMap<Resource, Boolean>() {
+			/**
+			* 
+			*/
+			private static final long serialVersionUID = -7623655803631543084L;
+
+			public Boolean get(Object key) {
+				if (!containsKey(key)) {
+					put((Resource) key, Boolean.TRUE);
+				}
+				return super.get(key);
+			}
+		});
 		myViewerRefreshRunnable = new Runnable() {
 			public void run() {
 				if (myViewer != null && !myViewer.getControl().isDisposed()) {
@@ -87,71 +83,60 @@ public class StatechartNavigatorContentProvider implements
 				}
 			}
 		};
-		myWorkspaceSynchronizer = new WorkspaceSynchronizer(editingDomain,
-				new WorkspaceSynchronizer.Delegate() {
-					public void dispose() {
-					}
-
-					public boolean handleResourceChanged(final Resource resource) {
-						for (Iterator<Resource> it = myEditingDomain
-								.getResourceSet().getResources().iterator(); it
-								.hasNext();) {
-							Resource nextResource = (Resource) it.next();
-							nextResource.unload();
-						}
-						if (myViewer != null) {
-							myViewer.getControl().getDisplay()
-									.asyncExec(myViewerRefreshRunnable);
-						}
-						return true;
-					}
-
-					public boolean handleResourceDeleted(Resource resource) {
-						for (Iterator<Resource> it = myEditingDomain
-								.getResourceSet().getResources().iterator(); it
-								.hasNext();) {
-							Resource nextResource = (Resource) it.next();
-							nextResource.unload();
-						}
-						if (myViewer != null) {
-							myViewer.getControl().getDisplay()
-									.asyncExec(myViewerRefreshRunnable);
-						}
-						return true;
-					}
-
-					public boolean handleResourceMoved(Resource resource,
-							final URI newURI) {
-						for (Iterator<Resource> it = myEditingDomain
-								.getResourceSet().getResources().iterator(); it
-								.hasNext();) {
-							Resource nextResource = (Resource) it.next();
-							nextResource.unload();
-						}
-						if (myViewer != null) {
-							myViewer.getControl().getDisplay()
-									.asyncExec(myViewerRefreshRunnable);
-						}
-						return true;
-					}
-				});
+		myWorkspaceSynchronizer = new WorkspaceSynchronizer(editingDomain, new WorkspaceSynchronizer.Delegate() {
+			public void dispose() {
+			}
+
+			public boolean handleResourceChanged(final Resource resource) {
+				for (Iterator<Resource> it = myEditingDomain.getResourceSet().getResources().iterator(); it
+						.hasNext();) {
+					Resource nextResource = (Resource) it.next();
+					nextResource.unload();
+				}
+				if (myViewer != null) {
+					myViewer.getControl().getDisplay().asyncExec(myViewerRefreshRunnable);
+				}
+				return true;
+			}
+
+			public boolean handleResourceDeleted(Resource resource) {
+				for (Iterator<Resource> it = myEditingDomain.getResourceSet().getResources().iterator(); it
+						.hasNext();) {
+					Resource nextResource = (Resource) it.next();
+					nextResource.unload();
+				}
+				if (myViewer != null) {
+					myViewer.getControl().getDisplay().asyncExec(myViewerRefreshRunnable);
+				}
+				return true;
+			}
+
+			public boolean handleResourceMoved(Resource resource, final URI newURI) {
+				for (Iterator<Resource> it = myEditingDomain.getResourceSet().getResources().iterator(); it
+						.hasNext();) {
+					Resource nextResource = (Resource) it.next();
+					nextResource.unload();
+				}
+				if (myViewer != null) {
+					myViewer.getControl().getDisplay().asyncExec(myViewerRefreshRunnable);
+				}
+				return true;
+			}
+		});
 
 		myCrossReferenceAdapter = new ECrossReferenceAdapter();
-		myEditingDomain.getResourceSet().eAdapters()
-				.add(myCrossReferenceAdapter);
+		myEditingDomain.getResourceSet().eAdapters().add(myCrossReferenceAdapter);
 	}
 
 	public void dispose() {
 		myWorkspaceSynchronizer.dispose();
 		myWorkspaceSynchronizer = null;
 		myViewerRefreshRunnable = null;
-		for (Iterator<Resource> it = myEditingDomain.getResourceSet()
-				.getResources().iterator(); it.hasNext();) {
+		for (Iterator<Resource> it = myEditingDomain.getResourceSet().getResources().iterator(); it.hasNext();) {
 			Resource resource = (Resource) it.next();
 			resource.unload();
 		}
-		myEditingDomain.getResourceSet().eAdapters()
-				.remove(myCrossReferenceAdapter);
+		myEditingDomain.getResourceSet().eAdapters().remove(myCrossReferenceAdapter);
 		((TransactionalEditingDomain) myEditingDomain).dispose();
 		myEditingDomain = null;
 	}
@@ -177,19 +162,15 @@ public class StatechartNavigatorContentProvider implements
 
 		if (parentElement instanceof IFile) {
 			IFile file = (IFile) parentElement;
-			URI fileURI = URI.createPlatformResourceURI(file.getFullPath()
-					.toString(), true);
-			Resource resource = myEditingDomain.getResourceSet().getResource(
-					fileURI, true);
-			return wrapEObjects(
-					myAdapterFctoryContentProvier.getChildren(resource),
-					parentElement);
+			URI fileURI = URI.createPlatformResourceURI(file.getFullPath().toString(), true);
+			Resource resource = myEditingDomain.getResourceSet().getResource(fileURI, true);
+			return wrapEObjects(myAdapterFctoryContentProvier.getChildren(resource), parentElement);
 		}
 
 		if (parentElement instanceof DomainNavigatorItem) {
 			return wrapEObjects(
-					myAdapterFctoryContentProvier.getChildren(((DomainNavigatorItem) parentElement)
-							.getEObject()), parentElement);
+					myAdapterFctoryContentProvier.getChildren(((DomainNavigatorItem) parentElement).getEObject()),
+					parentElement);
 		}
 		return EMPTY_ARRAY;
 	}
@@ -198,8 +179,7 @@ public class StatechartNavigatorContentProvider implements
 		Collection<DomainNavigatorItem> result = new ArrayList<DomainNavigatorItem>();
 		for (int i = 0; i < objects.length; i++) {
 			if (objects[i] instanceof EObject) {
-				DomainNavigatorItem navigatorItem = new DomainNavigatorItem(
-						(EObject) objects[i], parentElement,
+				DomainNavigatorItem navigatorItem = new DomainNavigatorItem((EObject) objects[i], parentElement,
 						myAdapterFctoryContentProvier);
 				// Check if object has a corresponding View
 				if (!(objects[i] instanceof View)) {
@@ -214,13 +194,11 @@ public class StatechartNavigatorContentProvider implements
 
 	private View getReferencigView(EObject eObject) {
 
-		Collection<Setting> inverseReferences = myCrossReferenceAdapter
-				.getInverseReferences(eObject, true);
+		Collection<Setting> inverseReferences = myCrossReferenceAdapter.getInverseReferences(eObject, true);
 
 		for (Setting setting : inverseReferences) {
 			if (setting.getEObject() instanceof View
-					&& setting.getEStructuralFeature() == NotationPackage.eINSTANCE
-							.getView_Element()) {
+					&& setting.getEStructuralFeature() == NotationPackage.eINSTANCE.getView_Element()) {
 				return (View) setting.getEObject();
 			}
 		}

File diff suppressed because it is too large
+ 39 - 0
plugins/org.yakindu.sct.ui.navigator/test.launch


+ 5 - 5
test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/FlowOptimizer_ExecutionEntryTest.java

@@ -12,11 +12,11 @@ package org.yakindu.sct.model.sexec.transformation.test;
 
 import static org.junit.Assert.fail;
 import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil.TYPE_INTEGER;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createEntry;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createRegion;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createState;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createStatechart;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createTransition;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createEntry;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createRegion;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createState;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createStatechart;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createTransition;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createEntryAssignment;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createInterfaceScope;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createVariableDefinition;

+ 5 - 5
test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/HistoryTest.java

@@ -14,11 +14,11 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil.TYPE_INTEGER;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createEntry;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createRegion;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createState;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createStatechart;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createTransition;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createEntry;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createRegion;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createState;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createStatechart;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createTransition;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createEntryAssignment;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createInterfaceScope;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createVariableDefinition;

+ 4 - 5
test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/LocalReactionTest.java

@@ -16,10 +16,10 @@ import static org.junit.Assert.assertTrue;
 import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil.TYPE_INTEGER;
 import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil.findState;
 import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil.flattenSequenceStepsAsList;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createRegion;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createState;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createStatechart;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createTransition;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createRegion;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createState;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createStatechart;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createTransition;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createAlwaysEventSpec;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createEntryAssignment;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createLocalReaction;
@@ -50,7 +50,6 @@ import org.yakindu.sct.model.stext.stext.LocalReaction;
 import org.yakindu.sct.model.stext.stext.ReactionEffect;
 import org.yakindu.sct.model.stext.stext.ReactionTrigger;
 import org.yakindu.sct.model.stext.stext.VariableDefinition;
-
 public class LocalReactionTest extends ModelSequencerTest {
 
 	/**

+ 4 - 5
test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/ModelSequencerHierarchyTest.java

@@ -16,10 +16,10 @@ import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil.TYPE_INTEGER;
 import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil.findState;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createRegion;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createState;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createStatechart;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createTransition;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createRegion;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createState;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createStatechart;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createTransition;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createEntryAssignment;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createExitAssignment;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createInterfaceScope;
@@ -37,7 +37,6 @@ import org.yakindu.sct.model.sgraph.State;
 import org.yakindu.sct.model.sgraph.Statechart;
 import org.yakindu.sct.model.stext.stext.InterfaceScope;
 import org.yakindu.sct.model.stext.stext.VariableDefinition;
-
 public class ModelSequencerHierarchyTest extends ModelSequencerTest {
 
 	/**

+ 5 - 6
test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/ModelSequencerHistoryTest.java

@@ -14,11 +14,11 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil.TYPE_INTEGER;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createEntry;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createRegion;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createState;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createStatechart;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createTransition;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createEntry;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createRegion;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createState;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createStatechart;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createTransition;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createEntryAssignment;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createInterfaceScope;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createVariableDefinition;
@@ -44,7 +44,6 @@ import org.yakindu.sct.model.stext.stext.InterfaceScope;
 import org.yakindu.sct.model.stext.stext.VariableDefinition;
 
 import com.google.common.collect.Lists;
-
 public class ModelSequencerHistoryTest extends ModelSequencerTest {
 
 	@SuppressWarnings("unused")

+ 5 - 6
test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/ModelSequencerOrthogonalityTest.java

@@ -16,11 +16,11 @@ import static org.junit.Assert.assertTrue;
 import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil.TYPE_INTEGER;
 import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil.findState;
 import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil.findStateFullyQualified;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createEntry;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createRegion;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createState;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createStatechart;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createTransition;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createEntry;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createRegion;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createState;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createStatechart;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createTransition;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createEntryAssignment;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createExitAssignment;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createInterfaceScope;
@@ -43,7 +43,6 @@ import org.yakindu.sct.model.stext.stext.VariableDefinition;
 
 import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
-
 public class ModelSequencerOrthogonalityTest extends ModelSequencerTest {
 
 	/**

+ 5 - 6
test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/ModelSequencerSCTest.java

@@ -14,11 +14,11 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.fail;
 import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil.TYPE_INTEGER;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createEntry;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createRegion;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createState;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createStatechart;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createTransition;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createEntry;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createRegion;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createState;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createStatechart;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createTransition;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createEntryAssignment;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createInterfaceScope;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createVariableDefinition;
@@ -43,7 +43,6 @@ import org.yakindu.sct.model.sgraph.State;
 import org.yakindu.sct.model.sgraph.Statechart;
 import org.yakindu.sct.model.stext.stext.InterfaceScope;
 import org.yakindu.sct.model.stext.stext.VariableDefinition;
-
 public class ModelSequencerSCTest extends ModelSequencerTest {
 
 	/**

+ 5 - 6
test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/ModelSequencerStateReactionTest.java

@@ -15,11 +15,11 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
 import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil.TYPE_INTEGER;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createEntry;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createRegion;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createState;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createStatechart;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createTransition;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createEntry;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createRegion;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createState;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createStatechart;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createTransition;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createAlwaysEventSpec;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createEntryAction;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createEventDefinition;
@@ -74,7 +74,6 @@ import org.yakindu.sct.model.stext.stext.StextFactory;
 import org.yakindu.sct.model.stext.stext.TimeEventType;
 import org.yakindu.sct.model.stext.stext.TimeUnit;
 import org.yakindu.sct.model.stext.stext.VariableDefinition;
-
 public class ModelSequencerStateReactionTest extends ModelSequencerTest {
 
 	/**

+ 6 - 7
test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/ModelSequencerStateTest.java

@@ -18,12 +18,12 @@ import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
 import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil.TYPE_INTEGER;
 import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil.findState;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createEntry;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createFinalState;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createRegion;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createState;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createStatechart;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createTransition;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createEntry;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createFinalState;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createRegion;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createState;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createStatechart;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createTransition;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createEntryAction;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createEntryAssignment;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createEventDefinition;
@@ -78,7 +78,6 @@ import org.yakindu.sct.model.stext.stext.LocalReaction;
 import org.yakindu.sct.model.stext.stext.ReactionEffect;
 import org.yakindu.sct.model.stext.stext.ReactionTrigger;
 import org.yakindu.sct.model.stext.stext.VariableDefinition;
-
 public class ModelSequencerStateTest extends ModelSequencerTest {
 
 	/**

+ 5 - 6
test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/ModelSequencerStateVectorTest.java

@@ -12,11 +12,11 @@ package org.yakindu.sct.model.sexec.transformation.test;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createEntry;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createRegion;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createState;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createStatechart;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createTransition;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createEntry;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createRegion;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createState;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createStatechart;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createTransition;
 
 import org.junit.Test;
 import org.yakindu.sct.model.sexec.ExecutionFlow;
@@ -29,7 +29,6 @@ import org.yakindu.sct.model.sgraph.EntryKind;
 import org.yakindu.sct.model.sgraph.Region;
 import org.yakindu.sct.model.sgraph.State;
 import org.yakindu.sct.model.sgraph.Statechart;
-
 public class ModelSequencerStateVectorTest extends ModelSequencerTest {
 
 	/**

+ 4 - 5
test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/ModelSequencertDeclarationsTest.java

@@ -15,10 +15,10 @@ import static org.junit.Assert.assertNotSame;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
 import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil.TYPE_INTEGER;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createRegion;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createState;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createStatechart;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createTransition;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createRegion;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createState;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createStatechart;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createTransition;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createEventDefinition;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createInterfaceScope;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createInternalScope;
@@ -52,7 +52,6 @@ import org.yakindu.sct.model.stext.stext.OperationDefinition;
 import org.yakindu.sct.model.stext.stext.ReactionEffect;
 import org.yakindu.sct.model.stext.stext.ReactionTrigger;
 import org.yakindu.sct.model.stext.stext.VariableDefinition;
-
 public class ModelSequencertDeclarationsTest extends ModelSequencerTest {
 
 	/**

+ 5 - 4
test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/NullCallTest.xtend

@@ -10,13 +10,14 @@
 */
 package org.yakindu.sct.model.sexec.transformation.test
 
-import org.junit.Test
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory.*
-import static org.yakindu.sct.model.stext.test.util.StextTestFactory.*
-import static org.junit.Assert.*
 import org.eclipse.emf.ecore.EObject
+import org.junit.Test
 import org.yakindu.sct.model.sexec.Call
 
+import static org.junit.Assert.*
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory.*
+import static org.yakindu.sct.model.stext.test.util.StextTestFactory.*
+
 /** 
  * This test class tests transformation errors that create calls to null sequences. This covers the issues:
  *  - #566

+ 5 - 6
test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/SCTTestUtil.java

@@ -10,11 +10,11 @@
 */
 package org.yakindu.sct.model.sexec.transformation.test;
 
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createEntry;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createRegion;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createState;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createStatechart;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createTransition;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createEntry;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createRegion;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createState;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createStatechart;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createTransition;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createBooleanType;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createEventDefinition;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createIntegerType;
@@ -48,7 +48,6 @@ import org.yakindu.sct.model.stext.stext.VariableDefinition;
 
 import com.google.common.base.Predicate;
 import com.google.common.collect.Collections2;
-
 public class SCTTestUtil {
 
 	public static Type TYPE_INTEGER = _createIntegerType("integer");

+ 5 - 6
test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/SelfTransitionTest.java

@@ -12,11 +12,11 @@ package org.yakindu.sct.model.sexec.transformation.test;
 
 import static org.junit.Assert.assertEquals;
 import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil.TYPE_INTEGER;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createEntry;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createRegion;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createState;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createStatechart;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createTransition;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createEntry;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createRegion;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createState;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createStatechart;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createTransition;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createInterfaceScope;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createVariableDefinition;
 
@@ -33,7 +33,6 @@ import org.yakindu.sct.model.sgraph.State;
 import org.yakindu.sct.model.sgraph.Statechart;
 import org.yakindu.sct.model.stext.stext.InterfaceScope;
 import org.yakindu.sct.model.stext.stext.VariableDefinition;
-
 public class SelfTransitionTest extends ModelSequencerTest {
 
 	@SuppressWarnings("unused")

+ 5 - 6
test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/StatechartEnterExistActionTest.java

@@ -12,11 +12,11 @@ package org.yakindu.sct.model.sexec.transformation.test;
 
 import static org.junit.Assert.assertEquals;
 import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil.TYPE_INTEGER;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createEntry;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createRegion;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createState;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createStatechart;
-import static org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createTransition;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createEntry;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createRegion;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createState;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createStatechart;
+import static org.yakindu.sct.model.sexec.transformation.test.util.SGraphTestFactory._createTransition;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createEntryAction;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createExitAction;
 import static org.yakindu.sct.model.stext.test.util.StextTestFactory._createReactionEffect;
@@ -40,7 +40,6 @@ import org.yakindu.sct.model.stext.stext.ReactionEffect;
 import org.yakindu.sct.model.stext.stext.VariableDefinition;
 
 import com.google.common.collect.Lists;
-
 public class StatechartEnterExistActionTest extends ModelSequencerTest {
 
 	/**

+ 2 - 2
test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/StatechartExtensionsTest.java

@@ -10,6 +10,8 @@
  */
 package org.yakindu.sct.model.sexec.transformation.test;
 
+import static org.junit.Assert.assertEquals;
+
 import org.eclipse.xtext.junit4.InjectWith;
 import org.eclipse.xtext.junit4.XtextRunner;
 import org.junit.Test;
@@ -21,8 +23,6 @@ import org.yakindu.sct.test.models.TestModelInjectorProvider;
 
 import com.google.inject.Inject;
 
-import static org.junit.Assert.*;
-
 /**
  * @author rbeckmann
  *

+ 1 - 1
test-plugins/org.yakindu.sct.model.sgraph.test/src/org/yakindu/sct/model/sgraph/test/util/SGraphTestFactory.java

@@ -8,7 +8,7 @@
  * committers of YAKINDU - initial API and implementation
  *
 */
-package org.yakindu.sct.model.sgraph.test.util;
+package org.yakindu.sct.model.sexec.transformation.test.util;
 
 import org.yakindu.sct.model.sgraph.Entry;
 import org.yakindu.sct.model.sgraph.EntryKind;

+ 2 - 0
test-plugins/org.yakindu.sct.model.sgraph.test/.settings/org.eclipse.core.resources.prefs

@@ -1,2 +1,4 @@
 eclipse.preferences.version=1
+encoding//testmodels/entry/RegionCantBeEnteredUsingShallowHistory.sct=UTF-8
+encoding//testmodels/synchronization/ValidEmptyTransitionFromSync.sct=UTF-8
 encoding/<project>=UTF-8

+ 0 - 2
test-plugins/org.yakindu.sct.model.sgraph.test/META-INF/MANIFEST.MF

@@ -3,14 +3,12 @@ Bundle-ManifestVersion: 2
 Bundle-Name: YAKINDU SGraph Tests
 Bundle-SymbolicName: org.yakindu.sct.model.sgraph.test
 Bundle-Version: 3.3.2.qualifier
-Bundle-Activator: org.yakindu.sct.model.sgraph.test.Activator
 Require-Bundle: org.yakindu.sct.model.sgraph,
  org.junit,
  org.eclipse.ui,
  org.eclipse.core.runtime,
  org.yakindu.sct.model.stext,
  org.eclipse.xtext.junit4,
- org.yakindu.sct.test.models,
  org.yakindu.sct.domain.generic.resource
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8

+ 0 - 60
test-plugins/org.yakindu.sct.model.sgraph.test/src/org/yakindu/sct/model/sgraph/test/Activator.java

@@ -1,60 +0,0 @@
-/** 
- * Copyright (c) 2015 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.model.sgraph.test;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
-	// The plug-in ID
-	public static final String PLUGIN_ID = "org.yakindu.sct.model.statechart.test"; //$NON-NLS-1$
-
-	// The shared instance
-	private static Activator plugin;
-	
-	/**
-	 * The constructor
-	 */
-	public Activator() {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
-	 */
-	public void start(BundleContext context) throws Exception {
-		super.start(context);
-		plugin = this;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
-	 */
-	public void stop(BundleContext context) throws Exception {
-		plugin = null;
-		super.stop(context);
-	}
-
-	/**
-	 * Returns the shared instance
-	 *
-	 * @return the shared instance
-	 */
-	public static Activator getDefault() {
-		return plugin;
-	}
-
-}

+ 11 - 5
test-plugins/org.yakindu.sct.model.sgraph.test/src/org/yakindu/sct/model/sgraph/test/AllTests.java

@@ -13,13 +13,19 @@ package org.yakindu.sct.model.sgraph.test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
 import org.junit.runners.Suite.SuiteClasses;
+import org.yakindu.sct.model.sgraph.validation.test.ChoiceValidatorTest;
+import org.yakindu.sct.model.sgraph.validation.test.EntryExitValidatorTest;
+import org.yakindu.sct.model.sgraph.validation.test.FinalStateValidatorTest;
+import org.yakindu.sct.model.sgraph.validation.test.StateValidatorTest;
+import org.yakindu.sct.model.sgraph.validation.test.StatechartValidatorTest;
+import org.yakindu.sct.model.sgraph.validation.test.SynchronizationValidatorTest;
+import org.yakindu.sct.model.sgraph.validation.test.TransitionValidatorTest;
+import org.yakindu.sct.model.sgraph.validation.test.VertexValidatorTest;
 
-/**
- * 
- * @author terfloth
- */
 @RunWith(value = Suite.class)
-@SuiteClasses(value = { SGraphJavaValidationTest.class, StateImplTest.class })
+@SuiteClasses(value = { StatechartValidatorTest.class, ChoiceValidatorTest.class, EntryExitValidatorTest.class,
+		FinalStateValidatorTest.class, StateValidatorTest.class, SynchronizationValidatorTest.class,
+		TransitionValidatorTest.class, VertexValidatorTest.class })
 public class AllTests {
 
 }

+ 0 - 945
test-plugins/org.yakindu.sct.model.sgraph.test/src/org/yakindu/sct/model/sgraph/test/SGraphJavaValidationTest.java

@@ -1,945 +0,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.model.sgraph.test;
-
-import static org.junit.Assert.*;
-import static org.yakindu.sct.model.sgraph.util.SGgraphUtil.firstNamed;
-import static org.yakindu.sct.model.sgraph.validation.SGraphJavaValidator.*;
-import static org.yakindu.sct.test.models.AbstractTestModelsUtil.VALIDATION_TESTMODEL_DIR;
-
-import java.lang.reflect.Method;
-import java.util.HashMap;
-import java.util.Iterator;
-
-import org.eclipse.emf.common.util.BasicDiagnostic;
-import org.eclipse.emf.common.util.Diagnostic;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.xtext.EcoreUtil2;
-import org.eclipse.xtext.junit4.InjectWith;
-import org.eclipse.xtext.junit4.XtextRunner;
-import org.eclipse.xtext.validation.Check;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.yakindu.base.base.NamedElement;
-import org.yakindu.sct.model.sgraph.Choice;
-import org.yakindu.sct.model.sgraph.Entry;
-import org.yakindu.sct.model.sgraph.EntryKind;
-import org.yakindu.sct.model.sgraph.Exit;
-import org.yakindu.sct.model.sgraph.FinalState;
-import org.yakindu.sct.model.sgraph.Region;
-import org.yakindu.sct.model.sgraph.SGraphFactory;
-import org.yakindu.sct.model.sgraph.SGraphPackage;
-import org.yakindu.sct.model.sgraph.State;
-import org.yakindu.sct.model.sgraph.Statechart;
-import org.yakindu.sct.model.sgraph.Synchronization;
-import org.yakindu.sct.model.sgraph.Transition;
-import org.yakindu.sct.model.sgraph.Vertex;
-import org.yakindu.sct.model.sgraph.validation.SGraphJavaValidator;
-import org.yakindu.sct.model.stext.stext.StextFactory;
-import org.yakindu.sct.model.stext.validation.STextJavaValidator;
-import org.yakindu.sct.test.models.AbstractTestModelsUtil;
-
-import com.google.common.base.Predicate;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Lists;
-import com.google.inject.Inject;
-
-/**
- * Test of all validation rules that test very basic properties of statecharts.
- * 
- * @author terfloth
- * @author muelder - additions
- * @author antony -additions
- */
-@RunWith(XtextRunner.class)
-@InjectWith(SGraphTestInjectorProvider.class)
-public class SGraphJavaValidationTest {
-
-	static {
-		// set up EMF - the EPackage.Registry requires a context class loader
-		// ...
-		if (Thread.currentThread().getContextClassLoader() == null) {
-			Thread.currentThread().setContextClassLoader(
-					SGraphJavaValidationTest.class.getClassLoader());
-		}
-		SGraphPackage.eINSTANCE.eClass();
-	}
-
-	protected SGraphFactory factory;
-	protected StextFactory sTextFactory;
-
-	@Inject
-	protected SGraphJavaValidator validator;
-
-	protected BasicDiagnostic diagnostics;
-
-	protected Statechart statechart;
-	protected Region region;
-	private State state;
-
-	@Before
-	public void setUp() throws Exception {
-		diagnostics = new BasicDiagnostic();
-		factory = SGraphFactory.eINSTANCE;
-		sTextFactory = StextFactory.eINSTANCE;
-		statechart = factory.createStatechart();
-		statechart.setName("SC");
-	}
-
-	protected void prepareStateTest() {
-		region = factory.createRegion();
-		statechart.getRegions().add(region);
-		state = factory.createState();
-		state.setName(getClass().getSimpleName());
-		region.getVertices().add(state);
-	}
-
-	/**
-	 * A regular state must have a name.
-	 */
-	@Test
-	public void stateWithoutName() {
-		prepareStateTest();
-
-		state.setName(null);
-		assertFalse(validator.validate(state, diagnostics,
-				new HashMap<Object, Object>()));
-		assertError(diagnostics, ISSUE_STATE_WITHOUT_NAME);
-	}
-
-	/**
-	 * A states name must not be empty.
-	 */
-	@Test
-	public void nameIsNotEmpty() {
-		prepareStateTest();
-
-		state.setName("");
-		assertFalse(validator.validate(state, diagnostics,
-				new HashMap<Object, Object>()));
-		assertError(diagnostics, ISSUE_STATE_WITHOUT_NAME);
-	}
-
-	/**
-	 * A state name with just white spaces is not valid.
-	 */
-	@Test
-	public void stateWithWhitespaceName() {
-		prepareStateTest();
-
-		state.setName(" 	");
-		assertFalse(validator.validate(state, diagnostics,
-				new HashMap<Object, Object>()));
-		assertError(diagnostics, ISSUE_STATE_WITHOUT_NAME);
-	}
-
-	/**
-	 * A state must be reachable.
-	 */
-	@Test
-	public void vertexNotReachable() {
-		prepareStateTest();
-
-		assertFalse(validator.validate(state, diagnostics,
-				new HashMap<Object, Object>()));
-		assertError(diagnostics, ISSUE_NODE_NOT_REACHABLE);
-	}
-
-	/**
-	 * A transition to a sub entry is considered implies reachability.
-	 */
-	@Test
-	public void vertexNotReachable_AcceptThroughSubstate() {
-		prepareStateTest();
-
-		State stateA = factory.createState();
-
-		Region subRegion = factory.createRegion();
-		state.getRegions().add(subRegion);
-
-		State stateC = factory.createState();
-		subRegion.getVertices().add(stateC);
-
-		Transition t1 = factory.createTransition();
-		t1.setSource(stateA);
-		t1.setTarget(stateC);
-
-		validate(state);
-		assertNoIssues(diagnostics);
-	}
-
-	/**
-	 * A transition to a sub entry is considered implies reachability.
-	 */
-	@Test
-	public void vertexNotReachable_AcceptThroughSubentry() {
-		prepareStateTest();
-
-		State stateA = factory.createState();
-
-		Region subRegion = factory.createRegion();
-		state.getRegions().add(subRegion);
-
-		State stateC = factory.createState();
-		subRegion.getVertices().add(stateC);
-
-		Entry entry = factory.createEntry();
-		subRegion.getVertices().add(entry);
-
-		Transition t1 = factory.createTransition();
-		t1.setSource(stateA);
-		t1.setTarget(entry);
-
-		Transition t2 = factory.createTransition();
-		t2.setSource(entry);
-		t2.setTarget(stateC);
-
-		validate(state);
-		assertNoIssues(diagnostics);
-	}
-
-	/**
-	 * A transition to a sub choice is considered implies reachability.
-	 */
-	@Test
-	public void vertexNotReachable_AcceptThroughSubchoice() {
-		prepareStateTest();
-
-		State stateA = factory.createState();
-
-		Region subRegion = factory.createRegion();
-		state.getRegions().add(subRegion);
-
-		State stateC = factory.createState();
-		subRegion.getVertices().add(stateC);
-
-		Choice choice = factory.createChoice();
-		subRegion.getVertices().add(choice);
-
-		Transition t1 = factory.createTransition();
-		t1.setSource(stateA);
-		t1.setTarget(choice);
-
-		Transition t2 = factory.createTransition();
-		t2.setSource(choice);
-		t2.setTarget(stateC);
-
-		validate(state);
-		assertNoIssues(diagnostics);
-	}
-
-	/**
-	 * If an incoming transitions is part of an external transition path that
-	 * only consists of pseudo states and only has state predecessors within the
-	 * state then the state is not reachable and the validation must fail with
-	 * an error.
-	 */
-	@Test
-	public void vertexNotReachable_FailOnExternalPseudoPath() {
-		prepareStateTest();
-
-		Choice choice = factory.createChoice();
-		region.getVertices().add(choice);
-
-		createTransition(state, choice);
-		createTransition(choice, state);
-
-		validate(state);
-		assertIssue(diagnostics, ISSUE_NODE_NOT_REACHABLE);
-	}
-
-	/**
-	 * If an incoming transitions is part of an external transition path to an
-	 * internal state that only consists of pseudo states and only has state
-	 * predecessors within the state then the state is not reachable and the
-	 * validation must fail with an error.
-	 */
-	@Test
-	public void vertexNotReachable_FailOnExternalPseudoPathToSubstate() {
-		prepareStateTest();
-
-		Region subRegion = factory.createRegion();
-		state.getRegions().add(subRegion);
-
-		State stateA = factory.createState();
-		subRegion.getVertices().add(stateA);
-
-		Choice choice = factory.createChoice();
-		region.getVertices().add(choice);
-
-		createTransition(stateA, choice);
-		createTransition(choice, stateA);
-
-		validate(state);
-		assertIssue(diagnostics, ISSUE_NODE_NOT_REACHABLE);
-	}
-
-	/**
-	 * A regular state may be a dead end.
-	 */
-	@Test
-	public void stateDeadEnd() {
-		prepareStateTest();
-
-		validator.validate(state, diagnostics, new HashMap<Object, Object>());
-		assertNoIssue(diagnostics, ISSUE_STATE_WITHOUT_OUTGOING_TRANSITION);
-	}
-
-	/**
-	 * A valid regular state must produce no issues.
-	 */
-	@Test
-	public void validState() {
-		prepareStateTest();
-		Entry entry = factory.createEntry();
-		region.getVertices().add(entry);
-		createTransition(entry, state);
-
-		validate(state);
-		// assertTrue(validator.validate(state, diagnostics,
-		// new HashMap<Object, Object>()));
-		assertIssueCount(diagnostics, 0);
-	}
-
-	/**
-	 * An initial entry should have no incoming transition
-	 */
-	@Test
-	public void initialEntryWithoutIncomingTransitions() {
-		prepareStateTest();
-
-		Entry entry = factory.createEntry();
-		region.getVertices().add(entry);
-		createTransition(state, entry);
-
-		assertEquals(EntryKind.INITIAL, entry.getKind());
-		validator.validate(entry, diagnostics, new HashMap<Object, Object>());
-		assertWarning(diagnostics, ISSUE_INITIAL_ENTRY_WITH_IN_TRANS);
-	}
-
-	/**
-	 * A valid entry should have No issues
-	 */
-	@Test
-	public void validInitialEntry() {
-		prepareStateTest();
-
-		Entry entry = factory.createEntry();
-		region.getVertices().add(entry);
-		createTransition(entry, state);
-
-		assertEquals(EntryKind.INITIAL, entry.getKind());
-		assertTrue(validator.validate(entry, diagnostics,
-				new HashMap<Object, Object>()));
-		assertIssueCount(diagnostics, 0);
-	}
-
-	/**
-	 * An initial entry should have an outgoing transition
-	 */
-	@Test
-	public void initialEntryWithoutOutgoingTransition() {
-		prepareStateTest();
-
-		Entry entry = factory.createEntry();
-		region.getVertices().add(entry);
-
-		assertEquals(EntryKind.INITIAL, entry.getKind());
-		validator.validate(entry, diagnostics, new HashMap<Object, Object>());
-		assertWarning(diagnostics, ISSUE_INITIAL_ENTRY_WITHOUT_OUT_TRANS);
-	}
-
-	/**
-	 * An entry should not have more than one outgoing transition
-	 */
-	@Test
-	public void initialEntryWithMultipleOutgoingTransition() {
-		prepareStateTest();
-
-		Entry entry = factory.createEntry();
-		region.getVertices().add(entry);
-		createTransition(entry, state);
-		createTransition(entry, state);
-
-		assertEquals(EntryKind.INITIAL, entry.getKind());
-		assertFalse(validator.validate(entry, diagnostics,
-				new HashMap<Object, Object>()));
-		assertError(diagnostics, ISSUE_ENTRY_WITH_MULTIPLE_OUT_TRANS);
-
-		entry.setKind(EntryKind.SHALLOW_HISTORY);
-
-		diagnostics = new BasicDiagnostic();
-		assertFalse(validator.validate(entry, diagnostics,
-				new HashMap<Object, Object>()));
-		assertError(diagnostics, ISSUE_ENTRY_WITH_MULTIPLE_OUT_TRANS);
-
-		entry.setKind(EntryKind.DEEP_HISTORY);
-
-		diagnostics = new BasicDiagnostic();
-		assertFalse(validator.validate(entry, diagnostics,
-				new HashMap<Object, Object>()));
-		assertError(diagnostics, ISSUE_ENTRY_WITH_MULTIPLE_OUT_TRANS);
-
-	}
-
-	/**
-	 * An exit node should have at leat one incoming transition.
-	 */
-	@Test
-	public void exitWithoutIncomingTransition() {
-		prepareStateTest();
-
-		Region subRegion = factory.createRegion();
-		state.getRegions().add(subRegion);
-		Exit exit = factory.createExit();
-		subRegion.getVertices().add(exit);
-
-		assertFalse(validate(exit));
-
-		assertWarning(diagnostics, ISSUE_EXIT_WITHOUT_IN_TRANS);
-	}
-
-	/**
-	 * An exit node must have no outgoing transitions.
-	 */
-	@Test
-	public void exitWithOutgoingTransition() {
-		prepareStateTest();
-
-		Region subRegion = factory.createRegion();
-		state.getRegions().add(subRegion);
-		Exit exit = factory.createExit();
-		subRegion.getVertices().add(exit);
-
-		State s = factory.createState();
-		subRegion.getVertices().add(s);
-
-		Transition t = factory.createTransition();
-		t.setSource(exit);
-		t.setTarget(s);
-
-		assertFalse(validate(exit));
-
-		assertError(diagnostics, ISSUE_EXIT_WITH_OUT_TRANS);
-	}
-
-	/**
-	 * An exit node must not be used in top level regions.
-	 */
-	@Test
-	public void exitOnStatechart() {
-		prepareStateTest();
-
-		Exit exit = factory.createExit();
-		region.getVertices().add(exit);
-
-		assertFalse(validate(exit));
-
-		assertError(diagnostics, ISSUE_EXIT_ON_STATECHART);
-	}
-
-	/**
-	 * Tests a scenario where no issues for an exit nodes exists.
-	 */
-	@Test
-	public void cleanExit() {
-		prepareStateTest();
-
-		Region subRegion = factory.createRegion();
-		state.getRegions().add(subRegion);
-		Exit exit = factory.createExit();
-		subRegion.getVertices().add(exit);
-
-		State s = factory.createState();
-		subRegion.getVertices().add(s);
-
-		Transition t = factory.createTransition();
-		t.setTarget(exit);
-		t.setSource(s);
-
-		assertTrue(validate(exit));
-		assertNoIssues(diagnostics);
-	}
-
-	@Test
-	public void disallowTrigger() {
-		prepareStateTest();
-
-		Entry entry = factory.createEntry();
-		region.getVertices().add(entry);
-		Transition trans = createTransition(entry, state);
-		trans.setTrigger(sTextFactory.createReactionTrigger());
-		diagnostics = new BasicDiagnostic();
-		assertFalse(validator.validate(entry, diagnostics,
-				new HashMap<Object, Object>()));
-		assertError(diagnostics, ISSUE_ENTRY_WITH_TRIGGER);
-	}
-
-	/**
-	 * A final state should have at least one incoming transition.
-	 */
-	@Test
-	public void finalStateIsolated() {
-		statechart = factory.createStatechart();
-		Region region = factory.createRegion();
-		statechart.getRegions().add(region);
-		FinalState finalState = factory.createFinalState();
-		region.getVertices().add(finalState);
-
-		assertFalse(validate(finalState));
-
-		assertIssueCount(diagnostics, 1);
-		assertError(diagnostics, ISSUE_NODE_NOT_REACHABLE);
-	}
-
-	/**
-	 * A positive case for a valid final state.
-	 */
-	@Test
-	public void finalStateValid() {
-		statechart = factory.createStatechart();
-		Region region = factory.createRegion();
-		statechart.getRegions().add(region);
-		FinalState finalState = factory.createFinalState();
-		region.getVertices().add(finalState);
-		State state = factory.createState();
-		region.getVertices().add(state);
-		createTransition(state, finalState);
-
-		assertTrue(validate(finalState));
-		assertIssueCount(diagnostics, 0);
-	}
-
-	/**
-	 * A final state should have no outgoing transitions
-	 */
-	@Test
-	public void finalStateWithOutgoingTransition() {
-		statechart = factory.createStatechart();
-		Region region = factory.createRegion();
-		statechart.getRegions().add(region);
-		FinalState finalState = factory.createFinalState();
-		region.getVertices().add(finalState);
-		State state = factory.createState();
-		region.getVertices().add(state);
-
-		createTransition(state, finalState);
-		createTransition(finalState, state);
-
-		validate(finalState);
-
-		assertIssueCount(diagnostics, 1);
-		assertWarning(diagnostics, ISSUE_FINAL_STATE_OUTGOING_TRANSITION);
-	}
-
-	/**
-	 * A choice must have at least one outgoing transition
-	 */
-	@Test
-	public void choiceWithoutOutgoingTransition() {
-		statechart = factory.createStatechart();
-		Region region = factory.createRegion();
-		statechart.getRegions().add(region);
-		Choice choice = factory.createChoice();
-		region.getVertices().add(choice);
-		State state = factory.createState();
-		region.getVertices().add(state);
-
-		createTransition(state, choice);
-
-		assertFalse(validator.validate(choice, diagnostics,
-				new HashMap<Object, Object>()));
-
-		assertIssueCount(diagnostics, 1);
-		assertError(diagnostics, ISSUE_CHOICE_WITHOUT_OUTGOING_TRANSITION);
-	}
-
-	@Test
-	public void synchronizationTransitionCount() {
-		statechart = AbstractTestModelsUtil
-				.loadStatechart(VALIDATION_TESTMODEL_DIR
-						+ "SynchronizationTransitionCount.sct");
-		Iterator<EObject> iter = statechart.eAllContents();
-		while (iter.hasNext()) {
-			EObject element = iter.next();
-			if (element instanceof Synchronization) {
-				assertFalse(validator.validate(element, diagnostics,
-						new HashMap<Object, Object>()));
-			}
-		}
-
-		assertIssueCount(diagnostics, 2);
-		assertError(diagnostics, ISSUE_SYNCHRONIZATION_TRANSITION_COUNT);
-	}
-
-	
-	@Test public void orthogonalTransition() {
-		statechart = loadStatechart("OrthogonalTransition.sct");
-		
-		State state = firstNamed(EcoreUtil2.eAllOfType(statechart, State.class), "B2");
-		Transition trans = state.getOutgoingTransitions().get(0);
-		
-		assertTrue(validator.validate(trans, diagnostics, new HashMap<Object, Object>()));
-		assertNoIssues(diagnostics);
-	}
-
-
-	@Test public void orthogonalTransition_BetweenTopLevelRegions() {
-		statechart = loadStatechart("OrthogonalTransition.sct");
-		
-		State state = firstNamed(EcoreUtil2.eAllOfType(statechart, State.class), "A");
-		Transition trans = state.getOutgoingTransitions().get(0);
-		
-		assertFalse(validator.validate(trans, diagnostics, new HashMap<Object, Object>()));
-		assertIssueCount(diagnostics, 1);
-		assertError(diagnostics, ISSUE_TRANSITION_ORTHOGONAL);
-	}
-	
-	
-	@Test public void orthogonalTransition_BetweenStateRegions() {
-		statechart = loadStatechart("OrthogonalTransition.sct");
-		
-		State state = firstNamed(EcoreUtil2.eAllOfType(statechart, State.class), "B1");
-		Transition trans = state.getOutgoingTransitions().get(0);
-		
-		assertFalse(validator.validate(trans, diagnostics, new HashMap<Object, Object>()));
-		assertIssueCount(diagnostics, 1);
-		assertError(diagnostics, ISSUE_TRANSITION_ORTHOGONAL);
-	}
-
-
-	@Test public void orthogonalSourceStates() {
-		statechart = loadStatechart("OrthogonalRegion01.sct");
-		
-		State b = firstNamed(EcoreUtil2.eAllOfType(statechart, State.class), "AA");
-		Synchronization sync = (Synchronization) b.getOutgoingTransitions().get(0).getTarget();
-		
-		assertTrue(validator.validate(sync, diagnostics, new HashMap<Object, Object>()));
-		assertNoIssues(diagnostics);
-	}
-		
-	@Test public void orthogonalSourceStates_StateInParentStateRegion() {
-		statechart = loadStatechart("NotOrthogonalRegion01.sct");
-
-		State b = firstNamed(EcoreUtil2.eAllOfType(statechart, State.class), "AA");
-		Synchronization sync = (Synchronization) b.getOutgoingTransitions().get(0).getTarget();
-		
-		assertFalse(validator.validate(sync, diagnostics, new HashMap<Object, Object>()));
-		assertIssueCount(diagnostics, 1);
-		assertError(diagnostics, ISSUE_SYNCHRONIZATION_SOURCE_STATES_NOT_ORTHOGONAL);
-	}
-
-	@Test public void orthogonalSourceStates_StateInTopLevelRegion() {
-		statechart = loadStatechart("NotOrthogonalRegion02.sct");
-
-		State b = firstNamed(EcoreUtil2.eAllOfType(statechart, State.class), "AA");
-		Synchronization sync = (Synchronization) b.getOutgoingTransitions().get(0).getTarget();
-		
-		assertFalse(validator.validate(sync, diagnostics, new HashMap<Object, Object>()));
-		assertIssueCount(diagnostics, 1);
-		assertError(diagnostics, ISSUE_SYNCHRONIZATION_SOURCE_STATES_NOT_ORTHOGONAL);
-	}
-
-
-	
-	@Test public void orthogonalTargetStates() {
-		statechart = loadStatechart("OrthogonalRegion01.sct");
-		
-		State b = firstNamed(EcoreUtil2.eAllOfType(statechart, State.class), "B");
-		Synchronization sync = (Synchronization) b.getOutgoingTransitions().get(0).getTarget();
-		
-		assertTrue(validator.validate(sync, diagnostics, new HashMap<Object, Object>()));
-		assertNoIssues(diagnostics);
-	}
-		
-	@Test public void orthogonalTargetStates_StateInParentStateRegion() {
-		statechart = loadStatechart("NotOrthogonalRegion01.sct");
-
-		State b = firstNamed(EcoreUtil2.eAllOfType(statechart, State.class), "B");
-		Synchronization sync = (Synchronization) b.getOutgoingTransitions().get(0).getTarget();
-		
-		assertFalse(validator.validate(sync, diagnostics, new HashMap<Object, Object>()));
-		assertIssueCount(diagnostics, 1);
-		assertError(diagnostics, ISSUE_SYNCHRONIZATION_TARGET_STATES_NOT_ORTHOGONAL);
-	}
-
-
-	@Test public void orthogonalTargetStates_StateInTopLevelRegion() {
-		statechart = loadStatechart("NotOrthogonalRegion02.sct");
-
-		State b = firstNamed(EcoreUtil2.eAllOfType(statechart, State.class), "B");
-		Synchronization sync = (Synchronization) b.getOutgoingTransitions().get(0).getTarget();
-		
-		assertFalse(validator.validate(sync, diagnostics, new HashMap<Object, Object>()));
-		assertIssueCount(diagnostics, 1);
-		assertError(diagnostics, ISSUE_SYNCHRONIZATION_TARGET_STATES_NOT_ORTHOGONAL);
-	}
-
-	
-		
-	@Test public void orthogonalSynchronizedTransition() {
-		statechart = loadStatechart("NotOrthogonalRegion03.sct");
-		
-		State stateB = firstNamed(EcoreUtil2.eAllOfType(statechart, State.class), "B");
-		Synchronization sync = (Synchronization) stateB.getOutgoingTransitions().get(0).getTarget();
-		
-		assertFalse(validator.validate(sync, diagnostics, new HashMap<Object, Object>()));
-		assertIssueCount(diagnostics, 2);
-		assertError(diagnostics, ISSUE_SYNCHRONIZATION_SOURCE_TARGET_STATES_PARENT_REGION);
-	}
-
-
-	@Test public void orthogonalSynchronizedTransition_Source() {
-		statechart = loadStatechart("NotOrthogonalRegion03.sct");
-		
-		State stateC = firstNamed(EcoreUtil2.eAllOfType(statechart, State.class), "C");
-		Synchronization sync = (Synchronization) stateC.getOutgoingTransitions().get(0).getTarget();
-		
-		assertFalse(validator.validate(sync, diagnostics, new HashMap<Object, Object>()));
-		assertIssueCount(diagnostics, 2);
-		assertError(diagnostics, ISSUE_SYNCHRONIZATION_SOURCE_TARGET_STATES_PARENT_REGION);
-	}
-
-
-	@Test public void syncLocation_Issue58() {
-		statechart = loadStatechart("SyncLocation_Issue58.sct");
-		
-		State state = firstNamed(EcoreUtil2.eAllOfType(statechart, State.class), "AA");
-		Synchronization sync = (Synchronization) state.getOutgoingTransitions().get(0).getTarget();
-		
-		assertTrue(validator.validate(sync, diagnostics, new HashMap<Object, Object>()));
-		assertNoIssues(diagnostics);
-	}
-		
-
-
-	@Test
-	public void regionCantBeEnteredUsingShallowHistory() {
-		statechart = AbstractTestModelsUtil
-				.loadStatechart(VALIDATION_TESTMODEL_DIR
-						+ "RegionCantBeEnteredUsingShallowHistory.sct");
-		Iterator<EObject> iter = statechart.eAllContents();
-		while (iter.hasNext()) {
-			EObject element = iter.next();
-			if (element instanceof Entry) {
-				validator.validate(element, diagnostics,
-						new HashMap<Object, Object>());
-			}
-		}
-
-		assertIssueCount(diagnostics, 2);
-
-		Diagnostic issue = issueByName(diagnostics,
-				ISSUE_REGION_CANT_BE_ENTERED_USING_SHALLOW_HISTORY_NO_DEFAULT_ENTRY);
-		assertTrue(issue.getSeverity() == Diagnostic.ERROR);
-		assertEquals("r_a", ((NamedElement) issue.getData().get(0)).getName());
-
-		issue = issueByName(diagnostics,
-				ISSUE_REGION_CANT_BE_ENTERED_USING_SHALLOW_HISTORY_NON_CONNECTED_DEFAULT_ENTRY);
-		assertTrue(issue.getSeverity() == Diagnostic.ERROR);
-		assertEquals("r_c", ((NamedElement) issue.getData().get(0)).getName());
-	}
-
-	@Test
-	public void validTransitionToInnerChoice() {
-		statechart = AbstractTestModelsUtil
-				.loadStatechart(VALIDATION_TESTMODEL_DIR
-						+ "ValidTransitionToInnerChoice.sct");
-		Iterator<EObject> iter = statechart.eAllContents();
-		while (iter.hasNext()) {
-			EObject element = iter.next();
-			if (element instanceof State) {
-				validator.validate(element, diagnostics,
-						new HashMap<Object, Object>());
-			}
-		}
-
-		assertIssueCount(diagnostics, 0);
-	}
-
-	@Test
-	public void initialEntryWithTransitionToContainer() {
-		statechart = AbstractTestModelsUtil
-				.loadStatechart(VALIDATION_TESTMODEL_DIR
-						+ "EntryTransitionToParentState.sct");
-		Iterator<EObject> iter = statechart.eAllContents();
-		while (iter.hasNext()) {
-			EObject element = iter.next();
-			if (element instanceof Transition) {
-				validator.validate(element, diagnostics,
-						new HashMap<Object, Object>());
-			}
-		}
-
-		assertIssueCount(diagnostics, 1);
-		assertError(diagnostics,
-				ISSUE_INITIAL_ENTRY_WITH_TRANSITION_TO_CONTAINER);
-	}
-	
-	@Test
-	public void checkStatechartNameIsIdentifier(){
-		Statechart statechart = SGraphFactory.eINSTANCE.createStatechart();
-		statechart.setName("Not a valid identifier");
-		validator.validate(statechart, diagnostics,
-				new HashMap<Object, Object>());
-		assertIssueCount(diagnostics, 1);
-		assertError(diagnostics,
-				String.format(ISSUE_STATECHART_NAME_NO_IDENTIFIER, statechart.getName()));
-		
-		diagnostics = new BasicDiagnostic();
-		statechart.setName("0Notavalididentifier");
-		validator.validate(statechart, diagnostics,
-				new HashMap<Object, Object>());
-		assertIssueCount(diagnostics, 1);
-		assertError(diagnostics,
-				String.format(ISSUE_STATECHART_NAME_NO_IDENTIFIER, statechart.getName()));
-		
-		diagnostics = new BasicDiagnostic();
-		statechart.setName("ValidIdentifier");
-		validator.validate(statechart, diagnostics,
-				new HashMap<Object, Object>());
-		assertIssueCount(diagnostics, 0);
-	}
-	
-	@Test
-	public void synchronizationOutgoingTransitionCount() {
-		statechart = loadStatechart("SyncOutgoingTransition.sct");
-		
-		State state = firstNamed(EcoreUtil2.eAllOfType(statechart, State.class), "StateB");
-		Synchronization sync = (Synchronization) state.getOutgoingTransitions().get(0).getTarget();
-		
-		assertFalse(validator.validate(sync, diagnostics, new HashMap<Object, Object>()));
-		assertIssueCount(diagnostics, 1);
-		assertError(diagnostics, ISSUE_SYNCHRONIZATION_TRANSITION_OUTGOING);
-	}
-
-	/**
-	 * checks that each @Check method of {@link STextJavaValidator} has a @Test
-	 * method in this class with the same name
-	 */
-	// TODO: Create abstract test class for SGraphJavaValidatorTest and
-	// STextJAvaValidatorTest
-	@Test
-	public void testAllChecksHaveTests() throws Exception {
-		Iterable<Method> methods = Lists.newArrayList(SGraphJavaValidator.class
-				.getMethods());
-		methods = Iterables.filter(methods, new Predicate<Method>() {
-			public boolean apply(Method input) {
-				return input.getAnnotation(Check.class) != null;
-			}
-		});
-		for (Method checkMethod : methods) {
-			Method testMethod = getClass().getMethod(checkMethod.getName());
-			assertNotNull(
-					"Missing @Test Annotation for method "
-							+ checkMethod.getName(),
-					testMethod.getAnnotation(Test.class));
-		}
-	}
-	
-	/**
-	 * checks that no two @Check method of {@link STextJavaValidator} have the
-	 * same name. Avoiding overloaded check methods in the validator class
-	 * allows to check it tests methods are explicilty written for all elelemnt
-	 * types. It this is not checked than a single test implementation may
-	 * satisfy the previous test for all overloaded functions.
-	 */
-	@Test
-	public void testOverloadedCheckMethods() throws Exception {
-		Iterable<Method> methods = Lists.newArrayList(SGraphJavaValidator.class
-				.getMethods());
-		methods = Iterables.filter(methods, new Predicate<Method>() {
-			public boolean apply(Method input) {
-				return input.getAnnotation(Check.class) != null;
-			}
-
-		});
-		for (Method methodToCheck : methods) {
-			for (Method method : methods) {
-				if (methodToCheck != method) {
-					assertFalse("@Check method '" + methodToCheck
-							+ "' is overloaded.", methodToCheck.getName()
-							.equals(method.getName()));
-				}
-			}
-		}
-	}
-
-	
-	protected Transition createTransition(Vertex source, Vertex target) {
-		Transition trans = factory.createTransition();
-		trans.setSource(source);
-		trans.setTarget(target);
-		source.getOutgoingTransitions().add(trans);
-		target.getIncomingTransitions().add(trans);
-		return trans;
-	}
-
-	protected void assertError(BasicDiagnostic diag, String message) {
-		Diagnostic d = issueByName(diag, message);
-		assertNotNull("Issue '" + message + "' does not exist.",
-				issueByName(diag, message));
-		assertEquals("Issue '" + message + "' is no error.", Diagnostic.ERROR,
-				d.getSeverity());
-	}
-
-	protected void assertWarning(BasicDiagnostic diag, String message) {
-		Diagnostic d = issueByName(diag, message);
-		assertNotNull("Issue '" + message + "' does not exist.",
-				issueByName(diag, message));
-		assertEquals("Issue '" + message + "' is no warning.",
-				Diagnostic.WARNING, d.getSeverity());
-	}
-
-	protected void assertIssue(BasicDiagnostic diag, String message) {
-		assertNotNull("Issue '" + message + "' does not exist.",
-				issueByName(diag, message));
-	}
-
-	protected void assertNoIssue(BasicDiagnostic diag, String message) {
-		assertNull("Issue '" + message + "' does exist.",
-				issueByName(diag, message));
-	}
-
-	protected void assertNoIssues(BasicDiagnostic diag) {
-		assertIssueCount(diag, 0);
-	}
-
-	protected void assertIssueCount(BasicDiagnostic diag, int count) {
-		int c = diagnostics.getChildren().size();
-		assertEquals("expected " + count + " issue(s) but were " + c + " ["
-				+ diag.toString() + "]", count, c);
-	}
-
-	protected Diagnostic issueByName(BasicDiagnostic diag, String message) {
-		for (Diagnostic issue : diag.getChildren()) {
-			if (message.equals(issue.getMessage()))
-				return issue;
-		}
-
-		return null;
-	}
-
-	protected boolean validate(EObject obj) {
-		return validator.validate(obj, diagnostics,
-				new HashMap<Object, Object>());
-	}
-	
-	protected Statechart loadStatechart(String modelName) {
-		return AbstractTestModelsUtil
-				.loadStatechart(VALIDATION_TESTMODEL_DIR
-						+ modelName);
-	}
-
-
-
-}

+ 0 - 63
test-plugins/org.yakindu.sct.model.sgraph.test/src/org/yakindu/sct/model/sgraph/test/StateImplTest.java

@@ -1,63 +0,0 @@
-/**
- * Copyright (c) 2011 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.model.sgraph.test;
-
-import junit.framework.TestCase;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.yakindu.sct.model.sgraph.Region;
-import org.yakindu.sct.model.sgraph.SGraphFactory;
-import org.yakindu.sct.model.sgraph.State;
-import org.yakindu.sct.model.sgraph.Statechart;
-/**
- * 
- * @author schwertfeger
- *
- */
-public class StateImplTest extends TestCase {
-	protected SGraphFactory factory;
-
-	protected Statechart statechart;
-	protected Region region;
-	private State state;
-
-	@Before
-	public void setUp() throws Exception {
-		factory = SGraphFactory.eINSTANCE;
-		statechart = factory.createStatechart();
-		statechart.setName("SC");
-
-		region = factory.createRegion();
-		statechart.getRegions().add(region);
-		state = factory.createState();
-		state.setName(getClass().getSimpleName());
-		region.getVertices().add(state);
-	}
-
-	@Test
-	public void testIsSimple() {
-		assertTrue(state.isSimple());
-
-		Region region2 = factory.createRegion();
-		state.getRegions().add(region2);
-		assertTrue(state.isSimple());
-
-		region2.getVertices().add(factory.createState());
-		assertFalse(state.isSimple());
-
-		state.getRegions().add(factory.createRegion());
-		assertFalse(state.isSimple());
-
-		region2.getVertices().clear();
-		assertTrue(state.isSimple());
-	}
-}

+ 30 - 28
test-plugins/org.yakindu.sct.model.sgraph.test/src/org/yakindu/sct/model/sgraph/test/SGraphTestInjectorProvider.java

@@ -1,28 +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
- * 
- */
-package org.yakindu.sct.model.sgraph.test;
-
-import org.eclipse.xtext.junit4.IInjectorProvider;
-
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-/**
- * 
- * @author andreas muelder - Initial contribution and API
- * 
- */
-public class SGraphTestInjectorProvider implements IInjectorProvider {
-
-	public Injector getInjector() {
-		return Guice.createInjector(new SGraphTestModule());
-	}
-
-}
+/**
+ * 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.model.sgraph.test.util;
+
+import org.eclipse.xtext.junit4.IInjectorProvider;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+/**
+ * 
+ * @author andreas muelder - Initial contribution and API
+ * 
+ */
+@SuppressWarnings("deprecation") // Use new API when Mars support is dropped
+public class SGraphTestInjectorProvider implements IInjectorProvider {
+
+	public Injector getInjector() {
+		return Guice.createInjector(new SGraphTestModule());
+	}
+
+}

+ 1 - 1
test-plugins/org.yakindu.sct.model.sgraph.test/src/org/yakindu/sct/model/sgraph/test/SGraphTestModule.java

@@ -8,7 +8,7 @@
  * committers of YAKINDU - initial API and implementation
  *
 */
-package org.yakindu.sct.model.sgraph.test;
+package org.yakindu.sct.model.sgraph.test.util;
 
 import org.eclipse.emf.ecore.EValidator;
 import org.eclipse.xtext.Constants;

+ 75 - 0
test-plugins/org.yakindu.sct.model.sgraph.test/src/org/yakindu/sct/model/sgraph/validation/test/AbstractSGraphValidatorTest.java

@@ -0,0 +1,75 @@
+/**
+ * Copyright (c) 2018 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.model.sgraph.validation.test;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.xtext.junit4.InjectWith;
+import org.eclipse.xtext.junit4.XtextRunner;
+import org.junit.Before;
+import org.junit.runner.RunWith;
+import org.yakindu.sct.model.sgraph.Region;
+import org.yakindu.sct.model.sgraph.SGraphFactory;
+import org.yakindu.sct.model.sgraph.SGraphPackage;
+import org.yakindu.sct.model.sgraph.State;
+import org.yakindu.sct.model.sgraph.Statechart;
+import org.yakindu.sct.model.sgraph.Transition;
+import org.yakindu.sct.model.sgraph.Vertex;
+import org.yakindu.sct.model.sgraph.test.util.SGraphTestInjectorProvider;
+import org.yakindu.sct.model.stext.stext.StextFactory;
+
+// Remove the deprecated API when Mars support is dropped
+@SuppressWarnings("deprecation")
+@RunWith(XtextRunner.class)
+@InjectWith(SGraphTestInjectorProvider.class)
+public class AbstractSGraphValidatorTest {
+
+	public static final String VALIDATION_TESTMODEL_DIR = "org.yakindu.sct.model.sgraph.test/testmodels/";
+
+	protected SGraphFactory factory;
+	protected StextFactory sTextFactory;
+
+	@Before
+	public void setUp() throws Exception {
+		factory = SGraphFactory.eINSTANCE;
+		sTextFactory = StextFactory.eINSTANCE;
+	}
+
+	protected State createState() {
+		Region region = factory.createRegion();
+		Statechart statechart = factory.createStatechart();
+		statechart.getRegions().add(region);
+		State state = factory.createState();
+		region.getVertices().add(state);
+		return state;
+	}
+
+	protected Transition createTransition(Vertex source, Vertex target) {
+		Transition trans = factory.createTransition();
+		trans.setSource(source);
+		trans.setTarget(target);
+		source.getOutgoingTransitions().add(trans);
+		target.getIncomingTransitions().add(trans);
+		return trans;
+	}
+
+	protected Statechart loadStatechart(String path) {
+		ResourceSet resSet = new ResourceSetImpl();
+		Resource resource = resSet.getResource(URI.createPlatformPluginURI(VALIDATION_TESTMODEL_DIR + path, true),
+				true);
+		Statechart statechart = (Statechart) EcoreUtil.getObjectByType(resource.getContents(),
+				SGraphPackage.Literals.STATECHART);
+		return statechart;
+	}
+}

+ 46 - 0
test-plugins/org.yakindu.sct.model.sgraph.test/src/org/yakindu/sct/model/sgraph/validation/test/ChoiceValidatorTest.java

@@ -0,0 +1,46 @@
+/**
+ * Copyright (c) 2012-2018 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.model.sgraph.validation.test;
+
+import static org.yakindu.sct.model.sgraph.validation.ChoiceValidator.OUTGOING_TRANSITION_COUNT_CODE;
+
+import org.junit.Test;
+import org.yakindu.sct.model.sgraph.Choice;
+import org.yakindu.sct.model.sgraph.Region;
+import org.yakindu.sct.model.sgraph.State;
+import org.yakindu.sct.model.sgraph.Statechart;
+import org.yakindu.sct.model.sgraph.validation.ChoiceValidator;
+
+import com.google.inject.Inject;
+
+public class ChoiceValidatorTest extends AbstractSGraphValidatorTest {
+
+	@Inject
+	protected SGraphJavaValidatorTester<ChoiceValidator> tester;
+
+	/**
+	 * A choice must have at least one outgoing transition
+	 */
+	@Test
+	public void choiceWithoutOutgoingTransition() {
+		Statechart statechart = factory.createStatechart();
+		Region region = factory.createRegion();
+		statechart.getRegions().add(region);
+		Choice choice = factory.createChoice();
+		region.getVertices().add(choice);
+		State state = factory.createState();
+		region.getVertices().add(state);
+		createTransition(state, choice);
+
+		tester.validate(choice).assertError(OUTGOING_TRANSITION_COUNT_CODE);
+	}
+
+}

+ 242 - 0
test-plugins/org.yakindu.sct.model.sgraph.test/src/org/yakindu/sct/model/sgraph/validation/test/EntryExitValidatorTest.java

@@ -0,0 +1,242 @@
+/**
+ * Copyright (c) 2012-2018 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.model.sgraph.validation.test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.yakindu.sct.model.sgraph.validation.EntryExitValidator.*;
+
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.xtext.junit4.validation.AssertableDiagnostics;
+import org.junit.Test;
+import org.yakindu.sct.model.sgraph.Entry;
+import org.yakindu.sct.model.sgraph.EntryKind;
+import org.yakindu.sct.model.sgraph.Exit;
+import org.yakindu.sct.model.sgraph.Region;
+import org.yakindu.sct.model.sgraph.State;
+import org.yakindu.sct.model.sgraph.Statechart;
+import org.yakindu.sct.model.sgraph.Transition;
+import org.yakindu.sct.model.sgraph.validation.EntryExitValidator;
+
+import com.google.common.collect.Iterables;
+import com.google.inject.Inject;
+
+public class EntryExitValidatorTest extends AbstractSGraphValidatorTest {
+
+	@Inject
+	protected SGraphJavaValidatorTester<EntryExitValidator> tester;
+
+	/**
+	 * An initial entry should have no incoming transition
+	 */
+	@Test
+	public void initialEntryWithoutIncomingTransitions() {
+		State state = createState();
+		Region region = (Region) state.eContainer();
+		Entry entry = factory.createEntry();
+		region.getVertices().add(entry);
+		createTransition(state, entry);
+		createTransition(entry, state);
+
+		assertEquals(EntryKind.INITIAL, entry.getKind());
+		tester.validate(entry).assertWarning(INITIAL_ENTRY_NO_IN_TRANSITION_CODE);
+	}
+
+	/**
+	 * A valid entry should have No issues
+	 */
+	@Test
+	public void validInitialEntry() {
+		State state = createState();
+		Region region = (Region) state.eContainer();
+		Entry entry = factory.createEntry();
+		region.getVertices().add(entry);
+		createTransition(entry, state);
+
+		assertEquals(EntryKind.INITIAL, entry.getKind());
+		tester.validate(entry).assertOK();
+	}
+
+	/**
+	 * An initial entry should have an outgoing transition
+	 */
+	@Test
+	public void initialEntryWithoutOutgoingTransition() {
+		State state = createState();
+		Region region = (Region) state.eContainer();
+		Entry entry = factory.createEntry();
+		region.getVertices().add(entry);
+
+		assertEquals(EntryKind.INITIAL, entry.getKind());
+		tester.validate(entry).assertWarning(INITIAL_ENTRY_ONE_OUT_TRANSITION_CODE);
+
+	}
+
+	/**
+	 * An entry should not have more than one outgoing transition
+	 */
+	@Test
+	public void initialEntryWithMultipleOutgoingTransition() {
+		State state = createState();
+		Region region = (Region) state.eContainer();
+		Entry entry = factory.createEntry();
+		region.getVertices().add(entry);
+		createTransition(entry, state);
+		createTransition(entry, state);
+
+		assertEquals(EntryKind.INITIAL, entry.getKind());
+		tester.validate(entry).assertError(INITIAL_ENTRY_ONE_OUT_TRANSITION_CODE);
+
+		entry.setKind(EntryKind.DEEP_HISTORY);
+		tester.validate(entry).assertError(INITIAL_ENTRY_ONE_OUT_TRANSITION_CODE);
+		
+		entry.setKind(EntryKind.SHALLOW_HISTORY);
+		tester.validate(entry).assertError(INITIAL_ENTRY_ONE_OUT_TRANSITION_CODE);
+	}
+	
+	/**
+	 * An entry should not have more than one outgoing transition
+	 */
+	@Test
+	public void DeepHistoryWithMultipleOutgoingTransition() {
+		State state = createState();
+		Region region = (Region) state.eContainer();
+		Entry entry = factory.createEntry();
+		region.getVertices().add(entry);
+		createTransition(entry, state);
+		createTransition(entry, state);
+
+		assertEquals(EntryKind.INITIAL, entry.getKind());
+		tester.validate(entry).assertError(INITIAL_ENTRY_ONE_OUT_TRANSITION_CODE);
+
+		entry.setKind(EntryKind.SHALLOW_HISTORY);
+		tester.validate(entry).assertError(INITIAL_ENTRY_ONE_OUT_TRANSITION_CODE);
+
+		entry.setKind(EntryKind.DEEP_HISTORY);
+		tester.validate(entry).assertError(INITIAL_ENTRY_ONE_OUT_TRANSITION_CODE);
+	}
+
+
+	/**
+	 * An exit node should have at leat one incoming transition.
+	 */
+	@Test
+	public void exitWithoutIncomingTransition() {
+		State state = createState();
+		Region subRegion = factory.createRegion();
+		state.getRegions().add(subRegion);
+		Exit exit = factory.createExit();
+		subRegion.getVertices().add(exit);
+
+		tester.validate(exit).assertWarning(EXIT_AT_LEAST_ONE_IN_TRANSITION_CODE);
+	}
+
+	/**
+	 * An exit node must have no outgoing transitions.
+	 */
+	@Test
+	public void exitWithOutgoingTransition() {
+		State state = createState();
+		Region subRegion = factory.createRegion();
+		state.getRegions().add(subRegion);
+		Exit exit = factory.createExit();
+		subRegion.getVertices().add(exit);
+		State s = factory.createState();
+		subRegion.getVertices().add(s);
+		createTransition(exit, s);
+		createTransition(s, exit);
+
+		tester.validate(exit).assertError(EXIT_NO_OUTGOING_TRANSITION_CODE);
+	}
+
+	/**
+	 * An exit node must not be used in top level regions.
+	 */
+	@Test
+	public void exitOnStatechart() {
+		State state = createState();
+		Region region = (Region) state.eContainer();
+		Exit exit = factory.createExit();
+		createTransition(state, exit);
+		region.getVertices().add(exit);
+		tester.validate(exit).assertError(EXIT_NO_TOPLEVEL_REGION_CODE);
+	}
+
+	/**
+	 * Tests a scenario where no issues for an exit nodes exists.
+	 */
+	@Test
+	public void cleanExit() {
+		State state = createState();
+		Region subRegion = factory.createRegion();
+		state.getRegions().add(subRegion);
+		Exit exit = factory.createExit();
+		subRegion.getVertices().add(exit);
+		State s = factory.createState();
+		subRegion.getVertices().add(s);
+		Transition t = factory.createTransition();
+		t.setTarget(exit);
+		t.setSource(s);
+
+		tester.validate(exit).assertOK();
+	}
+	
+	@Test
+	public void disallowTrigger() {
+		State state = createState();
+		Region region  = ((Region)state.eContainer());
+		Entry entry = factory.createEntry();
+		region.getVertices().add(entry);
+		Transition trans = createTransition(entry, state);
+		trans.setTrigger(sTextFactory.createReactionTrigger());
+		tester.validate(entry).assertError(ENTRY_NO_TRIGGER_CODE);
+	}
+	
+	@Test
+	public void regionCantBeEnteredUsingShallowHistory() {
+		Statechart statechart = loadStatechart("RegionCantBeEnteredUsingShallowHistory.sct");
+		AssertableDiagnostics result = tester.validate(statechart);
+		Iterable<Diagnostic> allDiagnostics = result.getAllDiagnostics();
+		result.assertDiagnosticsCount(2);
+//		result.assertError(issueCode);;
+		
+//
+//		Diagnostic issue = issueByName(diagnostics,
+//				ISSUE_REGION_CANT_BE_ENTERED_USING_SHALLOW_HISTORY_NO_DEFAULT_ENTRY);
+//		assertTrue(issue.getSeverity() == Diagnostic.ERROR);
+//		assertEquals("r_a", ((NamedElement) issue.getData().get(0)).getName());
+//
+//		issue = issueByName(diagnostics,
+//				ISSUE_REGION_CANT_BE_ENTERED_USING_SHALLOW_HISTORY_NON_CONNECTED_DEFAULT_ENTRY);
+//		assertTrue(issue.getSeverity() == Diagnostic.ERROR);
+//		assertEquals("r_c", ((NamedElement) issue.getData().get(0)).getName());
+	}
+	
+	@Test
+	public void validTransitionToInnerChoice() {
+		Statechart statechart = loadStatechart("ValidTransitionToInnerChoice.sct");
+		tester.validate(statechart);
+		// Iterator<EObject> iter = statechart.eAllContents();
+		// while (iter.hasNext()) {
+		// EObject element = iter.next();
+		// if (element instanceof State) {
+		// validator.validate(element, diagnostics, new HashMap<Object, Object>());
+		// }
+		// }
+		//
+		// assertIssueCount(diagnostics, 0);
+	}
+
+	@Override
+	protected Statechart loadStatechart(String path) {
+		return super.loadStatechart("entry/" + path);
+	}
+}

+ 65 - 0
test-plugins/org.yakindu.sct.model.sgraph.test/src/org/yakindu/sct/model/sgraph/validation/test/FinalStateValidatorTest.java

@@ -0,0 +1,65 @@
+/**
+ * Copyright (c) 2012-2018 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.model.sgraph.validation.test;
+
+import static org.yakindu.sct.model.sgraph.validation.FinalStateValidator.FINAL_STATE_NO_OUT_TRANSITION_CODE;
+
+import org.junit.Test;
+import org.yakindu.sct.model.sgraph.FinalState;
+import org.yakindu.sct.model.sgraph.Region;
+import org.yakindu.sct.model.sgraph.State;
+import org.yakindu.sct.model.sgraph.Statechart;
+import org.yakindu.sct.model.sgraph.validation.FinalStateValidator;
+
+import com.google.inject.Inject;
+
+public class FinalStateValidatorTest extends AbstractSGraphValidatorTest {
+
+	@Inject
+	private SGraphJavaValidatorTester<FinalStateValidator> tester;
+
+	/**
+	 * A final state should have no outgoing transitions
+	 */
+	@Test
+	public void finalStateWithOutgoingTransition() {
+		Statechart statechart = factory.createStatechart();
+		Region region = factory.createRegion();
+		statechart.getRegions().add(region);
+		FinalState finalState = factory.createFinalState();
+		region.getVertices().add(finalState);
+		State state = factory.createState();
+		region.getVertices().add(state);
+
+		createTransition(state, finalState);
+		createTransition(finalState, state);
+
+		tester.validate(finalState).assertWarning(FINAL_STATE_NO_OUT_TRANSITION_CODE);
+	}
+
+	/**
+	 * A positive case for a valid final state.
+	 */
+	@Test
+	public void finalStateValid() {
+		Statechart statechart = factory.createStatechart();
+		Region region = factory.createRegion();
+		statechart.getRegions().add(region);
+		FinalState finalState = factory.createFinalState();
+		region.getVertices().add(finalState);
+		State state = factory.createState();
+		region.getVertices().add(state);
+		createTransition(state, finalState);
+
+		tester.validate(finalState).assertOK();
+	}
+
+}

+ 39 - 0
test-plugins/org.yakindu.sct.model.sgraph.test/src/org/yakindu/sct/model/sgraph/validation/test/SGraphJavaValidatorTester.java

@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2018 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.model.sgraph.validation.test;
+
+import org.eclipse.emf.ecore.impl.EValidatorRegistryImpl;
+import org.eclipse.emf.ecore.util.Diagnostician;
+import org.eclipse.xtext.junit4.validation.ValidatorTester;
+import org.eclipse.xtext.validation.AbstractDeclarativeValidator;
+import org.eclipse.xtext.validation.EValidatorRegistrar;
+import org.yakindu.sct.model.sgraph.SGraphPackage;
+
+import com.google.inject.Inject;
+
+/**
+ * 
+ * Registers the validator for SGraphPackage since they override register due to
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=387170
+ * 
+ * @author andreas muelder - Initial contribution and API
+ * 
+ */
+public class SGraphJavaValidatorTester<T extends AbstractDeclarativeValidator> extends ValidatorTester<T> {
+	@Inject
+	public SGraphJavaValidatorTester(T validator, EValidatorRegistrar registrar, String languageName) {
+		super(validator, registrar, languageName);
+		EValidatorRegistryImpl newRegistry = new EValidatorRegistryImpl();
+		newRegistry.put(SGraphPackage.eINSTANCE, validator);
+		diagnostician = new Diagnostician(newRegistry);
+	}
+
+}

+ 60 - 0
test-plugins/org.yakindu.sct.model.sgraph.test/src/org/yakindu/sct/model/sgraph/validation/test/StateValidatorTest.java

@@ -0,0 +1,60 @@
+/**
+ * Copyright (c) 2012-2018 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.model.sgraph.validation.test;
+
+import static org.yakindu.sct.model.sgraph.validation.StateValidator.ISSUE_STATE_NAME_CODE;
+
+import org.eclipse.xtext.junit4.validation.AssertableDiagnostics;
+import org.junit.Test;
+import org.yakindu.sct.model.sgraph.State;
+import org.yakindu.sct.model.sgraph.validation.StateValidator;
+
+import com.google.inject.Inject;
+
+public class StateValidatorTest extends AbstractSGraphValidatorTest {
+
+	@Inject
+	protected SGraphJavaValidatorTester<StateValidator> tester;
+
+	/**
+	 * A regular state must have a name.
+	 */
+	@Test
+	public void stateWithoutName() {
+		State state = createState();
+		state.setName(null);
+		AssertableDiagnostics result = tester.validate(state);
+		result.assertError(ISSUE_STATE_NAME_CODE);
+	}
+
+	/**
+	 * A states name must not be empty.
+	 */
+	@Test
+	public void nameIsNotEmpty() {
+		State state = createState();
+		state.setName("");
+		AssertableDiagnostics result = tester.validate(state);
+		result.assertError(ISSUE_STATE_NAME_CODE);
+	}
+
+	/**
+	 * A state name with just white spaces is not valid.
+	 */
+	@Test
+	public void stateWithWhitespaceName() {
+		State state = createState();
+		state.setName(" 	");
+		AssertableDiagnostics result = tester.validate(state);
+		result.assertError(ISSUE_STATE_NAME_CODE);
+	}
+
+}

+ 40 - 0
test-plugins/org.yakindu.sct.model.sgraph.test/src/org/yakindu/sct/model/sgraph/validation/test/StatechartValidatorTest.java

@@ -0,0 +1,40 @@
+/**
+ * Copyright (c) 2012-2018 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.model.sgraph.validation.test;
+
+import static org.yakindu.sct.model.sgraph.validation.StatechartValidator.STATECHART_NAME_VALID_IDENTIFIER_CODE;
+
+import org.junit.Test;
+import org.yakindu.sct.model.sgraph.SGraphFactory;
+import org.yakindu.sct.model.sgraph.Statechart;
+import org.yakindu.sct.model.sgraph.validation.StatechartValidator;
+
+import com.google.inject.Inject;
+
+public class StatechartValidatorTest extends AbstractSGraphValidatorTest {
+
+	@Inject
+	protected SGraphJavaValidatorTester<StatechartValidator> tester;
+
+	@Test
+	public void checkStatechartNameIsIdentifier() {
+		Statechart statechart = SGraphFactory.eINSTANCE.createStatechart();
+		statechart.setName("Not a valid identifier");
+		tester.validate(statechart).assertError(STATECHART_NAME_VALID_IDENTIFIER_CODE);
+
+		statechart.setName("0Notavalididentifier");
+		tester.validate(statechart).assertError(STATECHART_NAME_VALID_IDENTIFIER_CODE);
+
+		statechart.setName("ValidIdentifier");
+		tester.validate(statechart).assertOK();
+	}
+
+}

+ 169 - 0
test-plugins/org.yakindu.sct.model.sgraph.test/src/org/yakindu/sct/model/sgraph/validation/test/SynchronizationValidatorTest.java

@@ -0,0 +1,169 @@
+/**
+ * Copyright (c) 2012-2018 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.model.sgraph.validation.test;
+
+import org.junit.Test;
+import org.yakindu.sct.model.sgraph.Statechart;
+import org.yakindu.sct.model.sgraph.validation.SynchronizationValidator;
+
+import com.google.inject.Inject;
+
+public class SynchronizationValidatorTest extends AbstractSGraphValidatorTest {
+
+	@Inject
+	protected SGraphJavaValidatorTester<SynchronizationValidator> tester;
+
+	@Test
+	public void synchronizationTransitionCount() {
+		Statechart statechart = loadStatechart("SynchronizationTransitionCount.sct");
+		tester.validate(statechart);
+		// Iterator<EObject> iter = statechart.eAllContents();
+		// while (iter.hasNext()) {
+		// EObject element = iter.next();
+		// if (element instanceof Synchronization) {
+		// assertFalse(validator.validate(element, diagnostics, new HashMap<Object,
+		// Object>()));
+		// }
+		// }
+		//
+		// assertIssueCount(diagnostics, 2);
+		// assertError(diagnostics, ISSUE_SYNCHRONIZATION_TRANSITION_COUNT);
+	}
+
+	@Test
+	public void synchronizationOutgoingTransitionCount() {
+		Statechart statechart = loadStatechart("SyncOutgoingTransition.sct");
+		tester.validate(statechart);
+//		State state = firstNamed(EcoreUtil2.eAllOfType(statechart, State.class), "StateB");
+//		Synchronization sync = (Synchronization) state.getOutgoingTransitions().get(0).getTarget();
+//
+//		assertFalse(validator.validate(sync, diagnostics, new HashMap<Object, Object>()));
+//		assertIssueCount(diagnostics, 1);
+//		assertError(diagnostics, ISSUE_SYNCHRONIZATION_TRANSITION_OUTGOING);
+	}
+
+	@Test
+	public void orthogonalTargetStates_StateInParentStateRegion() {
+		Statechart statechart = loadStatechart("NotOrthogonalRegion01.sct");
+
+		tester.validate(statechart);
+//		State b = firstNamed(EcoreUtil2.eAllOfType(statechart, State.class), "B");
+//		Synchronization sync = (Synchronization) b.getOutgoingTransitions().get(0).getTarget();
+//
+//		assertFalse(validator.validate(sync, diagnostics, new HashMap<Object, Object>()));
+//		assertIssueCount(diagnostics, 1);
+//		assertError(diagnostics, ISSUE_SYNCHRONIZATION_TARGET_STATES_NOT_ORTHOGONAL);
+	}
+
+	@Test
+	public void orthogonalTargetStates_StateInTopLevelRegion() {
+		Statechart statechart = loadStatechart("NotOrthogonalRegion02.sct");
+		tester.validate(statechart);
+//		State b = firstNamed(EcoreUtil2.eAllOfType(statechart, State.class), "B");
+//		Synchronization sync = (Synchronization) b.getOutgoingTransitions().get(0).getTarget();
+//
+//		assertFalse(validator.validate(sync, diagnostics, new HashMap<Object, Object>()));
+//		assertIssueCount(diagnostics, 1);
+//		assertError(diagnostics, ISSUE_SYNCHRONIZATION_TARGET_STATES_NOT_ORTHOGONAL);
+	}
+
+	@Test
+	public void orthogonalSynchronizedTransition() {
+		Statechart statechart = loadStatechart("NotOrthogonalRegion03.sct");
+		tester.validate(statechart);
+
+//		State stateB = firstNamed(EcoreUtil2.eAllOfType(statechart, State.class), "B");
+//		Synchronization sync = (Synchronization) stateB.getOutgoingTransitions().get(0).getTarget();
+//
+//		assertFalse(validator.validate(sync, diagnostics, new HashMap<Object, Object>()));
+//		assertIssueCount(diagnostics, 2);
+//		assertError(diagnostics, ISSUE_SYNCHRONIZATION_SOURCE_TARGET_STATES_PARENT_REGION);
+	}
+
+	@Test
+	public void orthogonalSourceStates() {
+		Statechart statechart = loadStatechart("OrthogonalRegion01.sct");
+		tester.validate(statechart);
+		
+//		State b = firstNamed(EcoreUtil2.eAllOfType(statechart, State.class), "AA");
+//		Synchronization sync = (Synchronization) b.getOutgoingTransitions().get(0).getTarget();
+//
+//		assertTrue(validator.validate(sync, diagnostics, new HashMap<Object, Object>()));
+//		assertNoIssues(diagnostics);
+	}
+
+	@Test
+	public void orthogonalSourceStates_StateInParentStateRegion() {
+		Statechart statechart = loadStatechart("NotOrthogonalRegion01.sct");
+		tester.validate(statechart);
+			
+//		State b = firstNamed(EcoreUtil2.eAllOfType(statechart, State.class), "AA");
+//		Synchronization sync = (Synchronization) b.getOutgoingTransitions().get(0).getTarget();
+//
+//		assertFalse(validator.validate(sync, diagnostics, new HashMap<Object, Object>()));
+//		assertIssueCount(diagnostics, 1);
+//		assertError(diagnostics, ISSUE_SYNCHRONIZATION_SOURCE_STATES_NOT_ORTHOGONAL);
+	}
+
+	@Test
+	public void orthogonalSourceStates_StateInTopLevelRegion() {
+		Statechart statechart = loadStatechart("NotOrthogonalRegion02.sct");
+		tester.validate(statechart);
+//		State b = firstNamed(EcoreUtil2.eAllOfType(statechart, State.class), "AA");
+//		Synchronization sync = (Synchronization) b.getOutgoingTransitions().get(0).getTarget();
+//
+//		assertFalse(validator.validate(sync, diagnostics, new HashMap<Object, Object>()));
+//		assertIssueCount(diagnostics, 1);
+//		assertError(diagnostics, ISSUE_SYNCHRONIZATION_SOURCE_STATES_NOT_ORTHOGONAL);
+	}
+
+	@Test
+	public void orthogonalTargetStates() {
+		Statechart statechart = loadStatechart("OrthogonalRegion01.sct");
+		tester.validate(statechart);
+		
+//		State b = firstNamed(EcoreUtil2.eAllOfType(statechart, State.class), "B");
+//		Synchronization sync = (Synchronization) b.getOutgoingTransitions().get(0).getTarget();
+//
+//		assertTrue(validator.validate(sync, diagnostics, new HashMap<Object, Object>()));
+//		assertNoIssues(diagnostics);
+	}
+
+	@Test
+	public void orthogonalSynchronizedTransition_Source() {
+		Statechart statechart = loadStatechart("NotOrthogonalRegion03.sct");
+		tester.validate(statechart);
+		
+//		State stateC = firstNamed(EcoreUtil2.eAllOfType(statechart, State.class), "C");
+//		Synchronization sync = (Synchronization) stateC.getOutgoingTransitions().get(0).getTarget();
+//
+//		assertFalse(validator.validate(sync, diagnostics, new HashMap<Object, Object>()));
+//		assertIssueCount(diagnostics, 2);
+//		assertError(diagnostics, ISSUE_SYNCHRONIZATION_SOURCE_TARGET_STATES_PARENT_REGION);
+	}
+
+	@Test
+	public void syncLocation_Issue58() {
+		Statechart statechart = loadStatechart("SyncLocation_Issue58.sct");
+		tester.validate(statechart);
+		
+//		State state = firstNamed(EcoreUtil2.eAllOfType(statechart, State.class), "AA");
+//		Synchronization sync = (Synchronization) state.getOutgoingTransitions().get(0).getTarget();
+//
+//		assertTrue(validator.validate(sync, diagnostics, new HashMap<Object, Object>()));
+//		assertNoIssues(diagnostics);
+	}
+
+	protected Statechart loadStatechart(String modelName) {
+		return super.loadStatechart("synchronization/" + modelName);
+	}
+
+}

+ 50 - 0
test-plugins/org.yakindu.sct.model.sgraph.test/src/org/yakindu/sct/model/sgraph/validation/test/TransitionValidatorTest.java

@@ -0,0 +1,50 @@
+/**
+ * Copyright (c) 2012-2018 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.model.sgraph.validation.test;
+
+import static org.yakindu.sct.model.sgraph.validation.TransitionValidator.INITIAL_ENTRY_WITH_TRANSITION_TO_CONTAINER_CODE;
+import static org.yakindu.sct.model.sgraph.validation.TransitionValidator.TRANSITION_SOURCE_TARGET_NOT_ORTHOGONAL_CODE;
+
+import org.junit.Test;
+import org.yakindu.sct.model.sgraph.Statechart;
+import org.yakindu.sct.model.sgraph.validation.TransitionValidator;
+
+import com.google.inject.Inject;
+
+public class TransitionValidatorTest extends AbstractSGraphValidatorTest {
+
+	@Inject
+	protected SGraphJavaValidatorTester<TransitionValidator> tester;
+
+	@Test
+	public void initialEntryWithTransitionToContainer() {
+		Statechart statechart = loadStatechart("EntryTransitionToParentState.sct");
+		tester.validate(statechart).assertError(INITIAL_ENTRY_WITH_TRANSITION_TO_CONTAINER_CODE);
+	}
+
+	@Test
+	public void orthogonalTransition_BetweenTopLevelRegions() {
+		Statechart statechart = loadStatechart("OrthogonalTransition01.sct");
+		tester.validate(statechart).assertError(TRANSITION_SOURCE_TARGET_NOT_ORTHOGONAL_CODE);
+	}
+
+	@Test
+	public void orthogonalTransition_BetweenCompositeStateRegions() {
+		Statechart statechart = loadStatechart("OrthogonalTransition02.sct");
+		tester.validate(statechart).assertError(TRANSITION_SOURCE_TARGET_NOT_ORTHOGONAL_CODE);
+	}
+
+	@Override
+	protected Statechart loadStatechart(String path) {
+		return super.loadStatechart("transition/" + path);
+	}
+
+}

+ 169 - 0
test-plugins/org.yakindu.sct.model.sgraph.test/src/org/yakindu/sct/model/sgraph/validation/test/VertexValidatorTest.java

@@ -0,0 +1,169 @@
+/**
+ * Copyright (c) 2012-2018 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.model.sgraph.validation.test;
+
+import static org.yakindu.sct.model.sgraph.validation.VertexValidator.VERTEX_REACHABLE_CODE;
+
+import org.junit.Test;
+import org.yakindu.sct.model.sgraph.Choice;
+import org.yakindu.sct.model.sgraph.Entry;
+import org.yakindu.sct.model.sgraph.FinalState;
+import org.yakindu.sct.model.sgraph.Region;
+import org.yakindu.sct.model.sgraph.State;
+import org.yakindu.sct.model.sgraph.Statechart;
+import org.yakindu.sct.model.sgraph.Transition;
+import org.yakindu.sct.model.sgraph.validation.VertexValidator;
+
+import com.google.inject.Inject;
+
+public class VertexValidatorTest extends AbstractSGraphValidatorTest {
+
+	@Inject
+	protected SGraphJavaValidatorTester<VertexValidator> tester;
+
+	/**
+	 * A state must be reachable.
+	 */
+	@Test
+	public void vertexNotReachable() {
+		State state = createState();
+		tester.validate(state).assertError(VERTEX_REACHABLE_CODE);
+	}
+
+	/**
+	 * A transition to a sub entry is considered implies reachability.
+	 */
+	@Test
+	public void vertexNotReachable_AcceptThroughSubstate() {
+		State state = createState();
+		State stateA = factory.createState();
+		Region subRegion = factory.createRegion();
+		state.getRegions().add(subRegion);
+		State stateC = factory.createState();
+		subRegion.getVertices().add(stateC);
+		Transition t1 = factory.createTransition();
+		t1.setSource(stateA);
+		t1.setTarget(stateC);
+		tester.validate(state).assertOK();
+	}
+
+	/**
+	 * A transition to a sub entry is considered implies reachability.
+	 */
+	@Test
+	public void vertexNotReachable_AcceptThroughSubentry() {
+		State state = createState();
+
+		State stateA = factory.createState();
+
+		Region subRegion = factory.createRegion();
+		state.getRegions().add(subRegion);
+
+		State stateC = factory.createState();
+		subRegion.getVertices().add(stateC);
+
+		Entry entry = factory.createEntry();
+		subRegion.getVertices().add(entry);
+
+		Transition t1 = factory.createTransition();
+		t1.setSource(stateA);
+		t1.setTarget(entry);
+
+		Transition t2 = factory.createTransition();
+		t2.setSource(entry);
+		t2.setTarget(stateC);
+
+		tester.validate(state).assertOK();
+	}
+
+	/**
+	 * A transition to a sub choice is considered implies reachability.
+	 */
+	@Test
+	public void vertexNotReachable_AcceptThroughSubchoice() {
+		State state = createState();
+
+		State stateA = factory.createState();
+
+		Region subRegion = factory.createRegion();
+		state.getRegions().add(subRegion);
+
+		State stateC = factory.createState();
+		subRegion.getVertices().add(stateC);
+
+		Choice choice = factory.createChoice();
+		subRegion.getVertices().add(choice);
+
+		Transition t1 = factory.createTransition();
+		t1.setSource(stateA);
+		t1.setTarget(choice);
+
+		Transition t2 = factory.createTransition();
+		t2.setSource(choice);
+		t2.setTarget(stateC);
+
+		tester.validate(state).assertOK();
+	}
+
+	/**
+	 * If an incoming transitions is part of an external transition path that only
+	 * consists of pseudo states and only has state predecessors within the state
+	 * then the state is not reachable and the validation must fail with an error.
+	 */
+	@Test
+	public void vertexNotReachable_FailOnExternalPseudoPath() {
+		State state = createState();
+		Choice choice = factory.createChoice();
+		((Region) state.eContainer()).getVertices().add(choice);
+		createTransition(state, choice);
+		createTransition(choice, state);
+		tester.validate(state).assertError(VERTEX_REACHABLE_CODE);
+	}
+
+	/**
+	 * If an incoming transitions is part of an external transition path to an
+	 * internal state that only consists of pseudo states and only has state
+	 * predecessors within the state then the state is not reachable and the
+	 * validation must fail with an error.
+	 */
+	@Test
+	public void vertexNotReachable_FailOnExternalPseudoPathToSubstate() {
+		Entry entry = factory.createEntry();
+		State state = createState();
+		((Region) state.eContainer()).getVertices().add(entry);
+		createTransition(entry, state);
+		Region subRegion = factory.createRegion();
+		state.getRegions().add(subRegion);
+		State stateA = factory.createState();
+		subRegion.getVertices().add(stateA);
+		Choice choice = factory.createChoice();
+		((Region) state.eContainer()).getVertices().add(choice);
+		createTransition(stateA, choice);
+		createTransition(choice, stateA);
+
+		tester.validate(state).assertError(VERTEX_REACHABLE_CODE);
+	}
+
+	/**
+	 * A final state should have at least one incoming transition.
+	 */
+	@Test
+	public void finalStateIsolated() {
+		Statechart statechart = factory.createStatechart();
+		Region region = factory.createRegion();
+		statechart.getRegions().add(region);
+		FinalState finalState = factory.createFinalState();
+		region.getVertices().add(finalState);
+
+		tester.validate(finalState).assertError(VERTEX_REACHABLE_CODE);
+	}
+
+}

+ 24 - 24
test-plugins/org.yakindu.sct.test.models/testmodels/validation/RegionCantBeEnteredUsingShallowHistory.sct

@@ -70,7 +70,7 @@
             <layoutConstraint xsi:type="notation:Bounds" xmi:id="_uNntd2PkEeORN_IpOQXaDw"/>
           </children>
           <styles xsi:type="notation:ShapeStyle" xmi:id="_uNntc2PkEeORN_IpOQXaDw" fontName="Verdana" lineColor="4210752"/>
-          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_uNoUg2PkEeORN_IpOQXaDw" x="97" y="5" width="15" height="15"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_uNoUg2PkEeORN_IpOQXaDw" x="97" y="13" width="15" height="15"/>
         </children>
         <children xmi:id="_uNoUhmPkEeORN_IpOQXaDw" type="State" element="_uNoUhGPkEeORN_IpOQXaDw">
           <children xsi:type="notation:DecorationNode" xmi:id="_uNo7kGPkEeORN_IpOQXaDw" type="StateName">
@@ -105,7 +105,7 @@
                   <styles xsi:type="notation:BooleanValueStyle" xmi:id="_z5UE8WPkEeORN_IpOQXaDw" name="isHorizontal" booleanValue="true"/>
                   <layoutConstraint xsi:type="notation:Bounds" xmi:id="_z5SPw2PkEeORN_IpOQXaDw" x="64" y="11"/>
                 </children>
-                <children xsi:type="notation:Shape" xmi:id="_8lBQ0GPkEeORN_IpOQXaDw" type="Note" fontName="Verdana" description="but we need an initial entry here ..." fillColor="13369343" transparency="0" lineColor="6737151" lineWidth="1">
+                <children xsi:type="notation:Shape" xmi:id="_8lBQ0GPkEeORN_IpOQXaDw" type="Note" fontName="Verdana" description="but we need an initial entry here" fillColor="13369343" transparency="0" lineColor="6737151" lineWidth="1">
                   <children xsi:type="notation:BasicDecorationNode" xmi:id="_8lB34GPkEeORN_IpOQXaDw" type="DiagramName">
                     <element xsi:nil="true"/>
                   </children>
@@ -115,7 +115,7 @@
                   <styles xsi:type="notation:TextStyle" xmi:id="_8lBQ0WPkEeORN_IpOQXaDw"/>
                   <styles xsi:type="notation:LineTypeStyle" xmi:id="_8lBQ0mPkEeORN_IpOQXaDw"/>
                   <element xsi:nil="true"/>
-                  <layoutConstraint xsi:type="notation:Bounds" xmi:id="_8lBQ02PkEeORN_IpOQXaDw" x="8" y="75" height="27"/>
+                  <layoutConstraint xsi:type="notation:Bounds" xmi:id="_8lBQ02PkEeORN_IpOQXaDw" x="2" y="75" height="27"/>
                 </children>
                 <layoutConstraint xsi:type="notation:Bounds" xmi:id="_x79ndGPkEeORN_IpOQXaDw"/>
               </children>
@@ -126,19 +126,7 @@
           <styles xsi:type="notation:ShapeStyle" xmi:id="_uNoUh2PkEeORN_IpOQXaDw" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
           <styles xsi:type="notation:FontStyle" xmi:id="_uNoUiGPkEeORN_IpOQXaDw"/>
           <styles xsi:type="notation:BooleanValueStyle" xmi:id="_uNpioWPkEeORN_IpOQXaDw" name="isHorizontal" booleanValue="true"/>
-          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_uNpiomPkEeORN_IpOQXaDw" x="40" y="84" width="225" height="187"/>
-        </children>
-        <children xsi:type="notation:Shape" xmi:id="_3c78sGPkEeORN_IpOQXaDw" type="Note" fontName="Verdana" description="Tthis kind of entry is allowed .." fillColor="13369343" transparency="0" lineColor="6737151" lineWidth="1">
-          <children xsi:type="notation:BasicDecorationNode" xmi:id="_3c8jwGPkEeORN_IpOQXaDw" type="DiagramName">
-            <element xsi:nil="true"/>
-          </children>
-          <children xsi:type="notation:BasicDecorationNode" xmi:id="_3c9K0GPkEeORN_IpOQXaDw" type="Description">
-            <element xsi:nil="true"/>
-          </children>
-          <styles xsi:type="notation:TextStyle" xmi:id="_3c78sWPkEeORN_IpOQXaDw"/>
-          <styles xsi:type="notation:LineTypeStyle" xmi:id="_3c78smPkEeORN_IpOQXaDw"/>
-          <element xsi:nil="true"/>
-          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_3c78s2PkEeORN_IpOQXaDw" x="121" width="158" height="26"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_uNpiomPkEeORN_IpOQXaDw" x="40" y="92" width="285" height="187"/>
         </children>
         <children xmi:id="_tDfD4CeoEeSj8ILaZrcCtg" type="State" element="_tDdOsCeoEeSj8ILaZrcCtg">
           <children xsi:type="notation:DecorationNode" xmi:id="_tDfq8CeoEeSj8ILaZrcCtg" type="StateName">
@@ -210,7 +198,7 @@
           <styles xsi:type="notation:ShapeStyle" xmi:id="_tDfD4SeoEeSj8ILaZrcCtg" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
           <styles xsi:type="notation:FontStyle" xmi:id="_tDfD4ieoEeSj8ILaZrcCtg"/>
           <styles xsi:type="notation:BooleanValueStyle" xmi:id="_tDg5ECeoEeSj8ILaZrcCtg" name="isHorizontal" booleanValue="true"/>
-          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_tDfD4yeoEeSj8ILaZrcCtg" x="390" y="92" width="200" height="183"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_tDfD4yeoEeSj8ILaZrcCtg" x="390" y="108" width="200" height="183"/>
         </children>
         <children xmi:id="_WUiKQCepEeSj8ILaZrcCtg" type="State" element="_WUjYYCepEeSj8ILaZrcCtg">
           <children xsi:type="notation:DecorationNode" xmi:id="_WUiKQSepEeSj8ILaZrcCtg" type="StateName">
@@ -282,7 +270,7 @@
           <styles xsi:type="notation:ShapeStyle" xmi:id="_WUixUiepEeSj8ILaZrcCtg" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
           <styles xsi:type="notation:FontStyle" xmi:id="_WUixUyepEeSj8ILaZrcCtg"/>
           <styles xsi:type="notation:BooleanValueStyle" xmi:id="_WUixVCepEeSj8ILaZrcCtg" name="isHorizontal" booleanValue="true"/>
-          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_WUixVSepEeSj8ILaZrcCtg" x="390" y="325" width="200" height="183"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_WUixVSepEeSj8ILaZrcCtg" x="390" y="341" width="200" height="183"/>
         </children>
         <children xmi:id="_30i9QSepEeSj8ILaZrcCtg" type="State" element="_30kLYCepEeSj8ILaZrcCtg">
           <children xsi:type="notation:DecorationNode" xmi:id="_30i9QiepEeSj8ILaZrcCtg" type="StateName">
@@ -355,7 +343,7 @@
                   <styles xsi:type="notation:ShapeStyle" xmi:id="_30i9XyepEeSj8ILaZrcCtg" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
                   <styles xsi:type="notation:FontStyle" xmi:id="_30i9YCepEeSj8ILaZrcCtg"/>
                   <styles xsi:type="notation:BooleanValueStyle" xmi:id="_30i9YSepEeSj8ILaZrcCtg" name="isHorizontal" booleanValue="true"/>
-                  <layoutConstraint xsi:type="notation:Bounds" xmi:id="_30i9YiepEeSj8ILaZrcCtg" x="13" y="56" width="94" height="135"/>
+                  <layoutConstraint xsi:type="notation:Bounds" xmi:id="_30i9YiepEeSj8ILaZrcCtg" x="13" y="56" width="89" height="140"/>
                 </children>
                 <children xmi:id="_30i9YyepEeSj8ILaZrcCtg" type="State" element="_30kLZiepEeSj8ILaZrcCtg">
                   <children xsi:type="notation:DecorationNode" xmi:id="_30i9ZCepEeSj8ILaZrcCtg" type="StateName">
@@ -382,12 +370,24 @@
           <styles xsi:type="notation:ShapeStyle" xmi:id="_30i9ciepEeSj8ILaZrcCtg" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
           <styles xsi:type="notation:FontStyle" xmi:id="_30i9cyepEeSj8ILaZrcCtg"/>
           <styles xsi:type="notation:BooleanValueStyle" xmi:id="_30i9dCepEeSj8ILaZrcCtg" name="isHorizontal" booleanValue="true"/>
-          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_30i9dSepEeSj8ILaZrcCtg" x="52" y="317" width="266" height="271"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_30i9dSepEeSj8ILaZrcCtg" x="52" y="333" width="262" height="287"/>
+        </children>
+        <children xsi:type="notation:Shape" xmi:id="_3c78sGPkEeORN_IpOQXaDw" type="Note" fontName="Verdana" description="Tthis kind of entry is allowed" fillColor="13369343" transparency="0" lineColor="6737151" lineWidth="1">
+          <children xsi:type="notation:BasicDecorationNode" xmi:id="_3c8jwGPkEeORN_IpOQXaDw" type="DiagramName">
+            <element xsi:nil="true"/>
+          </children>
+          <children xsi:type="notation:BasicDecorationNode" xmi:id="_3c9K0GPkEeORN_IpOQXaDw" type="Description">
+            <element xsi:nil="true"/>
+          </children>
+          <styles xsi:type="notation:TextStyle" xmi:id="_3c78sWPkEeORN_IpOQXaDw"/>
+          <styles xsi:type="notation:LineTypeStyle" xmi:id="_3c78smPkEeORN_IpOQXaDw"/>
+          <element xsi:nil="true"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_3c78s2PkEeORN_IpOQXaDw" x="136" width="196" height="68"/>
         </children>
         <layoutConstraint xsi:type="notation:Bounds" xmi:id="_uNnGZGPkEeORN_IpOQXaDw"/>
       </children>
       <styles xsi:type="notation:ShapeStyle" xmi:id="_uNmfVGPkEeORN_IpOQXaDw" fontName="Verdana" fillColor="15790320" lineColor="12632256"/>
-      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_uNntcGPkEeORN_IpOQXaDw" x="228" y="10" width="612" height="636"/>
+      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_uNntcGPkEeORN_IpOQXaDw" x="228" y="10" width="612" height="716"/>
     </children>
     <children xsi:type="notation:Shape" xmi:id="_uNqJtmPkEeORN_IpOQXaDw" type="StatechartText" fontName="Verdana" lineColor="4210752">
       <children xsi:type="notation:DecorationNode" xmi:id="_uNqwwGPkEeORN_IpOQXaDw" type="StatechartName">
@@ -408,7 +408,7 @@
       <styles xsi:type="notation:ConnectorStyle" xmi:id="_0ielASeoEeSj8ILaZrcCtg" lineColor="4210752"/>
       <styles xsi:type="notation:FontStyle" xmi:id="_0ifMECeoEeSj8ILaZrcCtg" fontName="Verdana"/>
       <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_0ielAieoEeSj8ILaZrcCtg" points="[6, 1, -63, 1]$[70, -21, 1, -21]"/>
-      <sourceAnchor xsi:type="notation:IdentityAnchor" xmi:id="_0ihoUCeoEeSj8ILaZrcCtg" id="(0.9733333333333334,0.13903743315508021)"/>
+      <sourceAnchor xsi:type="notation:IdentityAnchor" xmi:id="_0ihoUCeoEeSj8ILaZrcCtg" id="(0.7647619047619049,0.13903743315508021)"/>
       <targetAnchor xsi:type="notation:IdentityAnchor" xmi:id="_0ihoUSeoEeSj8ILaZrcCtg" id="(0.045,0.12021857923497267)"/>
     </edges>
     <edges xmi:id="_A6rQwCepEeSj8ILaZrcCtg" type="Transition" element="_A6pbkCepEeSj8ILaZrcCtg" source="_xuKDQCeoEeSj8ILaZrcCtg" target="__peHkCeoEeSj8ILaZrcCtg">
@@ -481,7 +481,7 @@
       <styles xsi:type="notation:ConnectorStyle" xmi:id="_30kydCepEeSj8ILaZrcCtg" lineColor="4210752"/>
       <styles xsi:type="notation:FontStyle" xmi:id="_30kydSepEeSj8ILaZrcCtg" fontName="Verdana"/>
       <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_30kydiepEeSj8ILaZrcCtg" points="[11, 3, -72, -8]$[80, -13, -3, -24]"/>
-      <sourceAnchor xsi:type="notation:IdentityAnchor" xmi:id="_30kydyepEeSj8ILaZrcCtg" id="(0.8225806451612904,0.2830188679245283)"/>
+      <sourceAnchor xsi:type="notation:IdentityAnchor" xmi:id="_30kydyepEeSj8ILaZrcCtg" id="(0.8715437788018434,0.27253668763102723)"/>
     </edges>
     <edges xmi:id="_30kygSepEeSj8ILaZrcCtg" type="Transition" element="_30kLYyepEeSj8ILaZrcCtg" source="_30i9TiepEeSj8ILaZrcCtg" target="_Y-3NECeqEeSj8ILaZrcCtg">
       <children xsi:type="notation:DecorationNode" xmi:id="_30kygiepEeSj8ILaZrcCtg" type="TransitionExpression">
@@ -501,7 +501,7 @@
       <styles xsi:type="notation:FontStyle" xmi:id="_H9Mb0yeqEeSj8ILaZrcCtg" fontName="Verdana"/>
       <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_H9Mb0ieqEeSj8ILaZrcCtg" points="[-8, -2, 84, 1]$[-87, -26, 5, -23]"/>
       <sourceAnchor xsi:type="notation:IdentityAnchor" xmi:id="_H9ORACeqEeSj8ILaZrcCtg" id="(0.045,0.10382513661202186)"/>
-      <targetAnchor xsi:type="notation:IdentityAnchor" xmi:id="_H9ORASeqEeSj8ILaZrcCtg" id="(0.92,0.13114754098360656)"/>
+      <targetAnchor xsi:type="notation:IdentityAnchor" xmi:id="_H9ORASeqEeSj8ILaZrcCtg" id="(0.93431906614786,0.12825458052073288)"/>
     </edges>
     <edges xmi:id="_k9-qcCeqEeSj8ILaZrcCtg" type="Transition" element="_k99cUCeqEeSj8ILaZrcCtg" source="_uNntcmPkEeORN_IpOQXaDw" target="_z5SPwGPkEeORN_IpOQXaDw">
       <children xsi:type="notation:DecorationNode" xmi:id="_k9-qdCeqEeSj8ILaZrcCtg" type="TransitionExpression">

test-plugins/org.yakindu.sct.test.models/testmodels/validation/TopLevelEntryIsDefaultEntryError.sct → test-plugins/org.yakindu.sct.model.sgraph.test/testmodels/entry/TopLevelEntryIsDefaultEntryError.sct


test-plugins/org.yakindu.sct.test.models/testmodels/validation/TopLevelEntryIsDefaultEntryWarn.sct → test-plugins/org.yakindu.sct.model.sgraph.test/testmodels/entry/TopLevelEntryIsDefaultEntryWarn.sct


test-plugins/org.yakindu.sct.test.models/testmodels/validation/TopLevelRegionNoEntryPoint.sct → test-plugins/org.yakindu.sct.model.sgraph.test/testmodels/entry/TopLevelRegionNoEntryPoint.sct


+ 164 - 0
test-plugins/org.yakindu.sct.model.sgraph.test/testmodels/entry/ValidTransitionToInnerChoice.sct

@@ -0,0 +1,164 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:sgraph="http://www.yakindu.org/sct/sgraph/2.0.0">
+  <sgraph:Statechart xmi:id="_Yd0G4A2-EeS5MPIeAGHZqw" specification="internal:&#xA;event a&#xA;var x : integer" name="ValidTransitionToInnerChoice">
+    <regions xmi:id="_Yd18Eg2-EeS5MPIeAGHZqw" name="main region">
+      <vertices xsi:type="sgraph:Entry" xmi:id="_Yd9Q0Q2-EeS5MPIeAGHZqw">
+        <outgoingTransitions xmi:id="_YeAUIA2-EeS5MPIeAGHZqw" target="_Yd935w2-EeS5MPIeAGHZqw"/>
+      </vertices>
+      <vertices xsi:type="sgraph:State" xmi:id="_Yd935w2-EeS5MPIeAGHZqw" name="start" incomingTransitions="_YeAUIA2-EeS5MPIeAGHZqw">
+        <outgoingTransitions xmi:id="_r0H0QA2-EeS5MPIeAGHZqw" specification="a" target="_jG2iIA2-EeS5MPIeAGHZqw"/>
+      </vertices>
+      <vertices xsi:type="sgraph:State" xmi:id="_atMIgA2-EeS5MPIeAGHZqw" specification="entry / x=2" name="compound">
+        <regions xmi:id="_d998wA2-EeS5MPIeAGHZqw" name="r1">
+          <vertices xsi:type="sgraph:Choice" xmi:id="_jG2iIA2-EeS5MPIeAGHZqw" incomingTransitions="_r0H0QA2-EeS5MPIeAGHZqw">
+            <outgoingTransitions xmi:id="_vLKokA2-EeS5MPIeAGHZqw" specification="[x==2]" target="_tRvBwA2-EeS5MPIeAGHZqw"/>
+            <outgoingTransitions xmi:id="__vCqkA2-EeS5MPIeAGHZqw" specification="default" target="__OQRsA2-EeS5MPIeAGHZqw"/>
+          </vertices>
+          <vertices xsi:type="sgraph:State" xmi:id="_tRvBwA2-EeS5MPIeAGHZqw" specification="entry / x+=3" name="Inside" incomingTransitions="_vLKokA2-EeS5MPIeAGHZqw"/>
+          <vertices xsi:type="sgraph:FinalState" xmi:id="__OQRsA2-EeS5MPIeAGHZqw" incomingTransitions="__vCqkA2-EeS5MPIeAGHZqw"/>
+        </regions>
+      </vertices>
+    </regions>
+  </sgraph:Statechart>
+  <notation:Diagram xmi:id="_Yd18EA2-EeS5MPIeAGHZqw" type="org.yakindu.sct.ui.editor.editor.StatechartDiagramEditor" element="_Yd0G4A2-EeS5MPIeAGHZqw" measurementUnit="Pixel">
+    <children xmi:id="_Yd5mcA2-EeS5MPIeAGHZqw" type="Region" element="_Yd18Eg2-EeS5MPIeAGHZqw">
+      <children xsi:type="notation:DecorationNode" xmi:id="_Yd8CsA2-EeS5MPIeAGHZqw" type="RegionName">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_Yd8CsQ2-EeS5MPIeAGHZqw"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_Yd8Csg2-EeS5MPIeAGHZqw"/>
+      </children>
+      <children xsi:type="notation:Shape" xmi:id="_Yd8Csw2-EeS5MPIeAGHZqw" type="RegionCompartment" fontName="Verdana" lineColor="4210752">
+        <children xmi:id="_Yd9Q0g2-EeS5MPIeAGHZqw" type="Entry" element="_Yd9Q0Q2-EeS5MPIeAGHZqw">
+          <children xmi:id="_Yd934A2-EeS5MPIeAGHZqw" type="BorderItemLabelContainer">
+            <children xsi:type="notation:DecorationNode" xmi:id="_Yd934w2-EeS5MPIeAGHZqw" type="BorderItemLabel">
+              <styles xsi:type="notation:ShapeStyle" xmi:id="_Yd935A2-EeS5MPIeAGHZqw"/>
+              <layoutConstraint xsi:type="notation:Location" xmi:id="_Yd935Q2-EeS5MPIeAGHZqw"/>
+            </children>
+            <styles xsi:type="notation:ShapeStyle" xmi:id="_Yd934Q2-EeS5MPIeAGHZqw" fontName="Verdana" lineColor="4210752"/>
+            <layoutConstraint xsi:type="notation:Bounds" xmi:id="_Yd934g2-EeS5MPIeAGHZqw"/>
+          </children>
+          <styles xsi:type="notation:ShapeStyle" xmi:id="_Yd9Q0w2-EeS5MPIeAGHZqw" fontName="Verdana" lineColor="4210752"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_Yd935g2-EeS5MPIeAGHZqw" x="70" y="36" width="15" height="15"/>
+        </children>
+        <children xmi:id="_Yd-e8Q2-EeS5MPIeAGHZqw" type="State" element="_Yd935w2-EeS5MPIeAGHZqw">
+          <children xsi:type="notation:DecorationNode" xmi:id="_Yd_GAA2-EeS5MPIeAGHZqw" type="StateName">
+            <styles xsi:type="notation:ShapeStyle" xmi:id="_Yd_GAQ2-EeS5MPIeAGHZqw"/>
+            <layoutConstraint xsi:type="notation:Location" xmi:id="_Yd_GAg2-EeS5MPIeAGHZqw"/>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_Yd_GAw2-EeS5MPIeAGHZqw" type="StateTextCompartment">
+            <children xsi:type="notation:Shape" xmi:id="_Yd_tEA2-EeS5MPIeAGHZqw" type="StateTextCompartmentExpression" fontName="Verdana" lineColor="4210752">
+              <layoutConstraint xsi:type="notation:Bounds" xmi:id="_Yd_tEQ2-EeS5MPIeAGHZqw"/>
+            </children>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_Yd_tEg2-EeS5MPIeAGHZqw" type="StateFigureCompartment"/>
+          <styles xsi:type="notation:ShapeStyle" xmi:id="_Yd-e8g2-EeS5MPIeAGHZqw" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
+          <styles xsi:type="notation:FontStyle" xmi:id="_Yd-e8w2-EeS5MPIeAGHZqw"/>
+          <styles xsi:type="notation:BooleanValueStyle" xmi:id="_Yd_tEw2-EeS5MPIeAGHZqw" name="isHorizontal" booleanValue="true"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_Yd_tFA2-EeS5MPIeAGHZqw" x="55" y="116" width="51" height="53"/>
+        </children>
+        <children xmi:id="_atPy4A2-EeS5MPIeAGHZqw" type="State" element="_atMIgA2-EeS5MPIeAGHZqw">
+          <children xsi:type="notation:DecorationNode" xmi:id="_atRBAA2-EeS5MPIeAGHZqw" type="StateName">
+            <styles xsi:type="notation:ShapeStyle" xmi:id="_atRBAQ2-EeS5MPIeAGHZqw"/>
+            <layoutConstraint xsi:type="notation:Location" xmi:id="_atRBAg2-EeS5MPIeAGHZqw"/>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_atRBAw2-EeS5MPIeAGHZqw" type="StateTextCompartment">
+            <children xsi:type="notation:Shape" xmi:id="_atRBBA2-EeS5MPIeAGHZqw" type="StateTextCompartmentExpression" fontName="Verdana" lineColor="4210752">
+              <layoutConstraint xsi:type="notation:Bounds" xmi:id="_atRBBQ2-EeS5MPIeAGHZqw"/>
+            </children>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_atRoEA2-EeS5MPIeAGHZqw" type="StateFigureCompartment">
+            <children xmi:id="_d-AZAA2-EeS5MPIeAGHZqw" type="Region" element="_d998wA2-EeS5MPIeAGHZqw">
+              <children xsi:type="notation:DecorationNode" xmi:id="_d-AZAw2-EeS5MPIeAGHZqw" type="RegionName">
+                <styles xsi:type="notation:ShapeStyle" xmi:id="_d-AZBA2-EeS5MPIeAGHZqw"/>
+                <layoutConstraint xsi:type="notation:Location" xmi:id="_d-BAEA2-EeS5MPIeAGHZqw"/>
+              </children>
+              <children xsi:type="notation:Shape" xmi:id="_d-BAEQ2-EeS5MPIeAGHZqw" type="RegionCompartment" fontName="Verdana" lineColor="4210752">
+                <children xsi:type="notation:Shape" xmi:id="_jG3JMA2-EeS5MPIeAGHZqw" type="Choice" element="_jG2iIA2-EeS5MPIeAGHZqw" fontName="Verdana" lineColor="4210752">
+                  <layoutConstraint xsi:type="notation:Bounds" xmi:id="_jG3JMQ2-EeS5MPIeAGHZqw" x="15" y="5"/>
+                </children>
+                <children xmi:id="_tRw28A2-EeS5MPIeAGHZqw" type="State" element="_tRvBwA2-EeS5MPIeAGHZqw">
+                  <children xsi:type="notation:DecorationNode" xmi:id="_tRyFEA2-EeS5MPIeAGHZqw" type="StateName">
+                    <styles xsi:type="notation:ShapeStyle" xmi:id="_tRyFEQ2-EeS5MPIeAGHZqw"/>
+                    <layoutConstraint xsi:type="notation:Location" xmi:id="_tRyFEg2-EeS5MPIeAGHZqw"/>
+                  </children>
+                  <children xsi:type="notation:Compartment" xmi:id="_tRysIA2-EeS5MPIeAGHZqw" type="StateTextCompartment">
+                    <children xsi:type="notation:Shape" xmi:id="_tRysIQ2-EeS5MPIeAGHZqw" type="StateTextCompartmentExpression" fontName="Verdana" lineColor="4210752">
+                      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_tRysIg2-EeS5MPIeAGHZqw"/>
+                    </children>
+                  </children>
+                  <children xsi:type="notation:Compartment" xmi:id="_tRzTMA2-EeS5MPIeAGHZqw" type="StateFigureCompartment"/>
+                  <styles xsi:type="notation:ShapeStyle" xmi:id="_tRxeAA2-EeS5MPIeAGHZqw" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
+                  <styles xsi:type="notation:FontStyle" xmi:id="_tRxeAQ2-EeS5MPIeAGHZqw"/>
+                  <styles xsi:type="notation:BooleanValueStyle" xmi:id="_tRzTMQ2-EeS5MPIeAGHZqw" name="isHorizontal" booleanValue="true"/>
+                  <layoutConstraint xsi:type="notation:Bounds" xmi:id="_tRxeAg2-EeS5MPIeAGHZqw" x="143" y="-11"/>
+                </children>
+                <children xsi:type="notation:Shape" xmi:id="__OSG4A2-EeS5MPIeAGHZqw" type="FinalState" element="__OQRsA2-EeS5MPIeAGHZqw" fontName="Verdana" lineColor="4210752">
+                  <layoutConstraint xsi:type="notation:Bounds" xmi:id="__OSG4Q2-EeS5MPIeAGHZqw" x="132" y="70"/>
+                </children>
+                <layoutConstraint xsi:type="notation:Bounds" xmi:id="_d-BAEg2-EeS5MPIeAGHZqw"/>
+              </children>
+              <styles xsi:type="notation:ShapeStyle" xmi:id="_d-AZAQ2-EeS5MPIeAGHZqw" fontName="Verdana" fillColor="15790320" lineColor="12632256"/>
+              <layoutConstraint xsi:type="notation:Bounds" xmi:id="_d-AZAg2-EeS5MPIeAGHZqw"/>
+            </children>
+          </children>
+          <styles xsi:type="notation:ShapeStyle" xmi:id="_atPy4Q2-EeS5MPIeAGHZqw" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
+          <styles xsi:type="notation:FontStyle" xmi:id="_atPy4g2-EeS5MPIeAGHZqw"/>
+          <styles xsi:type="notation:BooleanValueStyle" xmi:id="_atRoEQ2-EeS5MPIeAGHZqw" name="isHorizontal" booleanValue="true"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_atPy4w2-EeS5MPIeAGHZqw" x="199" y="56" width="293" height="191"/>
+        </children>
+        <layoutConstraint xsi:type="notation:Bounds" xmi:id="_Yd8CtA2-EeS5MPIeAGHZqw"/>
+      </children>
+      <styles xsi:type="notation:ShapeStyle" xmi:id="_Yd5mcQ2-EeS5MPIeAGHZqw" fontName="Verdana" fillColor="15790320" lineColor="12632256"/>
+      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_Yd9Q0A2-EeS5MPIeAGHZqw" x="220" y="10" width="528" height="400"/>
+    </children>
+    <children xsi:type="notation:Shape" xmi:id="_YeCJUA2-EeS5MPIeAGHZqw" type="StatechartText" fontName="Verdana" lineColor="4210752">
+      <children xsi:type="notation:DecorationNode" xmi:id="_YeCJUg2-EeS5MPIeAGHZqw" type="StatechartName">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_YeCJUw2-EeS5MPIeAGHZqw"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_YeCJVA2-EeS5MPIeAGHZqw"/>
+      </children>
+      <children xsi:type="notation:Shape" xmi:id="_YeCJVQ2-EeS5MPIeAGHZqw" type="StatechartTextExpression" fontName="Verdana" lineColor="4210752">
+        <layoutConstraint xsi:type="notation:Bounds" xmi:id="_YeCJVg2-EeS5MPIeAGHZqw"/>
+      </children>
+      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_YeCwYA2-EeS5MPIeAGHZqw" x="10" y="10" width="200" height="400"/>
+    </children>
+    <styles xsi:type="notation:DiagramStyle" xmi:id="_Yd18EQ2-EeS5MPIeAGHZqw"/>
+    <edges xmi:id="_YeA7MA2-EeS5MPIeAGHZqw" type="Transition" element="_YeAUIA2-EeS5MPIeAGHZqw" source="_Yd9Q0g2-EeS5MPIeAGHZqw" target="_Yd-e8Q2-EeS5MPIeAGHZqw">
+      <children xsi:type="notation:DecorationNode" xmi:id="_YeBiQQ2-EeS5MPIeAGHZqw" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_YeBiQg2-EeS5MPIeAGHZqw"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_YeBiQw2-EeS5MPIeAGHZqw" y="10"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_YeA7MQ2-EeS5MPIeAGHZqw" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_YeBiQA2-EeS5MPIeAGHZqw" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_YeA7Mg2-EeS5MPIeAGHZqw" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+    </edges>
+    <edges xmi:id="_r0LeoA2-EeS5MPIeAGHZqw" type="Transition" element="_r0H0QA2-EeS5MPIeAGHZqw" source="_Yd-e8Q2-EeS5MPIeAGHZqw" target="_jG3JMA2-EeS5MPIeAGHZqw">
+      <children xsi:type="notation:DecorationNode" xmi:id="_r0MFsQ2-EeS5MPIeAGHZqw" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_r0MFsg2-EeS5MPIeAGHZqw"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_r0MFsw2-EeS5MPIeAGHZqw" y="10"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_r0LeoQ2-EeS5MPIeAGHZqw" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_r0MFsA2-EeS5MPIeAGHZqw" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_r0Leog2-EeS5MPIeAGHZqw" points="[23, 3, -174, -28]$[194, 29, -3, -2]"/>
+      <sourceAnchor xsi:type="notation:IdentityAnchor" xmi:id="_COIjMA2_EeS5MPIeAGHZqw" id="(0.8235294117647058,0.7358490566037735)"/>
+      <targetAnchor xsi:type="notation:IdentityAnchor" xmi:id="_r0PwEA2-EeS5MPIeAGHZqw" id="(0.2,0.3333333333333333)"/>
+    </edges>
+    <edges xmi:id="_vLL2sA2-EeS5MPIeAGHZqw" type="Transition" element="_vLKokA2-EeS5MPIeAGHZqw" source="_jG3JMA2-EeS5MPIeAGHZqw" target="_tRw28A2-EeS5MPIeAGHZqw">
+      <children xsi:type="notation:DecorationNode" xmi:id="_vLL2tA2-EeS5MPIeAGHZqw" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_vLL2tQ2-EeS5MPIeAGHZqw"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_vLL2tg2-EeS5MPIeAGHZqw" y="10"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_vLL2sQ2-EeS5MPIeAGHZqw" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_vLL2sw2-EeS5MPIeAGHZqw" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_vLL2sg2-EeS5MPIeAGHZqw" points="[8, 2, -140, -29]$[126, 55, -22, 24]"/>
+      <sourceAnchor xsi:type="notation:IdentityAnchor" xmi:id="_3x4mwA2-EeS5MPIeAGHZqw" id="(0.8,0.26666666666666666)"/>
+    </edges>
+    <edges xmi:id="__vDRoA2-EeS5MPIeAGHZqw" type="Transition" element="__vCqkA2-EeS5MPIeAGHZqw" source="_jG3JMA2-EeS5MPIeAGHZqw" target="__OSG4A2-EeS5MPIeAGHZqw">
+      <children xsi:type="notation:DecorationNode" xmi:id="__vD4sQ2-EeS5MPIeAGHZqw" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="__vD4sg2-EeS5MPIeAGHZqw"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="__vD4sw2-EeS5MPIeAGHZqw" x="22" y="-15"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="__vDRoQ2-EeS5MPIeAGHZqw" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="__vD4sA2-EeS5MPIeAGHZqw" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="__vDRog2-EeS5MPIeAGHZqw" points="[0, 8, -117, -57]$[0, 65, -117, 0]$[109, 65, -8, 0]"/>
+    </edges>
+  </notation:Diagram>
+</xmi:XMI>

test-plugins/org.yakindu.sct.test.models/testmodels/validation/NotOrthogonalRegion01.sct → test-plugins/org.yakindu.sct.model.sgraph.test/testmodels/synchronization/NotOrthogonalRegion01.sct


test-plugins/org.yakindu.sct.test.models/testmodels/validation/NotOrthogonalRegion02.sct → test-plugins/org.yakindu.sct.model.sgraph.test/testmodels/synchronization/NotOrthogonalRegion02.sct


test-plugins/org.yakindu.sct.test.models/testmodels/validation/NotOrthogonalRegion03.sct → test-plugins/org.yakindu.sct.model.sgraph.test/testmodels/synchronization/NotOrthogonalRegion03.sct


test-plugins/org.yakindu.sct.test.models/testmodels/validation/OrthogonalRegion01.sct → test-plugins/org.yakindu.sct.model.sgraph.test/testmodels/synchronization/OrthogonalRegion01.sct


+ 5 - 4
test-plugins/org.yakindu.sct.test.models/testmodels/validation/SyncLocation_Issue58.sct

@@ -175,7 +175,7 @@
                   <styles xsi:type="notation:ShapeStyle" xmi:id="_sQSPgKWhEeKBrrCTA2_OoQ" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
                   <styles xsi:type="notation:FontStyle" xmi:id="_sQSPgaWhEeKBrrCTA2_OoQ"/>
                   <styles xsi:type="notation:BooleanValueStyle" xmi:id="_sQVS0KWhEeKBrrCTA2_OoQ" name="isHorizontal" booleanValue="true"/>
-                  <layoutConstraint xsi:type="notation:Bounds" xmi:id="_sQSPgqWhEeKBrrCTA2_OoQ" x="8" y="23" width="263" height="201"/>
+                  <layoutConstraint xsi:type="notation:Bounds" xmi:id="_sQSPgqWhEeKBrrCTA2_OoQ" x="4" y="58" width="263" height="221"/>
                 </children>
                 <layoutConstraint xsi:type="notation:Bounds" xmi:id="_qyW48aWhEeKBrrCTA2_OoQ"/>
               </children>
@@ -186,10 +186,10 @@
           <styles xsi:type="notation:ShapeStyle" xmi:id="_o8EFsaWhEeKBrrCTA2_OoQ" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
           <styles xsi:type="notation:FontStyle" xmi:id="_o8EFsqWhEeKBrrCTA2_OoQ"/>
           <styles xsi:type="notation:BooleanValueStyle" xmi:id="_o8Gh86WhEeKBrrCTA2_OoQ" name="isHorizontal" booleanValue="true"/>
-          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_o8EFs6WhEeKBrrCTA2_OoQ" x="29" y="172" width="423" height="301"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_o8EFs6WhEeKBrrCTA2_OoQ" x="29" y="172" width="423" height="371"/>
         </children>
         <children xsi:type="notation:Shape" xmi:id="_I2XCoKWjEeKBrrCTA2_OoQ" type="FinalState" element="_I2WbkKWjEeKBrrCTA2_OoQ" fontName="Verdana" lineColor="4210752">
-          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_I2XCoaWjEeKBrrCTA2_OoQ" x="266" y="553" width="15" height="15"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_I2XCoaWjEeKBrrCTA2_OoQ" x="209" y="596" width="15" height="15"/>
         </children>
         <children xmi:id="_pTH-AKWlEeKBrrCTA2_OoQ" type="State" element="_pTDskKWlEeKBrrCTA2_OoQ">
           <children xsi:type="notation:DecorationNode" xmi:id="_pTIlEKWlEeKBrrCTA2_OoQ" type="StateName">
@@ -213,7 +213,7 @@
         <layoutConstraint xsi:type="notation:Bounds" xmi:id="_cDSu5IcVEeK5XMQGITKBlg"/>
       </children>
       <styles xsi:type="notation:ShapeStyle" xmi:id="_cCbzQYcVEeK5XMQGITKBlg" fontName="Verdana" fillColor="15790320" lineColor="12632256"/>
-      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_cDTV8IcVEeK5XMQGITKBlg" x="215" y="10" width="556" height="646"/>
+      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_cDTV8IcVEeK5XMQGITKBlg" x="215" y="10" width="556" height="650"/>
     </children>
     <children xsi:type="notation:Shape" xmi:id="_cDXnYIcVEeK5XMQGITKBlg" type="StatechartText" fontName="Verdana" lineColor="4210752">
       <children xsi:type="notation:DecorationNode" xmi:id="_cDXnYocVEeK5XMQGITKBlg" type="StatechartName">
@@ -306,6 +306,7 @@
       <styles xsi:type="notation:ConnectorStyle" xmi:id="_M20nYaWjEeKBrrCTA2_OoQ" lineColor="4210752"/>
       <styles xsi:type="notation:FontStyle" xmi:id="_M211gKWjEeKBrrCTA2_OoQ" fontName="Verdana"/>
       <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_M20nYqWjEeKBrrCTA2_OoQ" points="[1, 4, 2, -69]$[3, 67, 4, -6]"/>
+      <targetAnchor xsi:type="notation:IdentityAnchor" xmi:id="_WnjHQElWEei7-7HHXDZ0Bw" id="(0.5,0.5)"/>
     </edges>
     <edges xmi:id="_aSEK4KgcEeKmQrSVAGlxRw" type="Transition" element="_aR_5cKgcEeKmQrSVAGlxRw" source="_zGIF8KWhEeKBrrCTA2_OoQ" target="_rwgjQKWhEeKBrrCTA2_OoQ">
       <children xsi:type="notation:DecorationNode" xmi:id="_aSFZAKgcEeKmQrSVAGlxRw" type="TransitionExpression">

test-plugins/org.yakindu.sct.test.models/testmodels/validation/SyncOutgoingTransition.sct → test-plugins/org.yakindu.sct.model.sgraph.test/testmodels/synchronization/SyncOutgoingTransition.sct


test-plugins/org.yakindu.sct.test.models/testmodels/validation/SynchronizationTransitionCount.sct → test-plugins/org.yakindu.sct.model.sgraph.test/testmodels/synchronization/SynchronizationTransitionCount.sct


test-plugins/org.yakindu.sct.test.models/testmodels/validation/ValidEmptyTransitionFromSync.sct → test-plugins/org.yakindu.sct.model.sgraph.test/testmodels/synchronization/ValidEmptyTransitionFromSync.sct


test-plugins/org.yakindu.sct.test.models/testmodels/validation/EntryTransitionToParentState.sct → test-plugins/org.yakindu.sct.model.sgraph.test/testmodels/transition/EntryTransitionToParentState.sct


+ 143 - 0
test-plugins/org.yakindu.sct.model.sgraph.test/testmodels/transition/OrthogonalTransition01.sct

@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:sgraph="http://www.yakindu.org/sct/sgraph/2.0.0">
+  <sgraph:Statechart xmi:id="_Lx-1QPf6EeWEP4pglzmtIA" specification="interface:&#xA;// Define events and&#xA;// and variables here" name="OrthogonalTransition">
+    <regions xmi:id="_LyCfoff6EeWEP4pglzmtIA" name="r1">
+      <vertices xsi:type="sgraph:Entry" xmi:id="_LyGxEff6EeWEP4pglzmtIA">
+        <outgoingTransitions xmi:id="_LyJNU_f6EeWEP4pglzmtIA" target="_LyH_Mvf6EeWEP4pglzmtIA"/>
+      </vertices>
+      <vertices xsi:type="sgraph:State" xmi:id="_LyH_Mvf6EeWEP4pglzmtIA" name="A" incomingTransitions="_LyJNU_f6EeWEP4pglzmtIA">
+        <outgoingTransitions xmi:id="_cSJb8Pf6EeWEP4pglzmtIA" specification="always" target="_Z6vfs_f6EeWEP4pglzmtIA"/>
+      </vertices>
+    </regions>
+    <regions xmi:id="_Z6vfsPf6EeWEP4pglzmtIA" name="r2">
+      <vertices xsi:type="sgraph:Entry" xmi:id="_Z6vfsff6EeWEP4pglzmtIA">
+        <outgoingTransitions xmi:id="_Z6vfsvf6EeWEP4pglzmtIA" target="_Z6vfs_f6EeWEP4pglzmtIA"/>
+      </vertices>
+      <vertices xsi:type="sgraph:State" xmi:id="_Z6vfs_f6EeWEP4pglzmtIA" name="B" incomingTransitions="_Z6vfsvf6EeWEP4pglzmtIA _cSJb8Pf6EeWEP4pglzmtIA"/>
+    </regions>
+  </sgraph:Statechart>
+  <notation:Diagram xmi:id="_LyB4kPf6EeWEP4pglzmtIA" type="org.yakindu.sct.ui.editor.editor.StatechartDiagramEditor" element="_Lx-1QPf6EeWEP4pglzmtIA" measurementUnit="Pixel">
+    <children xmi:id="_LyEU0Pf6EeWEP4pglzmtIA" type="Region" element="_LyCfoff6EeWEP4pglzmtIA">
+      <children xsi:type="notation:DecorationNode" xmi:id="_LyGKAPf6EeWEP4pglzmtIA" type="RegionName">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_LyGKAff6EeWEP4pglzmtIA"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_LyGKAvf6EeWEP4pglzmtIA"/>
+      </children>
+      <children xsi:type="notation:Shape" xmi:id="_LyGKA_f6EeWEP4pglzmtIA" type="RegionCompartment" fontName="Verdana" lineColor="4210752">
+        <children xmi:id="_LyHYIPf6EeWEP4pglzmtIA" type="Entry" element="_LyGxEff6EeWEP4pglzmtIA">
+          <children xmi:id="_LyHYJPf6EeWEP4pglzmtIA" type="BorderItemLabelContainer">
+            <children xsi:type="notation:DecorationNode" xmi:id="_LyHYJ_f6EeWEP4pglzmtIA" type="BorderItemLabel">
+              <styles xsi:type="notation:ShapeStyle" xmi:id="_LyHYKPf6EeWEP4pglzmtIA"/>
+              <layoutConstraint xsi:type="notation:Location" xmi:id="_LyH_MPf6EeWEP4pglzmtIA"/>
+            </children>
+            <styles xsi:type="notation:ShapeStyle" xmi:id="_LyHYJff6EeWEP4pglzmtIA" fontName="Verdana" lineColor="4210752"/>
+            <layoutConstraint xsi:type="notation:Bounds" xmi:id="_LyHYJvf6EeWEP4pglzmtIA"/>
+          </children>
+          <styles xsi:type="notation:ShapeStyle" xmi:id="_LyHYIff6EeWEP4pglzmtIA" fontName="Verdana" fillColor="0" lineColor="16777215"/>
+          <styles xsi:type="notation:NamedStyle" xmi:id="_LyHYIvf6EeWEP4pglzmtIA" name="allowColors"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_LyH_Mff6EeWEP4pglzmtIA" x="23" y="25"/>
+        </children>
+        <children xmi:id="_LyH_Nff6EeWEP4pglzmtIA" type="State" element="_LyH_Mvf6EeWEP4pglzmtIA">
+          <children xsi:type="notation:DecorationNode" xmi:id="_LyImQPf6EeWEP4pglzmtIA" type="StateName">
+            <styles xsi:type="notation:ShapeStyle" xmi:id="_LyImQff6EeWEP4pglzmtIA"/>
+            <layoutConstraint xsi:type="notation:Location" xmi:id="_LyImQvf6EeWEP4pglzmtIA"/>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_LyImQ_f6EeWEP4pglzmtIA" type="StateTextCompartment">
+            <children xsi:type="notation:Shape" xmi:id="_LyImRPf6EeWEP4pglzmtIA" type="StateTextCompartmentExpression" fontName="Verdana" lineColor="4210752">
+              <layoutConstraint xsi:type="notation:Bounds" xmi:id="_LyImRff6EeWEP4pglzmtIA"/>
+            </children>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_LyJNUPf6EeWEP4pglzmtIA" type="StateFigureCompartment"/>
+          <styles xsi:type="notation:ShapeStyle" xmi:id="_LyH_Nvf6EeWEP4pglzmtIA" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
+          <styles xsi:type="notation:FontStyle" xmi:id="_LyH_N_f6EeWEP4pglzmtIA"/>
+          <styles xsi:type="notation:BooleanValueStyle" xmi:id="_LyJNUff6EeWEP4pglzmtIA" name="isHorizontal" booleanValue="true"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_LyJNUvf6EeWEP4pglzmtIA" x="13" y="125" width="40" height="53"/>
+        </children>
+        <layoutConstraint xsi:type="notation:Bounds" xmi:id="_LyGKBPf6EeWEP4pglzmtIA"/>
+      </children>
+      <styles xsi:type="notation:ShapeStyle" xmi:id="_LyEU0ff6EeWEP4pglzmtIA" fontName="Verdana" fillColor="15790320" lineColor="12632256"/>
+      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_LyGxEPf6EeWEP4pglzmtIA" x="220" y="10" width="75" height="217"/>
+    </children>
+    <children xsi:type="notation:Shape" xmi:id="_LyLCg_f6EeWEP4pglzmtIA" type="StatechartText" fontName="Verdana" lineColor="4210752">
+      <children xsi:type="notation:DecorationNode" xmi:id="_LyLpkPf6EeWEP4pglzmtIA" type="StatechartName">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_LyLpkff6EeWEP4pglzmtIA"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_LyLpkvf6EeWEP4pglzmtIA"/>
+      </children>
+      <children xsi:type="notation:Shape" xmi:id="_LyLpk_f6EeWEP4pglzmtIA" type="StatechartTextExpression" fontName="Verdana" lineColor="4210752">
+        <layoutConstraint xsi:type="notation:Bounds" xmi:id="_LyLplPf6EeWEP4pglzmtIA"/>
+      </children>
+      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_LyLplff6EeWEP4pglzmtIA" x="10" y="10" width="200" height="400"/>
+    </children>
+    <children xmi:id="_Z6scYPf6EeWEP4pglzmtIA" type="Region" element="_Z6vfsPf6EeWEP4pglzmtIA">
+      <children xsi:type="notation:DecorationNode" xmi:id="_Z6scYff6EeWEP4pglzmtIA" type="RegionName">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_Z6scYvf6EeWEP4pglzmtIA"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_Z6scY_f6EeWEP4pglzmtIA"/>
+      </children>
+      <children xsi:type="notation:Shape" xmi:id="_Z6scZPf6EeWEP4pglzmtIA" type="RegionCompartment" fontName="Verdana" lineColor="4210752">
+        <children xmi:id="_Z6scZff6EeWEP4pglzmtIA" type="Entry" element="_Z6vfsff6EeWEP4pglzmtIA">
+          <children xmi:id="_Z6scZvf6EeWEP4pglzmtIA" type="BorderItemLabelContainer">
+            <children xsi:type="notation:DecorationNode" xmi:id="_Z6scZ_f6EeWEP4pglzmtIA" type="BorderItemLabel">
+              <styles xsi:type="notation:ShapeStyle" xmi:id="_Z6scaPf6EeWEP4pglzmtIA"/>
+              <layoutConstraint xsi:type="notation:Location" xmi:id="_Z6scaff6EeWEP4pglzmtIA"/>
+            </children>
+            <styles xsi:type="notation:ShapeStyle" xmi:id="_Z6scavf6EeWEP4pglzmtIA" fontName="Verdana" lineColor="4210752"/>
+            <layoutConstraint xsi:type="notation:Bounds" xmi:id="_Z6sca_f6EeWEP4pglzmtIA"/>
+          </children>
+          <styles xsi:type="notation:ShapeStyle" xmi:id="_Z6scbPf6EeWEP4pglzmtIA" fontName="Verdana" fillColor="0" lineColor="16777215"/>
+          <styles xsi:type="notation:NamedStyle" xmi:id="_Z6scbff6EeWEP4pglzmtIA" name="allowColors"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_Z6scbvf6EeWEP4pglzmtIA" x="154" y="37" width="15" height="15"/>
+        </children>
+        <children xmi:id="_Z6scb_f6EeWEP4pglzmtIA" type="State" element="_Z6vfs_f6EeWEP4pglzmtIA">
+          <children xsi:type="notation:DecorationNode" xmi:id="_Z6sccPf6EeWEP4pglzmtIA" type="StateName">
+            <styles xsi:type="notation:ShapeStyle" xmi:id="_Z6sccff6EeWEP4pglzmtIA"/>
+            <layoutConstraint xsi:type="notation:Location" xmi:id="_Z6sccvf6EeWEP4pglzmtIA"/>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_Z6scc_f6EeWEP4pglzmtIA" type="StateTextCompartment">
+            <children xsi:type="notation:Shape" xmi:id="_Z6scdPf6EeWEP4pglzmtIA" type="StateTextCompartmentExpression" fontName="Verdana" lineColor="4210752">
+              <layoutConstraint xsi:type="notation:Bounds" xmi:id="_Z6scdff6EeWEP4pglzmtIA"/>
+            </children>
+          </children>
+          <children xsi:type="notation:Compartment" xmi:id="_Z6scdvf6EeWEP4pglzmtIA" type="StateFigureCompartment"/>
+          <styles xsi:type="notation:ShapeStyle" xmi:id="_Z6scd_f6EeWEP4pglzmtIA" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
+          <styles xsi:type="notation:FontStyle" xmi:id="_Z6scePf6EeWEP4pglzmtIA"/>
+          <styles xsi:type="notation:BooleanValueStyle" xmi:id="_Z6sceff6EeWEP4pglzmtIA" name="isHorizontal" booleanValue="true"/>
+          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_Z6scevf6EeWEP4pglzmtIA" x="144" y="127" width="40" height="53"/>
+        </children>
+        <layoutConstraint xsi:type="notation:Bounds" xmi:id="_Z6sce_f6EeWEP4pglzmtIA"/>
+      </children>
+      <styles xsi:type="notation:ShapeStyle" xmi:id="_Z6scfPf6EeWEP4pglzmtIA" fontName="Verdana" fillColor="15790320" lineColor="12632256"/>
+      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_Z6scfff6EeWEP4pglzmtIA" x="325" y="10" width="206" height="219"/>
+    </children>
+    <styles xsi:type="notation:DiagramStyle" xmi:id="_LyCfoPf6EeWEP4pglzmtIA"/>
+    <edges xmi:id="_LyKbcPf6EeWEP4pglzmtIA" type="Transition" element="_LyJNU_f6EeWEP4pglzmtIA" source="_LyHYIPf6EeWEP4pglzmtIA" target="_LyH_Nff6EeWEP4pglzmtIA">
+      <children xsi:type="notation:DecorationNode" xmi:id="_LyLCgPf6EeWEP4pglzmtIA" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_LyLCgff6EeWEP4pglzmtIA"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_LyLCgvf6EeWEP4pglzmtIA" y="10"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_LyKbcff6EeWEP4pglzmtIA" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_LyKbc_f6EeWEP4pglzmtIA" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_LyKbcvf6EeWEP4pglzmtIA" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+    </edges>
+    <edges xmi:id="_Z6wt0Pf6EeWEP4pglzmtIA" type="Transition" element="_Z6vfsvf6EeWEP4pglzmtIA" source="_Z6scZff6EeWEP4pglzmtIA" target="_Z6scb_f6EeWEP4pglzmtIA">
+      <children xsi:type="notation:DecorationNode" xmi:id="_Z6wt0ff6EeWEP4pglzmtIA" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_Z6wt0vf6EeWEP4pglzmtIA"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_Z6wt0_f6EeWEP4pglzmtIA" y="10"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_Z6wt1Pf6EeWEP4pglzmtIA" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_Z6wt1ff6EeWEP4pglzmtIA" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_Z6wt1vf6EeWEP4pglzmtIA" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+      <sourceAnchor xsi:type="notation:IdentityAnchor" xmi:id="_BqddwElgEeiT0t77wG6_Hw" id="(0.5,0.5)"/>
+      <targetAnchor xsi:type="notation:IdentityAnchor" xmi:id="_AXh2QElgEeiT0t77wG6_Hw" id="(4.071428571428571,1.9270833333333333)"/>
+    </edges>
+    <edges xmi:id="_cSKqEPf6EeWEP4pglzmtIA" type="Transition" element="_cSJb8Pf6EeWEP4pglzmtIA" source="_LyH_Nff6EeWEP4pglzmtIA" target="_Z6scb_f6EeWEP4pglzmtIA">
+      <children xsi:type="notation:DecorationNode" xmi:id="_cSLRIff6EeWEP4pglzmtIA" type="TransitionExpression">
+        <styles xsi:type="notation:ShapeStyle" xmi:id="_cSLRIvf6EeWEP4pglzmtIA"/>
+        <layoutConstraint xsi:type="notation:Location" xmi:id="_cSLRI_f6EeWEP4pglzmtIA" y="10"/>
+      </children>
+      <styles xsi:type="notation:ConnectorStyle" xmi:id="_cSKqEff6EeWEP4pglzmtIA" lineColor="4210752"/>
+      <styles xsi:type="notation:FontStyle" xmi:id="_cSLRIPf6EeWEP4pglzmtIA" fontName="Verdana"/>
+      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_cSKqEvf6EeWEP4pglzmtIA" points="[32, 8, -203, 8]$[170, 8, -65, 8]"/>
+      <sourceAnchor xsi:type="notation:IdentityAnchor" xmi:id="_cSNGUPf6EeWEP4pglzmtIA" id="(0.7555555555555555,0.5)"/>
+      <targetAnchor xsi:type="notation:IdentityAnchor" xmi:id="_AXidUElgEeiT0t77wG6_Hw" id="(4.071428571428571,1.9270833333333333)"/>
+    </edges>
+  </notation:Diagram>
+</xmi:XMI>

+ 1 - 68
test-plugins/org.yakindu.sct.test.models/testmodels/validation/OrthogonalTransition.sct

@@ -1,19 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:sgraph="http://www.yakindu.org/sct/sgraph/2.0.0">
   <sgraph:Statechart xmi:id="_Lx-1QPf6EeWEP4pglzmtIA" specification="interface:&#xA;// Define events and&#xA;// and variables here" name="OrthogonalTransition">
-    <regions xmi:id="_LyCfoff6EeWEP4pglzmtIA" name="r1">
-      <vertices xsi:type="sgraph:Entry" xmi:id="_LyGxEff6EeWEP4pglzmtIA">
-        <outgoingTransitions xmi:id="_LyJNU_f6EeWEP4pglzmtIA" target="_LyH_Mvf6EeWEP4pglzmtIA"/>
-      </vertices>
-      <vertices xsi:type="sgraph:State" xmi:id="_LyH_Mvf6EeWEP4pglzmtIA" name="A" incomingTransitions="_LyJNU_f6EeWEP4pglzmtIA">
-        <outgoingTransitions xmi:id="_cSJb8Pf6EeWEP4pglzmtIA" specification="always" target="_Z6vfs_f6EeWEP4pglzmtIA"/>
-      </vertices>
-    </regions>
     <regions xmi:id="_Z6vfsPf6EeWEP4pglzmtIA" name="r2">
       <vertices xsi:type="sgraph:Entry" xmi:id="_Z6vfsff6EeWEP4pglzmtIA">
         <outgoingTransitions xmi:id="_Z6vfsvf6EeWEP4pglzmtIA" target="_Z6vfs_f6EeWEP4pglzmtIA"/>
       </vertices>
-      <vertices xsi:type="sgraph:State" xmi:id="_Z6vfs_f6EeWEP4pglzmtIA" name="B" incomingTransitions="_Z6vfsvf6EeWEP4pglzmtIA _cSJb8Pf6EeWEP4pglzmtIA _wMOkwPf6EeWEP4pglzmtIA">
+      <vertices xsi:type="sgraph:State" xmi:id="_Z6vfs_f6EeWEP4pglzmtIA" name="B" incomingTransitions="_Z6vfsvf6EeWEP4pglzmtIA _wMOkwPf6EeWEP4pglzmtIA">
         <regions xmi:id="_mARHEPf6EeWEP4pglzmtIA" name="">
           <vertices xsi:type="sgraph:Entry" xmi:id="_mARHEff6EeWEP4pglzmtIA">
             <outgoingTransitions xmi:id="_mARHEvf6EeWEP4pglzmtIA" specification="" target="_mARHE_f6EeWEP4pglzmtIA"/>
@@ -34,46 +26,6 @@
     </regions>
   </sgraph:Statechart>
   <notation:Diagram xmi:id="_LyB4kPf6EeWEP4pglzmtIA" type="org.yakindu.sct.ui.editor.editor.StatechartDiagramEditor" element="_Lx-1QPf6EeWEP4pglzmtIA" measurementUnit="Pixel">
-    <children xmi:id="_LyEU0Pf6EeWEP4pglzmtIA" type="Region" element="_LyCfoff6EeWEP4pglzmtIA">
-      <children xsi:type="notation:DecorationNode" xmi:id="_LyGKAPf6EeWEP4pglzmtIA" type="RegionName">
-        <styles xsi:type="notation:ShapeStyle" xmi:id="_LyGKAff6EeWEP4pglzmtIA"/>
-        <layoutConstraint xsi:type="notation:Location" xmi:id="_LyGKAvf6EeWEP4pglzmtIA"/>
-      </children>
-      <children xsi:type="notation:Shape" xmi:id="_LyGKA_f6EeWEP4pglzmtIA" type="RegionCompartment" fontName="Verdana" lineColor="4210752">
-        <children xmi:id="_LyHYIPf6EeWEP4pglzmtIA" type="Entry" element="_LyGxEff6EeWEP4pglzmtIA">
-          <children xmi:id="_LyHYJPf6EeWEP4pglzmtIA" type="BorderItemLabelContainer">
-            <children xsi:type="notation:DecorationNode" xmi:id="_LyHYJ_f6EeWEP4pglzmtIA" type="BorderItemLabel">
-              <styles xsi:type="notation:ShapeStyle" xmi:id="_LyHYKPf6EeWEP4pglzmtIA"/>
-              <layoutConstraint xsi:type="notation:Location" xmi:id="_LyH_MPf6EeWEP4pglzmtIA"/>
-            </children>
-            <styles xsi:type="notation:ShapeStyle" xmi:id="_LyHYJff6EeWEP4pglzmtIA" fontName="Verdana" lineColor="4210752"/>
-            <layoutConstraint xsi:type="notation:Bounds" xmi:id="_LyHYJvf6EeWEP4pglzmtIA"/>
-          </children>
-          <styles xsi:type="notation:ShapeStyle" xmi:id="_LyHYIff6EeWEP4pglzmtIA" fontName="Verdana" fillColor="0" lineColor="16777215"/>
-          <styles xsi:type="notation:NamedStyle" xmi:id="_LyHYIvf6EeWEP4pglzmtIA" name="allowColors"/>
-          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_LyH_Mff6EeWEP4pglzmtIA" x="23" y="25"/>
-        </children>
-        <children xmi:id="_LyH_Nff6EeWEP4pglzmtIA" type="State" element="_LyH_Mvf6EeWEP4pglzmtIA">
-          <children xsi:type="notation:DecorationNode" xmi:id="_LyImQPf6EeWEP4pglzmtIA" type="StateName">
-            <styles xsi:type="notation:ShapeStyle" xmi:id="_LyImQff6EeWEP4pglzmtIA"/>
-            <layoutConstraint xsi:type="notation:Location" xmi:id="_LyImQvf6EeWEP4pglzmtIA"/>
-          </children>
-          <children xsi:type="notation:Compartment" xmi:id="_LyImQ_f6EeWEP4pglzmtIA" type="StateTextCompartment">
-            <children xsi:type="notation:Shape" xmi:id="_LyImRPf6EeWEP4pglzmtIA" type="StateTextCompartmentExpression" fontName="Verdana" lineColor="4210752">
-              <layoutConstraint xsi:type="notation:Bounds" xmi:id="_LyImRff6EeWEP4pglzmtIA"/>
-            </children>
-          </children>
-          <children xsi:type="notation:Compartment" xmi:id="_LyJNUPf6EeWEP4pglzmtIA" type="StateFigureCompartment"/>
-          <styles xsi:type="notation:ShapeStyle" xmi:id="_LyH_Nvf6EeWEP4pglzmtIA" fontName="Verdana" fillColor="15981773" lineColor="12632256"/>
-          <styles xsi:type="notation:FontStyle" xmi:id="_LyH_N_f6EeWEP4pglzmtIA"/>
-          <styles xsi:type="notation:BooleanValueStyle" xmi:id="_LyJNUff6EeWEP4pglzmtIA" name="isHorizontal" booleanValue="true"/>
-          <layoutConstraint xsi:type="notation:Bounds" xmi:id="_LyJNUvf6EeWEP4pglzmtIA" x="13" y="125" width="40" height="53"/>
-        </children>
-        <layoutConstraint xsi:type="notation:Bounds" xmi:id="_LyGKBPf6EeWEP4pglzmtIA"/>
-      </children>
-      <styles xsi:type="notation:ShapeStyle" xmi:id="_LyEU0ff6EeWEP4pglzmtIA" fontName="Verdana" fillColor="15790320" lineColor="12632256"/>
-      <layoutConstraint xsi:type="notation:Bounds" xmi:id="_LyGxEPf6EeWEP4pglzmtIA" x="220" y="10" width="93" height="400"/>
-    </children>
     <children xsi:type="notation:Shape" xmi:id="_LyLCg_f6EeWEP4pglzmtIA" type="StatechartText" fontName="Verdana" lineColor="4210752">
       <children xsi:type="notation:DecorationNode" xmi:id="_LyLpkPf6EeWEP4pglzmtIA" type="StatechartName">
         <styles xsi:type="notation:ShapeStyle" xmi:id="_LyLpkff6EeWEP4pglzmtIA"/>
@@ -204,15 +156,6 @@
       <layoutConstraint xsi:type="notation:Bounds" xmi:id="_Z6scfff6EeWEP4pglzmtIA" x="320" y="10" width="386" height="400"/>
     </children>
     <styles xsi:type="notation:DiagramStyle" xmi:id="_LyCfoPf6EeWEP4pglzmtIA"/>
-    <edges xmi:id="_LyKbcPf6EeWEP4pglzmtIA" type="Transition" element="_LyJNU_f6EeWEP4pglzmtIA" source="_LyHYIPf6EeWEP4pglzmtIA" target="_LyH_Nff6EeWEP4pglzmtIA">
-      <children xsi:type="notation:DecorationNode" xmi:id="_LyLCgPf6EeWEP4pglzmtIA" type="TransitionExpression">
-        <styles xsi:type="notation:ShapeStyle" xmi:id="_LyLCgff6EeWEP4pglzmtIA"/>
-        <layoutConstraint xsi:type="notation:Location" xmi:id="_LyLCgvf6EeWEP4pglzmtIA" y="10"/>
-      </children>
-      <styles xsi:type="notation:ConnectorStyle" xmi:id="_LyKbcff6EeWEP4pglzmtIA" lineColor="4210752"/>
-      <styles xsi:type="notation:FontStyle" xmi:id="_LyKbc_f6EeWEP4pglzmtIA" fontName="Verdana"/>
-      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_LyKbcvf6EeWEP4pglzmtIA" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
-    </edges>
     <edges xmi:id="_Z6wt0Pf6EeWEP4pglzmtIA" type="Transition" element="_Z6vfsvf6EeWEP4pglzmtIA" source="_Z6scZff6EeWEP4pglzmtIA" target="_Z6scb_f6EeWEP4pglzmtIA">
       <children xsi:type="notation:DecorationNode" xmi:id="_Z6wt0ff6EeWEP4pglzmtIA" type="TransitionExpression">
         <styles xsi:type="notation:ShapeStyle" xmi:id="_Z6wt0vf6EeWEP4pglzmtIA"/>
@@ -222,16 +165,6 @@
       <styles xsi:type="notation:FontStyle" xmi:id="_Z6wt1ff6EeWEP4pglzmtIA" fontName="Verdana"/>
       <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_Z6wt1vf6EeWEP4pglzmtIA" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
     </edges>
-    <edges xmi:id="_cSKqEPf6EeWEP4pglzmtIA" type="Transition" element="_cSJb8Pf6EeWEP4pglzmtIA" source="_LyH_Nff6EeWEP4pglzmtIA" target="_Z6scb_f6EeWEP4pglzmtIA">
-      <children xsi:type="notation:DecorationNode" xmi:id="_cSLRIff6EeWEP4pglzmtIA" type="TransitionExpression">
-        <styles xsi:type="notation:ShapeStyle" xmi:id="_cSLRIvf6EeWEP4pglzmtIA"/>
-        <layoutConstraint xsi:type="notation:Location" xmi:id="_cSLRI_f6EeWEP4pglzmtIA" y="10"/>
-      </children>
-      <styles xsi:type="notation:ConnectorStyle" xmi:id="_cSKqEff6EeWEP4pglzmtIA" lineColor="4210752"/>
-      <styles xsi:type="notation:FontStyle" xmi:id="_cSLRIPf6EeWEP4pglzmtIA" fontName="Verdana"/>
-      <bendpoints xsi:type="notation:RelativeBendpoints" xmi:id="_cSKqEvf6EeWEP4pglzmtIA" points="[32, 8, -203, 8]$[170, 8, -65, 8]"/>
-      <sourceAnchor xsi:type="notation:IdentityAnchor" xmi:id="_cSNGUPf6EeWEP4pglzmtIA" id="(0.7555555555555555,0.5)"/>
-    </edges>
     <edges xmi:id="_mARHFvf6EeWEP4pglzmtIA" type="Transition" element="_mARHEvf6EeWEP4pglzmtIA" source="_mAQgBff6EeWEP4pglzmtIA" target="_mAQgDvf6EeWEP4pglzmtIA">
       <children xsi:type="notation:DecorationNode" xmi:id="_mARHF_f6EeWEP4pglzmtIA" type="TransitionExpression">
         <styles xsi:type="notation:ShapeStyle" xmi:id="_mARHGPf6EeWEP4pglzmtIA"/>

+ 0 - 4
test-plugins/org.yakindu.sct.test.models/.settings/org.eclipse.core.resources.prefs

@@ -37,11 +37,7 @@ encoding//testmodels/SCTUnit/eventdriven/LocalEvents.sct=UTF-8
 encoding//testmodels/SCTUnit/eventdriven/NoLocalEvents.sct=UTF-8
 encoding//testmodels/SCTUnit/executionorder/ChildFirstExecutionHierarchy.sct=UTF-8
 encoding//testmodels/extensions/NoTimeEvents.sct=UTF-8
-encoding//testmodels/validation/EntryTransitionToParentState.sct=UTF-8
 encoding//testmodels/validation/NoTriggerOnTransitionWithExitPointSpec.sct=UTF-8
-encoding//testmodels/validation/RegionCantBeEnteredUsingShallowHistory.sct=UTF-8
 encoding//testmodels/validation/UnusedInternalDeclarations.sct=UTF-8
-encoding//testmodels/validation/ValidEmptyTransitionFromSync.sct=UTF-8
-encoding//testmodels/validation/ValidTransitionToInnerChoice.sct=UTF-8
 encoding//tests/EntryExitSelfTransition.sctunit=UTF-8
 encoding/<project>=UTF-8