Created
September 30, 2011 10:13
-
-
Save xseignard/1253348 to your computer and use it in GitHub Desktop.
My.ecore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<ecore:EPackage xmi:version="2.0" | |
xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="test" | |
nsURI="URItest" nsPrefix="test"> | |
<eClassifiers xsi:type="ecore:EClass" name="Truc"> | |
<eOperations name="getAllMachins" upperBound="-1" eType="#//Machin"> | |
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | |
<details key="body" value="EList<Machin> machins = new <%org.eclipse.emf.common.util.BasicEList%><Machin>(this.getAutresMachins());
machins.add(0, this.getPremierMachin());
return machins;"/> | |
<details key="documentation" value="test"/> | |
</eAnnotations> | |
</eOperations> | |
<eStructuralFeatures xsi:type="ecore:EReference" name="premierMachin" lowerBound="1" | |
eType="#//Machin"/> | |
<eStructuralFeatures xsi:type="ecore:EReference" name="autresMachins" lowerBound="1" | |
upperBound="-1" eType="#//Machin"/> | |
</eClassifiers> | |
<eClassifiers xsi:type="ecore:EClass" name="Machin"> | |
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString" | |
iD="true"/> | |
</eClassifiers> | |
</ecore:EPackage> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Small example of metamodel with method implementation