Search in sources :

Example 51 with ENotificationImpl

use of org.eclipse.emf.ecore.impl.ENotificationImpl in project mechanoid by robotoworks.

the class UpdateStatementImpl method setConflictResolution.

/**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
public void setConflictResolution(ConflictResolution newConflictResolution) {
    ConflictResolution oldConflictResolution = conflictResolution;
    conflictResolution = newConflictResolution == null ? CONFLICT_RESOLUTION_EDEFAULT : newConflictResolution;
    if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, SqliteModelPackage.UPDATE_STATEMENT__CONFLICT_RESOLUTION, oldConflictResolution, conflictResolution));
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) ConflictResolution(com.robotoworks.mechanoid.db.sqliteModel.ConflictResolution)

Example 52 with ENotificationImpl

use of org.eclipse.emf.ecore.impl.ENotificationImpl in project mechanoid by robotoworks.

the class UpdateStatementImpl method setWhereExpression.

/**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
public void setWhereExpression(Expression newWhereExpression) {
    if (newWhereExpression != whereExpression) {
        NotificationChain msgs = null;
        if (whereExpression != null)
            msgs = ((InternalEObject) whereExpression).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SqliteModelPackage.UPDATE_STATEMENT__WHERE_EXPRESSION, null, msgs);
        if (newWhereExpression != null)
            msgs = ((InternalEObject) newWhereExpression).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SqliteModelPackage.UPDATE_STATEMENT__WHERE_EXPRESSION, null, msgs);
        msgs = basicSetWhereExpression(newWhereExpression, msgs);
        if (msgs != null)
            msgs.dispatch();
    } else if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, SqliteModelPackage.UPDATE_STATEMENT__WHERE_EXPRESSION, newWhereExpression, newWhereExpression));
}
Also used : NotificationChain(org.eclipse.emf.common.notify.NotificationChain) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) InternalEObject(org.eclipse.emf.ecore.InternalEObject)

Example 53 with ENotificationImpl

use of org.eclipse.emf.ecore.impl.ENotificationImpl in project mechanoid by robotoworks.

the class UpdateStatementImpl method getTable.

/**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
public TableDefinition getTable() {
    if (table != null && table.eIsProxy()) {
        InternalEObject oldTable = (InternalEObject) table;
        table = (TableDefinition) eResolveProxy(oldTable);
        if (table != oldTable) {
            if (eNotificationRequired())
                eNotify(new ENotificationImpl(this, Notification.RESOLVE, SqliteModelPackage.UPDATE_STATEMENT__TABLE, oldTable, table));
        }
    }
    return table;
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) InternalEObject(org.eclipse.emf.ecore.InternalEObject)

Example 54 with ENotificationImpl

use of org.eclipse.emf.ecore.impl.ENotificationImpl in project mechanoid by robotoworks.

the class WhereExpressionsImpl method setExpression.

/**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
public void setExpression(Expression newExpression) {
    if (newExpression != expression) {
        NotificationChain msgs = null;
        if (expression != null)
            msgs = ((InternalEObject) expression).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SqliteModelPackage.WHERE_EXPRESSIONS__EXPRESSION, null, msgs);
        if (newExpression != null)
            msgs = ((InternalEObject) newExpression).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SqliteModelPackage.WHERE_EXPRESSIONS__EXPRESSION, null, msgs);
        msgs = basicSetExpression(newExpression, msgs);
        if (msgs != null)
            msgs.dispatch();
    } else if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, SqliteModelPackage.WHERE_EXPRESSIONS__EXPRESSION, newExpression, newExpression));
}
Also used : NotificationChain(org.eclipse.emf.common.notify.NotificationChain) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) InternalEObject(org.eclipse.emf.ecore.InternalEObject)

Example 55 with ENotificationImpl

use of org.eclipse.emf.ecore.impl.ENotificationImpl in project mechanoid by robotoworks.

the class BodyBlockImpl method basicSetType.

/**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
public NotificationChain basicSetType(BlockType newType, NotificationChain msgs) {
    BlockType oldType = type;
    type = newType;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, NetModelPackage.BODY_BLOCK__TYPE, oldType, newType);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : BlockType(com.robotoworks.mechanoid.net.netModel.BlockType) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Aggregations

ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)2023 InternalEObject (org.eclipse.emf.ecore.InternalEObject)773 NotificationChain (org.eclipse.emf.common.notify.NotificationChain)629 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)111 Logger (org.slf4j.Logger)110 IPConnection (com.tinkerforge.IPConnection)51 DecimalValue (org.openhab.binding.tinkerforge.internal.types.DecimalValue)51 BigDecimal (java.math.BigDecimal)47 Expression (com.robotoworks.mechanoid.db.sqliteModel.Expression)38 Expression (org.eclipse.xtext.testlanguages.backtracking.beeLangTestLanguage.Expression)28 TFBaseConfiguration (org.openhab.binding.tinkerforge.internal.model.TFBaseConfiguration)26 HighLowValue (org.openhab.binding.tinkerforge.internal.types.HighLowValue)17 OnOffValue (org.openhab.binding.tinkerforge.internal.types.OnOffValue)15 EObject (org.eclipse.emf.ecore.EObject)12 XExpression (org.eclipse.xtext.xbase.XExpression)12 MSubDeviceHolder (org.openhab.binding.tinkerforge.internal.model.MSubDeviceHolder)12 TableDefinition (com.robotoworks.mechanoid.db.sqliteModel.TableDefinition)9 Expression (org.eclipse.xtext.xtext.generator.parser.antlr.splitting.simpleExpressions.Expression)8 Expression (org.eclipse.xtext.resource.bug385636.Expression)7 Expression_VariableName (org.eclipse.xtext.resource.bug385636.Expression_VariableName)7