Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas FAUVERGUE2016-12-12 17:34:55 +0000
committerNicolas FAUVERGUE2016-12-12 17:34:55 +0000
commitae67c45ad621775da6dc1965a582ce3fbeea6fc6 (patch)
tree23239c8d7d807c51f2b1d1fc7a9b4274029bb6be /plugins/infra
parentf9263edfd5e1b9381190c63a9781213290df3f9d (diff)
downloadorg.eclipse.papyrus-ae67c45ad621775da6dc1965a582ce3fbeea6fc6.tar.gz
org.eclipse.papyrus-ae67c45ad621775da6dc1965a582ce3fbeea6fc6.tar.xz
org.eclipse.papyrus-ae67c45ad621775da6dc1965a582ce3fbeea6fc6.zip
Bug 509101: [Internationalization] Library entries feature must be
containment https://bugs.eclipse.org/bugs/show_bug.cgi?id=509101 - Modify the entries feature to be in containment Change-Id: I4bad2d07b82e8d90cf8eb314e949622487d23801 Signed-off-by: Nicolas FAUVERGUE <nicolas.fauvergue@cea.fr>
Diffstat (limited to 'plugins/infra')
-rw-r--r--plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/model/Internationalization.ecore2
-rw-r--r--plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src-gen/org/eclipse/papyrus/infra/internationalization/InternationalizationLibrary.java6
-rw-r--r--plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src-gen/org/eclipse/papyrus/infra/internationalization/InternationalizationPackage.java8
-rw-r--r--plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src-gen/org/eclipse/papyrus/infra/internationalization/impl/InternationalizationEntryImpl.java4
-rw-r--r--plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src-gen/org/eclipse/papyrus/infra/internationalization/impl/InternationalizationLibraryImpl.java24
-rw-r--r--plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src-gen/org/eclipse/papyrus/infra/internationalization/impl/InternationalizationPackageImpl.java2
6 files changed, 31 insertions, 15 deletions
diff --git a/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/model/Internationalization.ecore b/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/model/Internationalization.ecore
index 462ae055ec6..b677af199d3 100644
--- a/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/model/Internationalization.ecore
+++ b/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/model/Internationalization.ecore
@@ -4,7 +4,7 @@
nsPrefix="internationalization">
<eClassifiers xsi:type="ecore:EClass" name="InternationalizationLibrary">
<eStructuralFeatures xsi:type="ecore:EReference" name="entries" upperBound="-1"
- eType="#//InternationalizationEntry"/>
+ eType="#//InternationalizationEntry" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="InternationalizationEntry">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="key" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
diff --git a/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src-gen/org/eclipse/papyrus/infra/internationalization/InternationalizationLibrary.java b/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src-gen/org/eclipse/papyrus/infra/internationalization/InternationalizationLibrary.java
index c591a85a255..1f4f38e9a71 100644
--- a/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src-gen/org/eclipse/papyrus/infra/internationalization/InternationalizationLibrary.java
+++ b/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src-gen/org/eclipse/papyrus/infra/internationalization/InternationalizationLibrary.java
@@ -33,7 +33,7 @@ import org.eclipse.emf.ecore.EObject;
*/
public interface InternationalizationLibrary extends EObject {
/**
- * Returns the value of the '<em><b>Entries</b></em>' reference list.
+ * Returns the value of the '<em><b>Entries</b></em>' containment reference list.
* The list contents are of type {@link org.eclipse.papyrus.infra.internationalization.InternationalizationEntry}.
* <!-- begin-user-doc -->
* <p>
@@ -41,9 +41,9 @@ public interface InternationalizationLibrary extends EObject {
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- * @return the value of the '<em>Entries</em>' reference list.
+ * @return the value of the '<em>Entries</em>' containment reference list.
* @see org.eclipse.papyrus.infra.internationalization.InternationalizationPackage#getInternationalizationLibrary_Entries()
- * @model
+ * @model containment="true"
* @generated
*/
EList<InternationalizationEntry> getEntries();
diff --git a/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src-gen/org/eclipse/papyrus/infra/internationalization/InternationalizationPackage.java b/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src-gen/org/eclipse/papyrus/infra/internationalization/InternationalizationPackage.java
index 8e3da3cc47b..8a218da42c6 100644
--- a/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src-gen/org/eclipse/papyrus/infra/internationalization/InternationalizationPackage.java
+++ b/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src-gen/org/eclipse/papyrus/infra/internationalization/InternationalizationPackage.java
@@ -77,7 +77,7 @@ public interface InternationalizationPackage extends EPackage {
int INTERNATIONALIZATION_LIBRARY = 0;
/**
- * The feature id for the '<em><b>Entries</b></em>' reference list.
+ * The feature id for the '<em><b>Entries</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -160,10 +160,10 @@ public interface InternationalizationPackage extends EPackage {
EClass getInternationalizationLibrary();
/**
- * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.internationalization.InternationalizationLibrary#getEntries <em>Entries</em>}'.
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.internationalization.InternationalizationLibrary#getEntries <em>Entries</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the meta object for the reference list '<em>Entries</em>'.
+ * @return the meta object for the containment reference list '<em>Entries</em>'.
* @see org.eclipse.papyrus.infra.internationalization.InternationalizationLibrary#getEntries()
* @see #getInternationalizationLibrary()
* @generated
@@ -236,7 +236,7 @@ public interface InternationalizationPackage extends EPackage {
EClass INTERNATIONALIZATION_LIBRARY = eINSTANCE.getInternationalizationLibrary();
/**
- * The meta object literal for the '<em><b>Entries</b></em>' reference list feature.
+ * The meta object literal for the '<em><b>Entries</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
diff --git a/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src-gen/org/eclipse/papyrus/infra/internationalization/impl/InternationalizationEntryImpl.java b/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src-gen/org/eclipse/papyrus/infra/internationalization/impl/InternationalizationEntryImpl.java
index f71b6742ccb..5deb63334af 100644
--- a/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src-gen/org/eclipse/papyrus/infra/internationalization/impl/InternationalizationEntryImpl.java
+++ b/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src-gen/org/eclipse/papyrus/infra/internationalization/impl/InternationalizationEntryImpl.java
@@ -139,10 +139,10 @@ public class InternationalizationEntryImpl extends MinimalEObjectImpl.Container
public void setValue(String newValue) {
String oldValue = value;
value = newValue;
-// if (eNotificationRequired()) {
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET,
InternationalizationPackage.INTERNATIONALIZATION_ENTRY__VALUE, oldValue, value));
-// }
+ }
}
/**
diff --git a/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src-gen/org/eclipse/papyrus/infra/internationalization/impl/InternationalizationLibraryImpl.java b/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src-gen/org/eclipse/papyrus/infra/internationalization/impl/InternationalizationLibraryImpl.java
index d8bc0cd67a4..2352a6712d1 100644
--- a/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src-gen/org/eclipse/papyrus/infra/internationalization/impl/InternationalizationLibraryImpl.java
+++ b/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src-gen/org/eclipse/papyrus/infra/internationalization/impl/InternationalizationLibraryImpl.java
@@ -13,14 +13,16 @@ package org.eclipse.papyrus.infra.internationalization.impl;
import java.util.Collection;
+import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
-import org.eclipse.emf.ecore.util.EObjectResolvingEList;
-
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
import org.eclipse.papyrus.infra.internationalization.InternationalizationEntry;
import org.eclipse.papyrus.infra.internationalization.InternationalizationLibrary;
import org.eclipse.papyrus.infra.internationalization.InternationalizationPackage;
@@ -41,7 +43,7 @@ import org.eclipse.papyrus.infra.internationalization.InternationalizationPackag
public class InternationalizationLibraryImpl extends MinimalEObjectImpl.Container
implements InternationalizationLibrary {
/**
- * The cached value of the '{@link #getEntries() <em>Entries</em>}' reference list.
+ * The cached value of the '{@link #getEntries() <em>Entries</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getEntries()
@@ -77,7 +79,7 @@ public class InternationalizationLibraryImpl extends MinimalEObjectImpl.Containe
@Override
public EList<InternationalizationEntry> getEntries() {
if (entries == null) {
- entries = new EObjectResolvingEList<>(InternationalizationEntry.class, this,
+ entries = new EObjectContainmentEList<>(InternationalizationEntry.class, this,
InternationalizationPackage.INTERNATIONALIZATION_LIBRARY__ENTRIES);
}
return entries;
@@ -89,6 +91,20 @@ public class InternationalizationLibraryImpl extends MinimalEObjectImpl.Containe
* @generated
*/
@Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case InternationalizationPackage.INTERNATIONALIZATION_LIBRARY__ENTRIES:
+ return ((InternalEList<?>) getEntries()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case InternationalizationPackage.INTERNATIONALIZATION_LIBRARY__ENTRIES:
diff --git a/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src-gen/org/eclipse/papyrus/infra/internationalization/impl/InternationalizationPackageImpl.java b/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src-gen/org/eclipse/papyrus/infra/internationalization/impl/InternationalizationPackageImpl.java
index 197e2e23368..a36e1e508b9 100644
--- a/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src-gen/org/eclipse/papyrus/infra/internationalization/impl/InternationalizationPackageImpl.java
+++ b/plugins/infra/internationalization/org.eclipse.papyrus.infra.internationalization/src-gen/org/eclipse/papyrus/infra/internationalization/impl/InternationalizationPackageImpl.java
@@ -234,7 +234,7 @@ public class InternationalizationPackageImpl extends EPackageImpl implements Int
!IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getInternationalizationLibrary_Entries(), this.getInternationalizationEntry(), null, "entries", //$NON-NLS-1$
null, 0, -1, InternationalizationLibrary.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE,
- !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(internationalizationEntryEClass, InternationalizationEntry.class, "InternationalizationEntry", //$NON-NLS-1$
!IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

Back to the top