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;
}
}
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;
}
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;
}
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;
}
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;
}
Aggregations