use of org.eclipse.emf.common.notify.NotificationChain in project openhab1-addons by openhab.
the class RemoteSwitchAImpl method setMbrick.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public void setMbrick(MBrickletRemoteSwitch newMbrick) {
if (newMbrick != eInternalContainer() || (eContainerFeatureID() != ModelPackage.REMOTE_SWITCH_A__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.REMOTE_SWITCH_A__MBRICK, newMbrick, newMbrick));
}
use of org.eclipse.emf.common.notify.NotificationChain in project openhab1-addons by openhab.
the class RemoteSwitchBImpl method setTfConfig.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public void setTfConfig(RemoteSwitchBConfiguration newTfConfig) {
if (newTfConfig != tfConfig) {
NotificationChain msgs = null;
if (tfConfig != null)
msgs = ((InternalEObject) tfConfig).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ModelPackage.REMOTE_SWITCH_B__TF_CONFIG, null, msgs);
if (newTfConfig != null)
msgs = ((InternalEObject) newTfConfig).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ModelPackage.REMOTE_SWITCH_B__TF_CONFIG, null, msgs);
msgs = basicSetTfConfig(newTfConfig, msgs);
if (msgs != null)
msgs.dispatch();
} else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.REMOTE_SWITCH_B__TF_CONFIG, newTfConfig, newTfConfig));
}
use of org.eclipse.emf.common.notify.NotificationChain in project openhab1-addons by openhab.
the class RemoteSwitchCImpl method setTfConfig.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public void setTfConfig(RemoteSwitchCConfiguration newTfConfig) {
if (newTfConfig != tfConfig) {
NotificationChain msgs = null;
if (tfConfig != null)
msgs = ((InternalEObject) tfConfig).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ModelPackage.REMOTE_SWITCH_C__TF_CONFIG, null, msgs);
if (newTfConfig != null)
msgs = ((InternalEObject) newTfConfig).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ModelPackage.REMOTE_SWITCH_C__TF_CONFIG, null, msgs);
msgs = basicSetTfConfig(newTfConfig, msgs);
if (msgs != null)
msgs.dispatch();
} else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.REMOTE_SWITCH_C__TF_CONFIG, newTfConfig, newTfConfig));
}
use of org.eclipse.emf.common.notify.NotificationChain in project openhab1-addons by openhab.
the class RotaryEncoderButtonImpl method setTfConfig.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public void setTfConfig(ButtonConfiguration newTfConfig) {
if (newTfConfig != tfConfig) {
NotificationChain msgs = null;
if (tfConfig != null)
msgs = ((InternalEObject) tfConfig).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ModelPackage.ROTARY_ENCODER_BUTTON__TF_CONFIG, null, msgs);
if (newTfConfig != null)
msgs = ((InternalEObject) newTfConfig).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ModelPackage.ROTARY_ENCODER_BUTTON__TF_CONFIG, null, msgs);
msgs = basicSetTfConfig(newTfConfig, msgs);
if (msgs != null)
msgs.dispatch();
} else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.ROTARY_ENCODER_BUTTON__TF_CONFIG, newTfConfig, newTfConfig));
}
use of org.eclipse.emf.common.notify.NotificationChain in project openhab1-addons by openhab.
the class MStepperStatusLedImpl method setMbrick.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public void setMbrick(MBrickStepper newMbrick) {
if (newMbrick != eInternalContainer() || (eContainerFeatureID() != ModelPackage.MSTEPPER_STATUS_LED__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.MSTEPPER_STATUS_LED__MBRICK, newMbrick, newMbrick));
}
}
Aggregations