* See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#validation
*/
class TaskDSLValidator extends AbstractTaskDSLValidator {
-
-// public static val INVALID_NAME = 'invalidName'
-//
// @Check
-// def checkGreetingStartsWithCapital(Greeting greeting) {
-// if (!Character.isUpperCase(greeting.name.charAt(0))) {
-// warning('Name should start with a capital',
-// MyDslPackage.Literals.GREETING__NAME,
-// INVALID_NAME)
+// def checkOnlyOneBehaviourPerMissionEmptyTakeControl(Mission m) {
+// var List<String> empty = new LinkedList<String>();
+// var List<String> all = new LinkedList<String>();
+// for(Behaviour b : m.behaviours){
+// if(b.tc == null){
+// empty.add(b.name);
+// }
+// all.add(b.name);
+// }
+// if(empty.size > 1){
+// warning("Multiple behaviours without takeControl predicate. You might want to remove some of: " + empty.toString(), m.eContainingFeature);
+// }
+// if(all.toSet().size() < all.size()){
+// warning("You have duplicate behaviours.", m, TaskDSLPackage.Literals::MISSION__BEHAVIOURS);
// }
// }
-/* @Check
- def checkStoppingExpressionShouldHaveOneBehaviourToCollectColor(Mission mission) {
- var isCollectColorExist = false;
- if (!mission.se.scond.colors.nullOrEmpty) {
- var blist = mission.behaviours;
- for (var j = 0; j < blist.size; j++) {
- if (!blist.get(j).clcColor.nullOrEmpty) {
- isCollectColorExist = true;
- }
- }
- }
- if (!isCollectColorExist) {
- error("Must specify one behaviour to collect color", null)
- }
- }*/
+
+//Validate if the random degrees are correct
}