Search in sources :

Example 21 with Step

use of org.yakindu.sct.model.sexec.Step in project statecharts by Yakindu.

the class Assert method assertedOrder_intern.

private static void assertedOrder_intern(Step step, Collection<? extends ExecutionState> currentStates, List<? extends AbstractStep> requiredSteps) {
    if (requiredSteps.isEmpty()) {
        return;
    }
    boolean found = false;
    Iterable<Step> next = null;
    if (requiredSteps.get(0).matches(step)) {
        found = true;
        AbstractStep matched = requiredSteps.remove(0);
        if (matched.isLeaf()) {
            return;
        }
        next = matched.next();
    }
    if (next == null) {
        next = findNext(step, currentStates, requiredSteps);
    }
    if (next != null) {
        for (Step s : next) {
            assertedOrder_intern(s, currentStates, requiredSteps);
        }
    } else if (found == false) {
        fail("Step without match: " + step);
    }
}
Also used : Step(org.yakindu.sct.model.sexec.Step)

Example 22 with Step

use of org.yakindu.sct.model.sexec.Step in project statecharts by Yakindu.

the class HistoryEntryImpl method basicSetHistoryStep.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetHistoryStep(Step newHistoryStep, NotificationChain msgs) {
    Step oldHistoryStep = historyStep;
    historyStep = newHistoryStep;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SexecPackage.HISTORY_ENTRY__HISTORY_STEP, oldHistoryStep, newHistoryStep);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) Step(org.yakindu.sct.model.sexec.Step)

Example 23 with Step

use of org.yakindu.sct.model.sexec.Step in project statecharts by Yakindu.

the class ReactionImpl method basicSetEffect.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetEffect(Step newEffect, NotificationChain msgs) {
    Step oldEffect = effect;
    effect = newEffect;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SexecPackage.REACTION__EFFECT, oldEffect, newEffect);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) Step(org.yakindu.sct.model.sexec.Step)

Example 24 with Step

use of org.yakindu.sct.model.sexec.Step in project statecharts by Yakindu.

the class StateCaseImpl method basicSetStep.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetStep(Step newStep, NotificationChain msgs) {
    Step oldStep = step;
    step = newStep;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SexecPackage.STATE_CASE__STEP, oldStep, newStep);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) Step(org.yakindu.sct.model.sexec.Step)

Example 25 with Step

use of org.yakindu.sct.model.sexec.Step in project statecharts by Yakindu.

the class ExecutionFlowImpl method basicSetEntryAction.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetEntryAction(Step newEntryAction, NotificationChain msgs) {
    Step oldEntryAction = entryAction;
    entryAction = newEntryAction;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SexecPackage.EXECUTION_FLOW__ENTRY_ACTION, oldEntryAction, newEntryAction);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) Step(org.yakindu.sct.model.sexec.Step)

Aggregations

Step (org.yakindu.sct.model.sexec.Step)27 Test (org.junit.Test)15 ExecutionFlow (org.yakindu.sct.model.sexec.ExecutionFlow)15 ExecutionState (org.yakindu.sct.model.sexec.ExecutionState)13 Region (org.yakindu.sct.model.sgraph.Region)12 State (org.yakindu.sct.model.sgraph.State)12 Statechart (org.yakindu.sct.model.sgraph.Statechart)12 SGraphTestFactory._createRegion (org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createRegion)12 SGraphTestFactory._createState (org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createState)12 SGraphTestFactory._createStatechart (org.yakindu.sct.model.sgraph.test.util.SGraphTestFactory._createStatechart)12 VariableDefinition (org.yakindu.sct.model.stext.stext.VariableDefinition)12 StextTestFactory._createVariableDefinition (org.yakindu.sct.model.stext.test.util.StextTestFactory._createVariableDefinition)12 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)11 InterfaceScope (org.yakindu.sct.model.stext.stext.InterfaceScope)11 StextTestFactory._createInterfaceScope (org.yakindu.sct.model.stext.test.util.StextTestFactory._createInterfaceScope)11 Sequence (org.yakindu.sct.model.sexec.Sequence)10 If (org.yakindu.sct.model.sexec.If)8 ReactionTrigger (org.yakindu.sct.model.stext.stext.ReactionTrigger)7 Entry (org.yakindu.sct.model.sgraph.Entry)6 Transition (org.yakindu.sct.model.sgraph.Transition)6