Example #1
0
 /**
  * Indicates if matches of a given control call might have been disabled since the parent state.
  */
 private boolean isDisabled(Call call) {
   if (this.disabledRules == null || this.disabledRules.contains(call.getRule())) {
     return true;
   }
   // since disabledRules != null, it is now certain that this is a NextState
   GraphNextState state = (GraphNextState) this.state;
   if (state.getStep().isModifying()) {
     return true;
   }
   return false;
 }
Example #2
0
 /**
  * Indicates if new matches of a given control call might have been enabled with respect to the
  * parent state.
  */
 private boolean isEnabled(Call call) {
   if (this.enabledRules == null
       || !this.parentClosed
       || this.enabledRules.contains(call.getRule())) {
     return true;
   }
   // since enabledRules != null, it is now certain that this is a NextState
   GraphNextState state = (GraphNextState) this.state;
   if (state.getStep().isModifying()) {
     return true;
   }
   // there may be new matches only if the rule call was untried in
   // the parent state
   Set<Call> triedCalls = state.source().getActualFrame().getPastCalls();
   return triedCalls == null || !triedCalls.contains(call);
 }