Search in sources :

Example 1 with ConditionExpression

use of org.osate.xtext.aadl2.errormodel.errorModel.ConditionExpression in project osate2 by osate.

the class ErrorBehaviorTransitionImpl method basicSetCondition.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetCondition(ConditionExpression newCondition, NotificationChain msgs) {
    ConditionExpression oldCondition = condition;
    condition = newCondition;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ErrorModelPackage.ERROR_BEHAVIOR_TRANSITION__CONDITION, oldCondition, newCondition);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : ConditionExpression(org.osate.xtext.aadl2.errormodel.errorModel.ConditionExpression) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Example 2 with ConditionExpression

use of org.osate.xtext.aadl2.errormodel.errorModel.ConditionExpression in project osate2 by osate.

the class CompositeStateImpl method basicSetCondition.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetCondition(ConditionExpression newCondition, NotificationChain msgs) {
    ConditionExpression oldCondition = condition;
    condition = newCondition;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ErrorModelPackage.COMPOSITE_STATE__CONDITION, oldCondition, newCondition);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : ConditionExpression(org.osate.xtext.aadl2.errormodel.errorModel.ConditionExpression) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Example 3 with ConditionExpression

use of org.osate.xtext.aadl2.errormodel.errorModel.ConditionExpression in project osate2 by osate.

the class ErrorDetectionImpl method basicSetCondition.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetCondition(ConditionExpression newCondition, NotificationChain msgs) {
    ConditionExpression oldCondition = condition;
    condition = newCondition;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ErrorModelPackage.ERROR_DETECTION__CONDITION, oldCondition, newCondition);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : ConditionExpression(org.osate.xtext.aadl2.errormodel.errorModel.ConditionExpression) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Example 4 with ConditionExpression

use of org.osate.xtext.aadl2.errormodel.errorModel.ConditionExpression in project osate2 by osate.

the class OutgoingPropagationConditionImpl method basicSetCondition.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetCondition(ConditionExpression newCondition, NotificationChain msgs) {
    ConditionExpression oldCondition = condition;
    condition = newCondition;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ErrorModelPackage.OUTGOING_PROPAGATION_CONDITION__CONDITION, oldCondition, newCondition);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : ConditionExpression(org.osate.xtext.aadl2.errormodel.errorModel.ConditionExpression) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Example 5 with ConditionExpression

use of org.osate.xtext.aadl2.errormodel.errorModel.ConditionExpression in project osate2 by osate.

the class EMV2Util method getAllConditionElementsFromConditionExpression.

private static void getAllConditionElementsFromConditionExpression(EList<ConditionElement> propagations, ConditionExpression ce) {
    if (ce instanceof ConditionElement) {
        ConditionElement element = (ConditionElement) ce;
        propagations.add(element);
    } else if (ce instanceof AndExpression) {
        AndExpression and = (AndExpression) ce;
        for (ConditionExpression foobar : and.getOperands()) {
            getAllConditionElementsFromConditionExpression(propagations, foobar);
        }
    } else if (ce instanceof OrExpression) {
        OrExpression or = (OrExpression) ce;
        for (ConditionExpression foobar : or.getOperands()) {
            getAllConditionElementsFromConditionExpression(propagations, foobar);
        }
    } else if (ce instanceof OrmoreExpression) {
        OrmoreExpression or = (OrmoreExpression) ce;
        for (ConditionExpression foobar : or.getOperands()) {
            getAllConditionElementsFromConditionExpression(propagations, foobar);
        }
    } else if (ce instanceof OrlessExpression) {
        OrlessExpression or = (OrlessExpression) ce;
        for (ConditionExpression foobar : or.getOperands()) {
            getAllConditionElementsFromConditionExpression(propagations, foobar);
        }
    } else if (ce instanceof AllExpression) {
        AllExpression or = (AllExpression) ce;
        for (ConditionExpression foobar : or.getOperands()) {
            getAllConditionElementsFromConditionExpression(propagations, foobar);
        }
    }
}
Also used : SConditionElement(org.osate.xtext.aadl2.errormodel.errorModel.SConditionElement) ConditionElement(org.osate.xtext.aadl2.errormodel.errorModel.ConditionElement) AndExpression(org.osate.xtext.aadl2.errormodel.errorModel.AndExpression) ConditionExpression(org.osate.xtext.aadl2.errormodel.errorModel.ConditionExpression) OrlessExpression(org.osate.xtext.aadl2.errormodel.errorModel.OrlessExpression) AllExpression(org.osate.xtext.aadl2.errormodel.errorModel.AllExpression) OrmoreExpression(org.osate.xtext.aadl2.errormodel.errorModel.OrmoreExpression) OrExpression(org.osate.xtext.aadl2.errormodel.errorModel.OrExpression)

Aggregations

ConditionExpression (org.osate.xtext.aadl2.errormodel.errorModel.ConditionExpression)11 ConditionElement (org.osate.xtext.aadl2.errormodel.errorModel.ConditionElement)6 ErrorPropagation (org.osate.xtext.aadl2.errormodel.errorModel.ErrorPropagation)5 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)4 ErrorBehaviorState (org.osate.xtext.aadl2.errormodel.errorModel.ErrorBehaviorState)4 ErrorBehaviorTransition (org.osate.xtext.aadl2.errormodel.errorModel.ErrorBehaviorTransition)4 ErrorEvent (org.osate.xtext.aadl2.errormodel.errorModel.ErrorEvent)4 OrExpression (org.osate.xtext.aadl2.errormodel.errorModel.OrExpression)4 SConditionElement (org.osate.xtext.aadl2.errormodel.errorModel.SConditionElement)4 TypeSet (org.osate.xtext.aadl2.errormodel.errorModel.TypeSet)4 TypeToken (org.osate.xtext.aadl2.errormodel.errorModel.TypeToken)4 EList (org.eclipse.emf.common.util.EList)3 EObject (org.eclipse.emf.ecore.EObject)3 NamedElement (org.osate.aadl2.NamedElement)3 AndExpression (org.osate.xtext.aadl2.errormodel.errorModel.AndExpression)3 ErrorSource (org.osate.xtext.aadl2.errormodel.errorModel.ErrorSource)3 OrmoreExpression (org.osate.xtext.aadl2.errormodel.errorModel.OrmoreExpression)3 LinkedList (java.util.LinkedList)2 AllExpression (org.osate.xtext.aadl2.errormodel.errorModel.AllExpression)2 EMV2PropertyAssociation (org.osate.xtext.aadl2.errormodel.errorModel.EMV2PropertyAssociation)2