package robots.missions.validation
//import org.eclipse.xtext.validation.Check
-
/**
* This class contains custom validation rules.
- *
+ *
* 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);
// }
// }
+
+//Validate if the random degrees are correct
}