parseConstraint(constraint, contextType);
parsed.add(constraint);
}
private void parseConstraint(IAnnotation constraint, IType contextType) throws JavaModelException {
FPLParser parser = new FPLParser(rels, contextType);
Operation op = null;
Predicate trigger = null, requires = null, restrict = null;
List<Effect> effects = new LinkedList<Effect>();
try {
for (IMemberValuePair pair : constraint.getMemberValuePairs()) {
String name = pair.getMemberName();
if (name.equals("op")) {
parser.reset((String)pair.getValue());
op = parser.operation();
}
else if (name.equals("trigger")) {
parser.reset((String)pair.getValue());
trigger = parser.expression();
}
else if (name.equals("requires")) {
parser.reset((String)pair.getValue());
requires = parser.expression();
}
else if (name.equals("restrictTo")) {
parser.reset((String)pair.getValue());
restrict = parser.expression();
}
else if (name.equals("effects")) {
for (Object effect : (Object[])pair.getValue()) {
parser.reset((String)effect);
effects.add(parser.effect());
}
}
}
if (trigger == null)