diff options
| author | Mélanie Bats | 2017-07-21 08:36:48 +0000 |
|---|---|---|
| committer | Pierre-Charles David | 2017-08-07 08:33:55 +0000 |
| commit | 32f641c4a2b7038084e0f460a2ef0e3d7dfaa1e4 (patch) | |
| tree | 01cc2db5573779d8934ee6311c00fa49e4791b99 | |
| parent | c25ad5c4af16642a2307194af312a035ab6932fa (diff) | |
| download | org.eclipse.sirius-32f641c4a2b7038084e0f460a2ef0e3d7dfaa1e4.tar.gz org.eclipse.sirius-32f641c4a2b7038084e0f460a2ef0e3d7dfaa1e4.tar.xz org.eclipse.sirius-32f641c4a2b7038084e0f460a2ef0e3d7dfaa1e4.zip | |
[519552] Converter does not translate Sirius name to EEF identifier
Bug: 519552
Change-Id: I4520b1fe363f13f978115db5e80100f3e3cc1be0
Signed-off-by: Mélanie Bats <melanie.bats@obeo.fr>
| -rw-r--r-- | plugins/org.eclipse.sirius.properties.core/src/org/eclipse/sirius/properties/core/api/DefaultDescriptionConverter.java | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/plugins/org.eclipse.sirius.properties.core/src/org/eclipse/sirius/properties/core/api/DefaultDescriptionConverter.java b/plugins/org.eclipse.sirius.properties.core/src/org/eclipse/sirius/properties/core/api/DefaultDescriptionConverter.java index 09228ee93e..e0063fd35c 100644 --- a/plugins/org.eclipse.sirius.properties.core/src/org/eclipse/sirius/properties/core/api/DefaultDescriptionConverter.java +++ b/plugins/org.eclipse.sirius.properties.core/src/org/eclipse/sirius/properties/core/api/DefaultDescriptionConverter.java @@ -25,10 +25,11 @@ import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.ecore.EcorePackage; import org.eclipse.sirius.properties.core.internal.Messages; +import org.eclipse.sirius.viewpoint.description.DescriptionPackage; /** - * This class can be used to convert any kind of Sirius object to an EEF one - * using the name of their structural features. + * This class can be used to convert any kind of Sirius object to an EEF one using the name of their structural + * features. * * @author sbegaudeau * @@ -97,8 +98,7 @@ public class DefaultDescriptionConverter<SIRIUS extends EObject> extends Abstrac } /** - * Converts the value of the given Sirius EAttribute from the Sirius EObject - * to the given EEF EObject. + * Converts the value of the given Sirius EAttribute from the Sirius EObject to the given EEF EObject. * * @param siriusEObject * The Sirius EObject @@ -118,12 +118,16 @@ public class DefaultDescriptionConverter<SIRIUS extends EObject> extends Abstrac Object value = siriusEObject.eGet(eAttribute); eefEObject.eSet(eefEStructuralFeature, Integer.toString(Integer.valueOf(value.toString()))); } + } else { + eefEStructuralFeature = eefEObject.eClass().getEStructuralFeature("identifier"); //$NON-NLS-1$ + if (eAttribute.equals(DescriptionPackage.Literals.IDENTIFIED_ELEMENT__NAME) && eefEStructuralFeature instanceof EAttribute) { + eefEObject.eSet(eefEStructuralFeature, siriusEObject.eGet(DescriptionPackage.Literals.IDENTIFIED_ELEMENT__NAME)); + } } } /** - * Converts the value of the given Sirius EReference from the Sirius EObject - * to the given EEF EObject. + * Converts the value of the given Sirius EReference from the Sirius EObject to the given EEF EObject. * * @param siriusEObject * The Sirius EObject |
