Search in sources :

Example 1 with PropertyNameField

use of org.osate.ba.aadlba.PropertyNameField in project osate2 by osate.

the class AadlBaNameResolver method propertyFieldResolution.

private boolean propertyFieldResolution(DeclarativePropertyName declProName) {
    PropertyNameField field = declProName.getField();
    Element el = declProName.getOsateRef();
    BasicProperty bProperty = getPropertyDeclaration(el);
    int nameTypeId = bProperty.getPropertyType().eClass().getClassifierID();
    // type.
    if (nameTypeId == Aadl2Package.RANGE_TYPE) {
        return true;
    } else {
        String msg = "upper or lower bound keyword are only supported for" + " range property type";
        _errManager.error(field, msg);
        return false;
    }
}
Also used : BasicProperty(org.osate.aadl2.BasicProperty) ContainmentPathElement(org.osate.aadl2.ContainmentPathElement) QualifiedNamedElement(org.osate.ba.declarative.QualifiedNamedElement) DeclarativeBehaviorElement(org.osate.ba.declarative.DeclarativeBehaviorElement) NamedElement(org.osate.aadl2.NamedElement) Element(org.osate.aadl2.Element) BehaviorElement(org.osate.ba.aadlba.BehaviorElement) PropertyNameField(org.osate.ba.aadlba.PropertyNameField)

Example 2 with PropertyNameField

use of org.osate.ba.aadlba.PropertyNameField in project osate2 by osate.

the class DeclarativePropertyNameImpl method basicSetField.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetField(PropertyNameField newField, NotificationChain msgs) {
    PropertyNameField oldField = field;
    field = newField;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DeclarativePackage.DECLARATIVE_PROPERTY_NAME__FIELD, oldField, newField);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) PropertyNameField(org.osate.ba.aadlba.PropertyNameField)

Example 3 with PropertyNameField

use of org.osate.ba.aadlba.PropertyNameField in project osate2 by osate.

the class AadlBaParserVisitor method clonePropertyNameField.

private PropertyNameField clonePropertyNameField(PropertyNameField field) {
    PropertyNameField result = null;
    if (field instanceof LowerBound) {
        result = _baFact.createLowerBound();
    } else if (field instanceof UpperBound) {
        result = _baFact.createUpperBound();
    }
    result.setLocationReference(field.getLocationReference());
    return result;
}
Also used : LowerBound(org.osate.ba.aadlba.LowerBound) UpperBound(org.osate.ba.aadlba.UpperBound) PropertyNameField(org.osate.ba.aadlba.PropertyNameField)

Example 4 with PropertyNameField

use of org.osate.ba.aadlba.PropertyNameField in project osate2 by osate.

the class PropertyNameHolderImpl method basicUnsetField.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicUnsetField(NotificationChain msgs) {
    PropertyNameField oldField = field;
    field = null;
    boolean oldFieldESet = fieldESet;
    fieldESet = false;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.UNSET, AadlBaPackage.PROPERTY_NAME_HOLDER__FIELD, oldField, null, oldFieldESet);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) PropertyNameField(org.osate.ba.aadlba.PropertyNameField)

Example 5 with PropertyNameField

use of org.osate.ba.aadlba.PropertyNameField in project osate2 by osate.

the class PropertyNameHolderImpl method basicSetField.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetField(PropertyNameField newField, NotificationChain msgs) {
    PropertyNameField oldField = field;
    field = newField;
    boolean oldFieldESet = fieldESet;
    fieldESet = true;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, AadlBaPackage.PROPERTY_NAME_HOLDER__FIELD, oldField, newField, !oldFieldESet);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) PropertyNameField(org.osate.ba.aadlba.PropertyNameField)

Aggregations

PropertyNameField (org.osate.ba.aadlba.PropertyNameField)5 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)3 BasicProperty (org.osate.aadl2.BasicProperty)1 ContainmentPathElement (org.osate.aadl2.ContainmentPathElement)1 Element (org.osate.aadl2.Element)1 NamedElement (org.osate.aadl2.NamedElement)1 BehaviorElement (org.osate.ba.aadlba.BehaviorElement)1 LowerBound (org.osate.ba.aadlba.LowerBound)1 UpperBound (org.osate.ba.aadlba.UpperBound)1 DeclarativeBehaviorElement (org.osate.ba.declarative.DeclarativeBehaviorElement)1 QualifiedNamedElement (org.osate.ba.declarative.QualifiedNamedElement)1