Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "EMF Editor goes RAP"
(→This Page tries to explain how to turn an automatic generated EMF editor into an RAP application) |
(→This Page tries to explain how to turn an automatic generated EMF editor into an RAP application) |
||
Line 3: | Line 3: | ||
To generate the EMF editor we first need a Ecore model. We will use the Simple Purchase Order model (file <tt>SimplePO.ecore</tt>) that is also used in the EMF book. In an UML Editor this model looks as depicted below: | To generate the EMF editor we first need a Ecore model. We will use the Simple Purchase Order model (file <tt>SimplePO.ecore</tt>) that is also used in the EMF book. In an UML Editor this model looks as depicted below: | ||
− | [[Image:SimplePO.gif]] | + | <center>[[Image:SimplePO.gif]]</center> |
The <tt>SimplePO.ecore</tt> file viewed in a text editor: | The <tt>SimplePO.ecore</tt> file viewed in a text editor: | ||
− | + | <?xml version="1.0" encoding="ASCII"?> | |
<ecore:EPackage xmi:version="2.0" | <ecore:EPackage xmi:version="2.0" | ||
xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
Line 22: | Line 22: | ||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="price" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFloat"/> | <eStructuralFeatures xsi:type="ecore:EAttribute" name="price" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFloat"/> | ||
</eClassifiers> | </eClassifiers> | ||
− | </ecore:EPackage | + | </ecore:EPackage> |
Revision as of 07:58, 24 November 2007
This Page tries to explain how to turn an automatic generated EMF editor into an RAP application
To generate the EMF editor we first need a Ecore model. We will use the Simple Purchase Order model (file SimplePO.ecore) that is also used in the EMF book. In an UML Editor this model looks as depicted below:
The SimplePO.ecore file viewed in a text editor: <?xml version="1.0" encoding="ASCII"?> <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="po" nsURI="http:///com/example/po.ecore" nsPrefix="com.example.po"> <eClassifiers xsi:type="ecore:EClass" name="PurchaseOrder"> <eStructuralFeatures xsi:type="ecore:EReference" name="items" upperBound="-1" eType="#//Item" containment="true"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="shipTo" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="billTo" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="Item"> <eStructuralFeatures xsi:type="ecore:EAttribute" name="productName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="quantity" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="price" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFloat"/> </eClassifiers>
</ecore:EPackage>