use of org.eclipse.emf.common.notify.NotificationChain in project openhab1-addons by openhab.
the class MBrickletDustDetectorImpl method setBrickd.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public void setBrickd(MBrickd newBrickd) {
if (newBrickd != eInternalContainer() || (eContainerFeatureID() != ModelPackage.MBRICKLET_DUST_DETECTOR__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_DUST_DETECTOR__BRICKD, newBrickd, newBrickd));
}
use of org.eclipse.emf.common.notify.NotificationChain in project openhab1-addons by openhab.
the class MBrickletBarometerImpl method setBrickd.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public void setBrickd(MBrickd newBrickd) {
if (newBrickd != eInternalContainer() || (eContainerFeatureID() != ModelPackage.MBRICKLET_BAROMETER__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_BAROMETER__BRICKD, newBrickd, newBrickd));
}
use of org.eclipse.emf.common.notify.NotificationChain in project openhab1-addons by openhab.
the class MultiTouchDeviceImpl method setMbrick.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public void setMbrick(MBrickletMultiTouch newMbrick) {
if (newMbrick != eInternalContainer() || (eContainerFeatureID() != ModelPackage.MULTI_TOUCH_DEVICE__MBRICK && newMbrick != null)) {
if (EcoreUtil.isAncestor(this, newMbrick))
throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
NotificationChain msgs = null;
if (eInternalContainer() != null)
msgs = eBasicRemoveFromContainer(msgs);
if (newMbrick != null)
msgs = ((InternalEObject) newMbrick).eInverseAdd(this, ModelPackage.MSUB_DEVICE_HOLDER__MSUBDEVICES, MSubDeviceHolder.class, msgs);
msgs = basicSetMbrick(newMbrick, msgs);
if (msgs != null)
msgs.dispatch();
} else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.MULTI_TOUCH_DEVICE__MBRICK, newMbrick, newMbrick));
}
use of org.eclipse.emf.common.notify.NotificationChain in project openhab1-addons by openhab.
the class ObjectTemperatureImpl method setTfConfig.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public void setTfConfig(TFObjectTemperatureConfiguration newTfConfig) {
if (newTfConfig != tfConfig) {
NotificationChain msgs = null;
if (tfConfig != null)
msgs = ((InternalEObject) tfConfig).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ModelPackage.OBJECT_TEMPERATURE__TF_CONFIG, null, msgs);
if (newTfConfig != null)
msgs = ((InternalEObject) newTfConfig).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ModelPackage.OBJECT_TEMPERATURE__TF_CONFIG, null, msgs);
msgs = basicSetTfConfig(newTfConfig, msgs);
if (msgs != null)
msgs.dispatch();
} else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.OBJECT_TEMPERATURE__TF_CONFIG, newTfConfig, newTfConfig));
}
use of org.eclipse.emf.common.notify.NotificationChain in project openhab1-addons by openhab.
the class ObjectTemperatureImpl method setMbrick.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public void setMbrick(MBrickletTemperatureIR newMbrick) {
if (newMbrick != eInternalContainer() || (eContainerFeatureID() != ModelPackage.OBJECT_TEMPERATURE__MBRICK && newMbrick != null)) {
if (EcoreUtil.isAncestor(this, newMbrick))
throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
NotificationChain msgs = null;
if (eInternalContainer() != null)
msgs = eBasicRemoveFromContainer(msgs);
if (newMbrick != null)
msgs = ((InternalEObject) newMbrick).eInverseAdd(this, ModelPackage.MSUB_DEVICE_HOLDER__MSUBDEVICES, MSubDeviceHolder.class, msgs);
msgs = basicSetMbrick(newMbrick, msgs);
if (msgs != null)
msgs.dispatch();
} else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.OBJECT_TEMPERATURE__MBRICK, newMbrick, newMbrick));
}
Aggregations