IProblemReporter rep) throws RecognitionException {
if (element instanceof RutaCondition) {
RutaCondition a = (RutaCondition) element;
String name = a.getName();
if (!name.equals(strings[0])) {
IProblem problem = problemFactory.createUnknownConditionProblem(a);
rep.reportProblem(problem);
return false;
}
boolean ok = true;
List<Expression> childs = a.getChilds();
if(childs.size() != 2) {
IProblem problem = problemFactory.createWrongNumberOfArgumentsProblem(name, element, 2);
rep.reportProblem(problem);
ok = false;
}
for (Expression expression : childs) {
if (expression.getKind() != RutaTypeConstants.RUTA_TYPE_S) {
IProblem problem = problemFactory.createWrongArgumentTypeProblem(expression, "StringExpression");
rep.reportProblem(problem);
ok = false;
}
}
return ok;