4 package robots.missions.validation
6 //import org.eclipse.xtext.validation.Check
8 * This class contains custom validation rules.
10 * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#validation
12 class TaskDSLValidator extends AbstractTaskDSLValidator {
14 // def checkOnlyOneBehaviourPerMissionEmptyTakeControl(Mission m) {
15 // var List<String> empty = new LinkedList<String>();
16 // var List<String> all = new LinkedList<String>();
17 // for(Behaviour b : m.behaviours){
23 // if(empty.size > 1){
24 // warning("Multiple behaviours without takeControl predicate. You might want to remove some of: " + empty.toString(), m.eContainingFeature);
26 // if(all.toSet().size() < all.size()){
27 // warning("You have duplicate behaviours.", m, TaskDSLPackage.Literals::MISSION__BEHAVIOURS);
31 //Validate if the random degrees are correct