Search in sources :

Example 26 with PropertyType

use of org.osate.aadl2.PropertyType in project osate2 by osate.

the class AVariableDeclarationImpl method basicSetType.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetType(PropertyType newType, NotificationChain msgs) {
    PropertyType oldType = type;
    type = newType;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CommonPackage.AVARIABLE_DECLARATION__TYPE, oldType, newType);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) PropertyType(org.osate.aadl2.PropertyType)

Example 27 with PropertyType

use of org.osate.aadl2.PropertyType in project osate2 by osate.

the class TypeRefImpl method setRef.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void setRef(PropertyType newRef) {
    PropertyType oldRef = ref;
    ref = newRef;
    if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.TYPE_REF__REF, oldRef, ref));
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) PropertyType(org.osate.aadl2.PropertyType)

Example 28 with PropertyType

use of org.osate.aadl2.PropertyType in project osate2 by osate.

the class FormalParameterImpl method basicSetType.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetType(PropertyType newType, NotificationChain msgs) {
    PropertyType oldType = type;
    type = newType;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, VerifyPackage.FORMAL_PARAMETER__TYPE, oldType, newType);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) PropertyType(org.osate.aadl2.PropertyType)

Example 29 with PropertyType

use of org.osate.aadl2.PropertyType in project osate2 by osate.

the class AadlBaTypeChecker method propertyElementHolderResolver.

private PropertyElementHolder propertyElementHolderResolver(Element el, LocationReference loc) {
    PropertyElementHolder result = null;
    if (el instanceof BasicProperty) {
        BasicProperty bp = (BasicProperty) el;
        BasicPropertyHolder tmp = _fact.createBasicPropertyHolder();
        tmp.setBasicProperty(bp);
        result = tmp;
    } else if (el instanceof PropertyAssociation) {
        PropertyAssociation pa = (PropertyAssociation) el;
        PropertyAssociationHolder tmp = _fact.createPropertyAssociationHolder();
        tmp.setPropertyAssociation(pa);
        result = tmp;
    } else if (el instanceof PropertyExpression) {
        PropertyExpression pe = (PropertyExpression) el;
        PropertyExpressionHolder tmp = _fact.createPropertyExpressionHolder();
        tmp.setPropertyExpression(pe);
        result = tmp;
    } else if (el instanceof PropertyType) {
        PropertyType pt = (PropertyType) el;
        PropertyTypeHolder tmp = _fact.createPropertyTypeHolder();
        tmp.setPropertyType(pt);
        result = tmp;
    } else if (el instanceof EnumerationLiteral) {
        EnumerationLiteral enumLit = (EnumerationLiteral) el;
        EnumLiteralHolder tmp = _fact.createEnumLiteralHolder();
        tmp.setEnumLiteral(enumLit);
        result = tmp;
    } else {
        String errorMsg = "type: " + el.getClass().getSimpleName() + " is not supported yet.";
        System.err.println(errorMsg);
        throw new UnsupportedOperationException(errorMsg);
    }
    result.setLocationReference(loc);
    return result;
}
Also used : PropertyAssociation(org.osate.aadl2.PropertyAssociation) PropertyType(org.osate.aadl2.PropertyType) BasicProperty(org.osate.aadl2.BasicProperty) PropertyExpression(org.osate.aadl2.PropertyExpression) EnumerationLiteral(org.osate.aadl2.EnumerationLiteral)

Example 30 with PropertyType

use of org.osate.aadl2.PropertyType in project osate2 by osate.

the class BasicPropertyImpl method basicSetOwnedPropertyType.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetOwnedPropertyType(PropertyType newOwnedPropertyType, NotificationChain msgs) {
    PropertyType oldOwnedPropertyType = ownedPropertyType;
    ownedPropertyType = newOwnedPropertyType;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Aadl2Package.BASIC_PROPERTY__OWNED_PROPERTY_TYPE, oldOwnedPropertyType, newOwnedPropertyType);
        if (msgs == null) {
            msgs = notification;
        } else {
            msgs.add(notification);
        }
    }
    return msgs;
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) PropertyType(org.osate.aadl2.PropertyType)

Aggregations

PropertyType (org.osate.aadl2.PropertyType)35 Property (org.osate.aadl2.Property)13 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)12 PropertyExpression (org.osate.aadl2.PropertyExpression)8 BasicProperty (org.osate.aadl2.BasicProperty)7 NamedElement (org.osate.aadl2.NamedElement)7 PropertyAssociation (org.osate.aadl2.PropertyAssociation)5 PropertyConstant (org.osate.aadl2.PropertyConstant)5 EObject (org.eclipse.emf.ecore.EObject)4 ArraySizeProperty (org.osate.aadl2.ArraySizeProperty)4 EnumerationLiteral (org.osate.aadl2.EnumerationLiteral)4 PropertySet (org.osate.aadl2.PropertySet)4 AadlPackage (org.osate.aadl2.AadlPackage)3 Element (org.osate.aadl2.Element)3 PackageSection (org.osate.aadl2.PackageSection)3 List (java.util.List)2 QName (javax.xml.namespace.QName)2 EOperation (org.eclipse.emf.ecore.EOperation)2 EReference (org.eclipse.emf.ecore.EReference)2 AadlString (org.osate.aadl2.AadlString)2