Search in sources :

Example 91 with NotificationChain

use of org.eclipse.emf.common.notify.NotificationChain in project openhab1-addons by openhab.

the class MBrickletMoistureImpl method setBrickd.

/**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * 
     * @generated
     */
@Override
public void setBrickd(MBrickd newBrickd) {
    if (newBrickd != eInternalContainer() || (eContainerFeatureID() != ModelPackage.MBRICKLET_MOISTURE__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_MOISTURE__BRICKD, newBrickd, newBrickd));
}
Also used : NotificationChain(org.eclipse.emf.common.notify.NotificationChain) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) InternalEObject(org.eclipse.emf.ecore.InternalEObject)

Example 92 with NotificationChain

use of org.eclipse.emf.common.notify.NotificationChain in project openhab1-addons by openhab.

the class MBrickletLEDStripImpl method setTfConfig.

/**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * 
     * @generated
     */
@Override
public void setTfConfig(LEDStripConfiguration newTfConfig) {
    if (newTfConfig != tfConfig) {
        NotificationChain msgs = null;
        if (tfConfig != null)
            msgs = ((InternalEObject) tfConfig).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ModelPackage.MBRICKLET_LED_STRIP__TF_CONFIG, null, msgs);
        if (newTfConfig != null)
            msgs = ((InternalEObject) newTfConfig).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ModelPackage.MBRICKLET_LED_STRIP__TF_CONFIG, null, msgs);
        msgs = basicSetTfConfig(newTfConfig, msgs);
        if (msgs != null)
            msgs.dispatch();
    } else if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.MBRICKLET_LED_STRIP__TF_CONFIG, newTfConfig, newTfConfig));
}
Also used : NotificationChain(org.eclipse.emf.common.notify.NotificationChain) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) InternalEObject(org.eclipse.emf.ecore.InternalEObject)

Example 93 with NotificationChain

use of org.eclipse.emf.common.notify.NotificationChain in project openhab1-addons by openhab.

the class MBrickletLinearPotiImpl method setBrickd.

/**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * 
     * @generated
     */
@Override
public void setBrickd(MBrickd newBrickd) {
    if (newBrickd != eInternalContainer() || (eContainerFeatureID() != ModelPackage.MBRICKLET_LINEAR_POTI__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_LINEAR_POTI__BRICKD, newBrickd, newBrickd));
}
Also used : NotificationChain(org.eclipse.emf.common.notify.NotificationChain) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) InternalEObject(org.eclipse.emf.ecore.InternalEObject)

Example 94 with NotificationChain

use of org.eclipse.emf.common.notify.NotificationChain in project openhab1-addons by openhab.

the class MBrickletThermocoupleImpl method setBrickd.

/**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     *
     * @generated
     */
@Override
public void setBrickd(MBrickd newBrickd) {
    if (newBrickd != eInternalContainer() || (eContainerFeatureID() != ModelPackage.MBRICKLET_THERMOCOUPLE__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_THERMOCOUPLE__BRICKD, newBrickd, newBrickd));
    }
}
Also used : NotificationChain(org.eclipse.emf.common.notify.NotificationChain) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) MBrickd(org.openhab.binding.tinkerforge.internal.model.MBrickd)

Example 95 with NotificationChain

use of org.eclipse.emf.common.notify.NotificationChain in project openhab1-addons by openhab.

the class MBrickletTiltImpl method setBrickd.

/**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * 
     * @generated
     */
@Override
public void setBrickd(MBrickd newBrickd) {
    if (newBrickd != eInternalContainer() || (eContainerFeatureID() != ModelPackage.MBRICKLET_TILT__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_TILT__BRICKD, newBrickd, newBrickd));
}
Also used : NotificationChain(org.eclipse.emf.common.notify.NotificationChain) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) InternalEObject(org.eclipse.emf.ecore.InternalEObject)

Aggregations

NotificationChain (org.eclipse.emf.common.notify.NotificationChain)629 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)629 InternalEObject (org.eclipse.emf.ecore.InternalEObject)607 MSubDeviceHolder (org.openhab.binding.tinkerforge.internal.model.MSubDeviceHolder)12 MBrickd (org.openhab.binding.tinkerforge.internal.model.MBrickd)5