diff options
| author | Steve Monnier | 2016-04-26 15:13:35 +0000 |
|---|---|---|
| committer | Steve Monnier | 2016-04-27 08:49:12 +0000 |
| commit | d26c35de7e165ff3576616407ee88bd21c77d913 (patch) | |
| tree | 7c836d7f4f26ddaa69f24dae368eea79e7515765 | |
| parent | c6c91e00ce7a10530c11300475d5aa60ce284008 (diff) | |
| download | org.eclipse.sirius-d26c35de7e165ff3576616407ee88bd21c77d913.tar.gz org.eclipse.sirius-d26c35de7e165ff3576616407ee88bd21c77d913.tar.xz org.eclipse.sirius-d26c35de7e165ff3576616407ee88bd21c77d913.zip | |
[490092] JUnit test for multivalued string attribute on table
- Addition of a JUnit test opening a table with a cell displaying a
multivalued string EAttribute.
- Update of the Component metamodel to add a multivalued string
EAttribute named "aliases". Metamodel was re-generated.
- Addition of a TableDescription named "Aliases" in the
component.odesign. It is the TableDescription used by the test that
display the multivalued string EAttribute named "aliases" in a table.
Bug: 490092
Change-Id: I113d06a5b20da61cf0996adfd25a7c7f871ea923
Signed-off-by: Steve Monnier <steve.monnier@obeo.fr>
10 files changed, 258 insertions, 21 deletions
diff --git a/plugins/org.eclipse.sirius.tests.junit/data/table/unit/bugzilla-490092/component.component b/plugins/org.eclipse.sirius.tests.junit/data/table/unit/bugzilla-490092/component.component new file mode 100644 index 0000000000..c5f0313f08 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.junit/data/table/unit/bugzilla-490092/component.component @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="ASCII"?> +<component:Component xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:component="http://www.eclipse.org/sirius/sample/component" name="DC"> + <children name="Bruce Wayne"> + <aliases>Batman</aliases> + <aliases>The Dark Knight</aliases> + <aliases>The world greateast detective</aliases> + </children> +</component:Component> diff --git a/plugins/org.eclipse.sirius.tests.junit/data/table/unit/bugzilla-490092/representations.aird b/plugins/org.eclipse.sirius.tests.junit/data/table/unit/bugzilla-490092/representations.aird new file mode 100644 index 0000000000..fae75720df --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.junit/data/table/unit/bugzilla-490092/representations.aird @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<viewpoint:DAnalysis xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:component="http://www.eclipse.org/sirius/sample/component" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/table/description/1.1.0" xmlns:table="http://www.eclipse.org/sirius/table/1.1.0" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/table/description/1.1.0 http://www.eclipse.org/sirius/table/1.1.0#//description" xmi:id="_fAtUsNOWEeSuFoVE4TCOJg" selectedViews="_CSfnUNOXEeSLVtmbtn12LQ" version="11.0.0.201604141600"> + <semanticResources>component.component</semanticResources> + <semanticResources>platform:/plugin/org.eclipse.sirius.tests.sample.component.design/description/component.odesign</semanticResources> + <semanticResources>environment:/viewpoint</semanticResources> + <ownedViews xmi:type="viewpoint:DView" xmi:id="_CSfnUNOXEeSLVtmbtn12LQ"> + <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.sirius.tests.sample.component.design/description/component.odesign#//@ownedViewpoints[name='Component']"/> + <ownedRepresentations xmi:type="table:DTable" xmi:id="_WmaFwAsBEeaIS93yJg53Yg" name="new Aliases" headerColumnWidth="213"> + <target xmi:type="component:Component" href="component.component#/"/> + <lines xmi:type="table:DLine" xmi:id="_WmaFwQsBEeaIS93yJg53Yg" label="Component Bruce Wayne"> + <target xmi:type="component:Component" href="component.component#//@children.0"/> + <semanticElements xmi:type="component:Component" href="component.component#//@children.0"/> + <originMapping xmi:type="description_1:LineMapping" href="platform:/plugin/org.eclipse.sirius.tests.sample.component.design/description/component.odesign#//@ownedViewpoints[name='Component']/@ownedRepresentations[name='Aliases']/@ownedLineMappings[name='Aliases_Component']"/> + <cells xmi:type="table:DCell" xmi:id="_WmaFwgsBEeaIS93yJg53Yg" label="Bruce Wayne" column="_WmaFxAsBEeaIS93yJg53Yg"> + <target xmi:type="component:Component" href="component.component#//@children.0"/> + <semanticElements xmi:type="component:Component" href="component.component#//@children.0"/> + </cells> + <cells xmi:type="table:DCell" xmi:id="_WmaFwwsBEeaIS93yJg53Yg" label="[Batman, The Dark Knight, The world greateast detective]" column="_WmaFxQsBEeaIS93yJg53Yg"> + <target xmi:type="component:Component" href="component.component#//@children.0"/> + <semanticElements xmi:type="component:Component" href="component.component#//@children.0"/> + </cells> + </lines> + <columns xmi:type="table:DFeatureColumn" xmi:id="_WmaFxAsBEeaIS93yJg53Yg" label="Name" cells="_WmaFwgsBEeaIS93yJg53Yg" width="95" featureName="name"> + <originMapping xmi:type="description_1:FeatureColumnMapping" href="platform:/plugin/org.eclipse.sirius.tests.sample.component.design/description/component.odesign#//@ownedViewpoints[name='Component']/@ownedRepresentations[name='Aliases']/@ownedColumnMappings[name='Aliases_Component_Name']"/> + </columns> + <columns xmi:type="table:DFeatureColumn" xmi:id="_WmaFxQsBEeaIS93yJg53Yg" label="Aliases" cells="_WmaFwwsBEeaIS93yJg53Yg" width="387" featureName="aliases"> + <originMapping xmi:type="description_1:FeatureColumnMapping" href="platform:/plugin/org.eclipse.sirius.tests.sample.component.design/description/component.odesign#//@ownedViewpoints[name='Component']/@ownedRepresentations[name='Aliases']/@ownedColumnMappings[name='Aliases_Component_Description']"/> + </columns> + <description xmi:type="description_1:EditionTableDescription" href="platform:/plugin/org.eclipse.sirius.tests.sample.component.design/description/component.odesign#//@ownedViewpoints[name='Component']/@ownedRepresentations[name='Aliases']"/> + </ownedRepresentations> + </ownedViews> +</viewpoint:DAnalysis> diff --git a/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/table/unit/TableWithMultivaluedAttributeTest.java b/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/table/unit/TableWithMultivaluedAttributeTest.java new file mode 100644 index 0000000000..1d75c4aba7 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/table/unit/TableWithMultivaluedAttributeTest.java @@ -0,0 +1,91 @@ +/******************************************************************************* + * Copyright (c) 2016 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.tests.unit.table.unit; + +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.sirius.table.business.api.refresh.DTableSynchronizer; +import org.eclipse.sirius.table.business.internal.refresh.DTableSynchronizerImpl; +import org.eclipse.sirius.table.metamodel.table.DTable; +import org.eclipse.sirius.table.metamodel.table.TableFactory; +import org.eclipse.sirius.table.metamodel.table.description.TableDescription; +import org.eclipse.sirius.tests.SiriusTestsPlugin; +import org.eclipse.sirius.tests.support.api.SiriusTestCase; +import org.eclipse.sirius.tools.api.command.ICommandFactory; +import org.eclipse.sirius.viewpoint.description.RepresentationDescription; +import org.eclipse.sirius.viewpoint.description.Viewpoint; +import org.junit.Assert; + +/** + * Test class for table displaying multivalued String attributes. + * + * @author <a href="mailto:steve.monnier@obeo.fr">Steve Monnier</a> + */ +public class TableWithMultivaluedAttributeTest extends SiriusTestCase { + + public static final String PATH = "/data/table/unit/bugzilla-490092/"; + + private static final String SEMANTIC_MODEL_FILENAME = "component.component"; + + private static final String MODELER_PATH = "/org.eclipse.sirius.tests.sample.component.design/description/component.odesign"; + + private static final String SESSION_MODEL_FILENAME = "representations.aird"; + + private static final String TABLE_DESCRIPTION_NAME = "Aliases"; + + @Override + protected void setUp() throws Exception { + super.setUp(); + + copyFilesToTestProject(SiriusTestsPlugin.PLUGIN_ID, PATH, SEMANTIC_MODEL_FILENAME, SESSION_MODEL_FILENAME); + genericSetUp(TEMPORARY_PROJECT_NAME + "/" + SEMANTIC_MODEL_FILENAME, MODELER_PATH, TEMPORARY_PROJECT_NAME + "/" + SESSION_MODEL_FILENAME); + } + + /** + * Using the Component metamodel and viewpoint, this scenario create an + * "Aliases" table and refresh it. As this table displays the multivalued + * string attribute "aliases", this test validates that no + * ClassCastException is raised. + * + * @throws Exception + */ + public void testTableWithMultivaluedAttribute() throws Exception { + // Look for the TableDescription named "Aliases" in the viewpoint + Viewpoint viewpoint = session.getSelectedViewpoints(false).iterator().next(); + TableDescription aliasesTableDescription = null; + for (RepresentationDescription representationDescription : viewpoint.getOwnedRepresentations()) { + if (representationDescription instanceof TableDescription && TABLE_DESCRIPTION_NAME.equals(representationDescription.getName())) { + aliasesTableDescription = (TableDescription) representationDescription; + } + } + Assert.assertNotNull("The table description " + TABLE_DESCRIPTION_NAME + " has not been found in the activated viewpoint", aliasesTableDescription); + + // Creation of the table + DTableSynchronizer sync = new DTableSynchronizerImpl(aliasesTableDescription, accessor, interpreter); + DTable newTable = TableFactory.eINSTANCE.createDTable(); + newTable.setDescription(aliasesTableDescription); + newTable.setTarget(semanticModel); + sync.setTable(newTable); + // Refresh the table to force the label evaluation of a cell displaying + // a multivalued string attribute + try { + sync.refresh(new NullProgressMonitor()); + } catch (ClassCastException cce) { + // Catch the exception to display a better failing message + fail("Refreshing a table displaying a multivalued String attribute should not cause a ClassCastException anymore"); + } + } + + @Override + protected ICommandFactory getCommandFactory() { + return null; + } + +} diff --git a/plugins/org.eclipse.sirius.tests.sample.component.design/description/component.odesign b/plugins/org.eclipse.sirius.tests.sample.component.design/description/component.odesign index 1b8dc0d8a1..926f55cd6b 100644 --- a/plugins/org.eclipse.sirius.tests.sample.component.design/description/component.odesign +++ b/plugins/org.eclipse.sirius.tests.sample.component.design/description/component.odesign @@ -412,6 +412,11 @@ <variables name="container" documentation="The semantic element corresponding to the view container."/> </createTreeItem> </ownedRepresentations> + <ownedRepresentations xsi:type="description_2:EditionTableDescription" name="Aliases" domainClass="Component"> + <ownedLineMappings name="Aliases_Component" domainClass="Component" semanticCandidatesExpression="feature:children"/> + <ownedColumnMappings name="Aliases_Component_Name" headerLabelExpression="Name" featureName="name"/> + <ownedColumnMappings name="Aliases_Component_Description" headerLabelExpression="Aliases" featureName="aliases"/> + </ownedRepresentations> <ownedJavaExtensions qualifiedClassName="org.eclipse.sirius.tests.sample.component.service.ComponentServices"/> </ownedViewpoints> </description:Group> diff --git a/plugins/org.eclipse.sirius.tests.sample.component/model/component.ecore b/plugins/org.eclipse.sirius.tests.sample.component/model/component.ecore index f4944a1b67..0db27e2641 100644 --- a/plugins/org.eclipse.sirius.tests.sample.component/model/component.ecore +++ b/plugins/org.eclipse.sirius.tests.sample.component/model/component.ecore @@ -15,5 +15,7 @@ eType="#//Component" eOpposite="#//Component/references"/> <eStructuralFeatures xsi:type="ecore:EReference" name="references2" upperBound="-1" eType="#//Component"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="aliases" upperBound="-1" + eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> </eClassifiers> </ecore:EPackage> diff --git a/plugins/org.eclipse.sirius.tests.sample.component/model/component.genmodel b/plugins/org.eclipse.sirius.tests.sample.component/model/component.genmodel index 0a66ed07a8..997d248f30 100644 --- a/plugins/org.eclipse.sirius.tests.sample.component/model/component.genmodel +++ b/plugins/org.eclipse.sirius.tests.sample.component/model/component.genmodel @@ -18,6 +18,7 @@ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference component.ecore#//Component/reference"/> <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference component.ecore#//Component/opposites"/> <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference component.ecore#//Component/references2"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute component.ecore#//Component/aliases"/> </genClasses> </genPackages> </genmodel:GenModel> diff --git a/plugins/org.eclipse.sirius.tests.sample.component/src/org/eclipse/sirius/tests/sample/component/Component.java b/plugins/org.eclipse.sirius.tests.sample.component/src/org/eclipse/sirius/tests/sample/component/Component.java index a390a3a9d7..073bf7bba3 100644 --- a/plugins/org.eclipse.sirius.tests.sample.component/src/org/eclipse/sirius/tests/sample/component/Component.java +++ b/plugins/org.eclipse.sirius.tests.sample.component/src/org/eclipse/sirius/tests/sample/component/Component.java @@ -20,10 +20,10 @@ import org.eclipse.emf.ecore.EObject; * <p> * The following features are supported: * <ul> - * <li>{@link org.eclipse.sirius.tests.sample.component.Component#getName <em> - * Name</em>}</li> - * <li>{@link org.eclipse.sirius.tests.sample.component.Component#isPayload <em> - * Payload</em>}</li> + * <li>{@link org.eclipse.sirius.tests.sample.component.Component#getName + * <em>Name</em>}</li> + * <li>{@link org.eclipse.sirius.tests.sample.component.Component#isPayload + * <em>Payload</em>}</li> * <li>{@link org.eclipse.sirius.tests.sample.component.Component#getChildren * <em>Children</em>}</li> * <li>{@link org.eclipse.sirius.tests.sample.component.Component#getReferences @@ -32,9 +32,10 @@ import org.eclipse.emf.ecore.EObject; * <em>Reference</em>}</li> * <li>{@link org.eclipse.sirius.tests.sample.component.Component#getOpposites * <em>Opposites</em>}</li> - * <li> - * {@link org.eclipse.sirius.tests.sample.component.Component#getReferences2 + * <li>{@link org.eclipse.sirius.tests.sample.component.Component#getReferences2 * <em>References2</em>}</li> + * <li>{@link org.eclipse.sirius.tests.sample.component.Component#getAliases + * <em>Aliases</em>}</li> * </ul> * </p> * @@ -207,4 +208,21 @@ public interface Component extends EObject { */ EList<Component> getReferences2(); + /** + * Returns the value of the '<em><b>Aliases</b></em>' attribute list. The + * list contents are of type {@link java.lang.String}. <!-- begin-user-doc + * --> + * <p> + * If the meaning of the '<em>Aliases</em>' attribute list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Aliases</em>' attribute list. + * @see org.eclipse.sirius.tests.sample.component.ComponentPackage#getComponent_Aliases() + * @model + * @generated + */ + EList<String> getAliases(); + } // Component diff --git a/plugins/org.eclipse.sirius.tests.sample.component/src/org/eclipse/sirius/tests/sample/component/ComponentPackage.java b/plugins/org.eclipse.sirius.tests.sample.component/src/org/eclipse/sirius/tests/sample/component/ComponentPackage.java index 75f1687b46..4ffeac4511 100644 --- a/plugins/org.eclipse.sirius.tests.sample.component/src/org/eclipse/sirius/tests/sample/component/ComponentPackage.java +++ b/plugins/org.eclipse.sirius.tests.sample.component/src/org/eclipse/sirius/tests/sample/component/ComponentPackage.java @@ -136,13 +136,22 @@ public interface ComponentPackage extends EPackage { int COMPONENT__REFERENCES2 = 6; /** + * The feature id for the '<em><b>Aliases</b></em>' attribute list. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int COMPONENT__ALIASES = 7; + + /** * The number of structural features of the '<em>Component</em>' class. <!-- * begin-user-doc --> <!-- end-user-doc --> * * @generated * @ordered */ - int COMPONENT_FEATURE_COUNT = 7; + int COMPONENT_FEATURE_COUNT = 8; /** * The number of operations of the '<em>Component</em>' class. <!-- @@ -250,6 +259,18 @@ public interface ComponentPackage extends EPackage { EReference getComponent_References2(); /** + * Returns the meta object for the attribute list ' + * {@link org.eclipse.sirius.tests.sample.component.Component#getAliases + * <em>Aliases</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute list '<em>Aliases</em>'. + * @see org.eclipse.sirius.tests.sample.component.Component#getAliases() + * @see #getComponent() + * @generated + */ + EAttribute getComponent_Aliases(); + + /** * Returns the factory that creates the instances of the model. <!-- * begin-user-doc --> <!-- end-user-doc --> * @@ -342,6 +363,14 @@ public interface ComponentPackage extends EPackage { */ EReference COMPONENT__REFERENCES2 = eINSTANCE.getComponent_References2(); + /** + * The meta object literal for the '<em><b>Aliases</b></em>' attribute + * list feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EAttribute COMPONENT__ALIASES = eINSTANCE.getComponent_Aliases(); + } } // ComponentPackage diff --git a/plugins/org.eclipse.sirius.tests.sample.component/src/org/eclipse/sirius/tests/sample/component/impl/ComponentImpl.java b/plugins/org.eclipse.sirius.tests.sample.component/src/org/eclipse/sirius/tests/sample/component/impl/ComponentImpl.java index a7ac5d201e..6796b1d6e9 100644 --- a/plugins/org.eclipse.sirius.tests.sample.component/src/org/eclipse/sirius/tests/sample/component/impl/ComponentImpl.java +++ b/plugins/org.eclipse.sirius.tests.sample.component/src/org/eclipse/sirius/tests/sample/component/impl/ComponentImpl.java @@ -20,6 +20,7 @@ import org.eclipse.emf.ecore.EStructuralFeature.Setting; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; +import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; import org.eclipse.emf.ecore.util.EObjectContainmentEList; import org.eclipse.emf.ecore.util.EObjectResolvingEList; import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; @@ -55,6 +56,9 @@ import org.eclipse.sirius.tests.sample.component.util.PayloadMarkerAdapter; * <li> * {@link org.eclipse.sirius.tests.sample.component.impl.ComponentImpl#getReferences2 * <em>References2</em>}</li> + * <li> + * {@link org.eclipse.sirius.tests.sample.component.impl.ComponentImpl#getAliases + * <em>Aliases</em>}</li> * </ul> * </p> * @@ -152,6 +156,16 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo protected EList<Component> references2; /** + * The cached value of the '{@link #getAliases() <em>Aliases</em>}' + * attribute list. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #getAliases() + * @generated + * @ordered + */ + protected EList<String> aliases; + + /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated @@ -348,6 +362,18 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo * * @generated */ + public EList<String> getAliases() { + if (aliases == null) { + aliases = new EDataTypeUniqueEList<String>(String.class, this, ComponentPackage.COMPONENT__ALIASES); + } + return aliases; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ @SuppressWarnings("unchecked") @Override public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { @@ -402,6 +428,8 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo return getOpposites(); case ComponentPackage.COMPONENT__REFERENCES2: return getReferences2(); + case ComponentPackage.COMPONENT__ALIASES: + return getAliases(); } return super.eGet(featureID, resolve, coreType); } @@ -440,6 +468,10 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo getReferences2().clear(); getReferences2().addAll((Collection<? extends Component>) newValue); return; + case ComponentPackage.COMPONENT__ALIASES: + getAliases().clear(); + getAliases().addAll((Collection<? extends String>) newValue); + return; } super.eSet(featureID, newValue); } @@ -473,6 +505,9 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo case ComponentPackage.COMPONENT__REFERENCES2: getReferences2().clear(); return; + case ComponentPackage.COMPONENT__ALIASES: + getAliases().clear(); + return; } super.eUnset(featureID); } @@ -499,6 +534,8 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo return opposites != null && !opposites.isEmpty(); case ComponentPackage.COMPONENT__REFERENCES2: return references2 != null && !references2.isEmpty(); + case ComponentPackage.COMPONENT__ALIASES: + return aliases != null && !aliases.isEmpty(); } return super.eIsSet(featureID); } @@ -518,6 +555,8 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo result.append(name); result.append(", payload: "); //$NON-NLS-1$ result.append(payload); + result.append(", aliases: "); //$NON-NLS-1$ + result.append(aliases); result.append(')'); return result.toString(); } diff --git a/plugins/org.eclipse.sirius.tests.sample.component/src/org/eclipse/sirius/tests/sample/component/impl/ComponentPackageImpl.java b/plugins/org.eclipse.sirius.tests.sample.component/src/org/eclipse/sirius/tests/sample/component/impl/ComponentPackageImpl.java index 6a495b07a0..13e34a154b 100644 --- a/plugins/org.eclipse.sirius.tests.sample.component/src/org/eclipse/sirius/tests/sample/component/impl/ComponentPackageImpl.java +++ b/plugins/org.eclipse.sirius.tests.sample.component/src/org/eclipse/sirius/tests/sample/component/impl/ComponentPackageImpl.java @@ -183,6 +183,15 @@ public class ComponentPackageImpl extends EPackageImpl implements ComponentPacka * * @generated */ + public EAttribute getComponent_Aliases() { + return (EAttribute) componentEClass.getEStructuralFeatures().get(7); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ @Override public ComponentFactory getComponentFactory() { return (ComponentFactory) getEFactoryInstance(); @@ -216,6 +225,7 @@ public class ComponentPackageImpl extends EPackageImpl implements ComponentPacka createEReference(componentEClass, COMPONENT__REFERENCE); createEReference(componentEClass, COMPONENT__OPPOSITES); createEReference(componentEClass, COMPONENT__REFERENCES2); + createEAttribute(componentEClass, COMPONENT__ALIASES); } /** @@ -250,20 +260,22 @@ public class ComponentPackageImpl extends EPackageImpl implements ComponentPacka // Initialize classes, features, and operations; add parameters initEClass(componentEClass, Component.class, "Component", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - initEAttribute(getComponent_Name(), ecorePackage.getEString(), - "name", null, 1, 1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEAttribute(getComponent_Payload(), ecorePackage.getEBoolean(), - "payload", null, 1, 1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEReference(getComponent_Children(), this.getComponent(), null, - "children", null, 0, -1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEReference(getComponent_References(), this.getComponent(), this.getComponent_Opposites(), - "references", null, 0, -1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEReference(getComponent_Reference(), this.getComponent(), null, - "reference", null, 0, 1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEReference(getComponent_Opposites(), this.getComponent(), this.getComponent_References(), - "opposites", null, 0, -1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEReference(getComponent_References2(), this.getComponent(), null, - "references2", null, 0, -1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getComponent_Name(), ecorePackage.getEString(), "name", null, 1, 1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, //$NON-NLS-1$ + IS_ORDERED); + initEAttribute(getComponent_Payload(), ecorePackage.getEBoolean(), "payload", null, 1, 1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, //$NON-NLS-1$ + !IS_DERIVED, IS_ORDERED); + initEReference(getComponent_Children(), this.getComponent(), null, "children", null, 0, -1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES, //$NON-NLS-1$ + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getComponent_References(), this.getComponent(), this.getComponent_Opposites(), "references", null, 0, -1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ + !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getComponent_Reference(), this.getComponent(), null, "reference", null, 0, 1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, //$NON-NLS-1$ + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getComponent_Opposites(), this.getComponent(), this.getComponent_References(), "opposites", null, 0, -1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$ + !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getComponent_References2(), this.getComponent(), null, "references2", null, 0, -1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, //$NON-NLS-1$ + IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getComponent_Aliases(), ecorePackage.getEString(), "aliases", null, 0, -1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, //$NON-NLS-1$ + !IS_DERIVED, IS_ORDERED); // Create resource createResource(eNS_URI); |
