/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * The query containingStateMachine() returns the state machine that contains the transition either directly or transitively. * result = container.containingStateMachine() * @param transition The receiving '<em><b>Transition</b></em>' model object. * <!-- end-model-doc --> * @generated NOT */ public static StateMachine containingStateMachine(Transition transition) { Region container = transition.getContainer(); return container == null ? null : container.containingStateMachine(); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * The query containingStateMachine() returns the state machine that contains the state either directly or transitively. * result = container.containingStateMachine() * @param state The receiving '<em><b>State</b></em>' model object. * <!-- end-model-doc --> * @generated NOT */ public static StateMachine containingStateMachine(State state) { Region container = state.getContainer(); return container == null ? null : container.containingStateMachine(); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * The redefinition context of a region is the nearest containing statemachine * result = let sm = containingStateMachine() in * if sm.context->isEmpty() or sm.general->notEmpty() then * sm * else * sm.context * endif * @param region The receiving '<em><b>Region</b></em>' model object. * <!-- end-model-doc --> * @generated NOT */ public static Classifier redefinitionContext(Region region) { StateMachine sm = region.containingStateMachine(); if (sm != null) { BehavioredClassifier context = sm.getContext(); return context == null || !sm.getGenerals().isEmpty() ? sm : context; } return null; }
return container.containingStateMachine(); } else if (vertex instanceof Pseudostate) { Pseudostate pseudostate = (Pseudostate) vertex;