Ejemplo n.º 1
0
 @Check(CheckType.FAST)
 public void choiceWithoutOutgoingTransition(Choice choice) {
   // Choice without outgoing transition
   if (choice.getOutgoingTransitions().size() == 0) {
     error(ISSUE_CHOICE_WITHOUT_OUTGOING_TRANSITION, choice, null, -1);
   }
 }
Ejemplo n.º 2
0
 @Check
 public void checkChoiceWithoutDefaultTransition(final Choice choice) {
   boolean found = false;
   for (Transition transition : choice.getOutgoingTransitions()) {
     Trigger trigger = transition.getTrigger();
     if (isDefault(trigger)) {
       found = true;
     }
   }
   if (!found)
     warning(
         CHOICE_ONE_OUTGOING_DEFAULT_TRANSITION,
         SGraphPackage.Literals.VERTEX__OUTGOING_TRANSITIONS);
 }