f3926b5257882326ddcc937e5757d85a5dcc7e33
[des2015.git] / dsl / xtend / src / robots / missions / validation / TaskDSLValidator.xtend
1 /*
2 * generated by Xtext
3 */
4 package robots.missions.validation
5
6 //import org.eclipse.xtext.validation.Check
7 /**
8 * This class contains custom validation rules.
9 *
10 * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#validation
11 */
12 class TaskDSLValidator extends AbstractTaskDSLValidator {
13 // @Check
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){
18 // if(b.tc == null){
19 // empty.add(b.name);
20 // }
21 // all.add(b.name);
22 // }
23 // if(empty.size > 1){
24 // warning("Multiple behaviours without takeControl predicate. You might want to remove some of: " + empty.toString(), m.eContainingFeature);
25 // }
26 // if(all.toSet().size() < all.size()){
27 // warning("You have duplicate behaviours.", m, TaskDSLPackage.Literals::MISSION__BEHAVIOURS);
28 // }
29 // }
30
31 //Validate if the random degrees are correct
32 }