use of org.eclipse.emf.common.notify.NotificationChain in project openhab1-addons by openhab.
the class MBrickletAnalogOutV2Impl method setBrickd.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public void setBrickd(MBrickd newBrickd) {
if (newBrickd != eInternalContainer() || (eContainerFeatureID() != ModelPackage.MBRICKLET_ANALOG_OUT_V2__BRICKD && newBrickd != null)) {
if (EcoreUtil.isAncestor(this, newBrickd))
throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
NotificationChain msgs = null;
if (eInternalContainer() != null)
msgs = eBasicRemoveFromContainer(msgs);
if (newBrickd != null)
msgs = ((InternalEObject) newBrickd).eInverseAdd(this, ModelPackage.MBRICKD__MDEVICES, MBrickd.class, msgs);
msgs = basicSetBrickd(newBrickd, msgs);
if (msgs != null)
msgs.dispatch();
} else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.MBRICKLET_ANALOG_OUT_V2__BRICKD, newBrickd, newBrickd));
}
use of org.eclipse.emf.common.notify.NotificationChain in project openhab1-addons by openhab.
the class MBrickletDustDetectorImpl method setTfConfig.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public void setTfConfig(TFBaseConfiguration newTfConfig) {
if (newTfConfig != tfConfig) {
NotificationChain msgs = null;
if (tfConfig != null)
msgs = ((InternalEObject) tfConfig).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ModelPackage.MBRICKLET_DUST_DETECTOR__TF_CONFIG, null, msgs);
if (newTfConfig != null)
msgs = ((InternalEObject) newTfConfig).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ModelPackage.MBRICKLET_DUST_DETECTOR__TF_CONFIG, null, msgs);
msgs = basicSetTfConfig(newTfConfig, msgs);
if (msgs != null)
msgs.dispatch();
} else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.MBRICKLET_DUST_DETECTOR__TF_CONFIG, newTfConfig, newTfConfig));
}
use of org.eclipse.emf.common.notify.NotificationChain in project openhab1-addons by openhab.
the class MBrickletHallEffectImpl method setTfConfig.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public void setTfConfig(TFBaseConfiguration newTfConfig) {
if (newTfConfig != tfConfig) {
NotificationChain msgs = null;
if (tfConfig != null)
msgs = ((InternalEObject) tfConfig).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ModelPackage.MBRICKLET_HALL_EFFECT__TF_CONFIG, null, msgs);
if (newTfConfig != null)
msgs = ((InternalEObject) newTfConfig).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ModelPackage.MBRICKLET_HALL_EFFECT__TF_CONFIG, null, msgs);
msgs = basicSetTfConfig(newTfConfig, msgs);
if (msgs != null)
msgs.dispatch();
} else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.MBRICKLET_HALL_EFFECT__TF_CONFIG, newTfConfig, newTfConfig));
}
use of org.eclipse.emf.common.notify.NotificationChain in project openhab1-addons by openhab.
the class MBrickletDistanceIRImpl method setBrickd.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public void setBrickd(MBrickd newBrickd) {
if (newBrickd != eInternalContainer() || (eContainerFeatureID() != ModelPackage.MBRICKLET_DISTANCE_IR__BRICKD && newBrickd != null)) {
if (EcoreUtil.isAncestor(this, newBrickd))
throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
NotificationChain msgs = null;
if (eInternalContainer() != null)
msgs = eBasicRemoveFromContainer(msgs);
if (newBrickd != null)
msgs = ((InternalEObject) newBrickd).eInverseAdd(this, ModelPackage.MBRICKD__MDEVICES, MBrickd.class, msgs);
msgs = basicSetBrickd(newBrickd, msgs);
if (msgs != null)
msgs.dispatch();
} else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.MBRICKLET_DISTANCE_IR__BRICKD, newBrickd, newBrickd));
}
use of org.eclipse.emf.common.notify.NotificationChain in project openhab1-addons by openhab.
the class MBrickletDistanceUSImpl method setBrickd.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public void setBrickd(MBrickd newBrickd) {
if (newBrickd != eInternalContainer() || (eContainerFeatureID() != ModelPackage.MBRICKLET_DISTANCE_US__BRICKD && newBrickd != null)) {
if (EcoreUtil.isAncestor(this, newBrickd))
throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
NotificationChain msgs = null;
if (eInternalContainer() != null)
msgs = eBasicRemoveFromContainer(msgs);
if (newBrickd != null)
msgs = ((InternalEObject) newBrickd).eInverseAdd(this, ModelPackage.MBRICKD__MDEVICES, MBrickd.class, msgs);
msgs = basicSetBrickd(newBrickd, msgs);
if (msgs != null)
msgs.dispatch();
} else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.MBRICKLET_DISTANCE_US__BRICKD, newBrickd, newBrickd));
}
Aggregations