Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/impl/PropertiesMapEntryImpl.java')
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/impl/PropertiesMapEntryImpl.java44
1 files changed, 33 insertions, 11 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/impl/PropertiesMapEntryImpl.java b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/impl/PropertiesMapEntryImpl.java
index 80a928dc5f..1176c3dd1f 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/impl/PropertiesMapEntryImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/impl/PropertiesMapEntryImpl.java
@@ -110,7 +110,9 @@ public class PropertiesMapEntryImpl extends EObjectImpl implements BasicEMap.Ent
String oldKey = key;
key = newKey;
if (eNotificationRequired())
+ {
eNotify(new ENotificationImpl(this, Notification.SET, Model6Package.PROPERTIES_MAP_ENTRY__KEY, oldKey, key));
+ }
}
/**
@@ -127,18 +129,22 @@ public class PropertiesMapEntryImpl extends EObjectImpl implements BasicEMap.Ent
if (value != oldValue)
{
InternalEObject newValue = (InternalEObject)value;
- NotificationChain msgs = oldValue.eInverseRemove(this, EOPPOSITE_FEATURE_BASE
- - Model6Package.PROPERTIES_MAP_ENTRY__VALUE, null, null);
+ NotificationChain msgs = oldValue.eInverseRemove(this,
+ EOPPOSITE_FEATURE_BASE - Model6Package.PROPERTIES_MAP_ENTRY__VALUE, null, null);
if (newValue.eInternalContainer() == null)
{
msgs = newValue.eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Model6Package.PROPERTIES_MAP_ENTRY__VALUE, null,
msgs);
}
if (msgs != null)
+ {
msgs.dispatch();
+ }
if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, Model6Package.PROPERTIES_MAP_ENTRY__VALUE,
- oldValue, value));
+ {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, Model6Package.PROPERTIES_MAP_ENTRY__VALUE, oldValue,
+ value));
+ }
}
}
return value;
@@ -168,9 +174,13 @@ public class PropertiesMapEntryImpl extends EObjectImpl implements BasicEMap.Ent
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
Model6Package.PROPERTIES_MAP_ENTRY__VALUE, oldValue, newValue);
if (msgs == null)
+ {
msgs = notification;
+ }
else
+ {
msgs.add(notification);
+ }
}
return msgs;
}
@@ -186,18 +196,26 @@ public class PropertiesMapEntryImpl extends EObjectImpl implements BasicEMap.Ent
{
NotificationChain msgs = null;
if (value != null)
- msgs = ((InternalEObject)value).eInverseRemove(this, EOPPOSITE_FEATURE_BASE
- - Model6Package.PROPERTIES_MAP_ENTRY__VALUE, null, msgs);
+ {
+ msgs = ((InternalEObject)value).eInverseRemove(this,
+ EOPPOSITE_FEATURE_BASE - Model6Package.PROPERTIES_MAP_ENTRY__VALUE, null, msgs);
+ }
if (newValue != null)
- msgs = ((InternalEObject)newValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE
- - Model6Package.PROPERTIES_MAP_ENTRY__VALUE, null, msgs);
+ {
+ msgs = ((InternalEObject)newValue).eInverseAdd(this,
+ EOPPOSITE_FEATURE_BASE - Model6Package.PROPERTIES_MAP_ENTRY__VALUE, null, msgs);
+ }
msgs = basicSetTypedValue(newValue, msgs);
if (msgs != null)
+ {
msgs.dispatch();
+ }
}
else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, Model6Package.PROPERTIES_MAP_ENTRY__VALUE, newValue,
- newValue));
+ {
+ eNotify(
+ new ENotificationImpl(this, Notification.SET, Model6Package.PROPERTIES_MAP_ENTRY__VALUE, newValue, newValue));
+ }
}
/**
@@ -230,7 +248,9 @@ public class PropertiesMapEntryImpl extends EObjectImpl implements BasicEMap.Ent
return getTypedKey();
case Model6Package.PROPERTIES_MAP_ENTRY__VALUE:
if (resolve)
+ {
return getTypedValue();
+ }
return basicGetTypedValue();
}
return super.eGet(featureID, resolve, coreType);
@@ -303,7 +323,9 @@ public class PropertiesMapEntryImpl extends EObjectImpl implements BasicEMap.Ent
public String toString()
{
if (eIsProxy())
+ {
return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (key: ");
@@ -329,7 +351,7 @@ public class PropertiesMapEntryImpl extends EObjectImpl implements BasicEMap.Ent
if (hash == -1)
{
Object theKey = getKey();
- hash = (theKey == null ? 0 : theKey.hashCode());
+ hash = theKey == null ? 0 : theKey.hashCode();
}
return hash;
}

Back to the top