User:Lindenb/Notebook/UMR915/20110517: Difference between revisions

From OpenWetWare
Jump to navigationJump to search
No edit summary
Line 81: Line 81:


==Create EMF Generator Model==
==Create EMF Generator Model==
[[Image:Emf07.png]]


[[Category:EMF]]
[[Category:EMF]]

Revision as of 10:13, 17 May 2011

20110511        Top        20110518       


EMF

learning EMF -eclipse modeling framework- http://www.eclipse.org/modeling/emf/

Select project location

The new project is created:

~/tmp/workspace20110401> find ./EMFDataStore/
./EMFDataStore/
./EMFDataStore/.classpath
./EMFDataStore/META-INF
./EMFDataStore/META-INF/MANIFEST.MF
./EMFDataStore/src
./EMFDataStore/model
./EMFDataStore/.project
./EMFDataStore/bin
 cat ./EMFDataStore/.classpath
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
        <classpathentry kind="src" path="src"/>
        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
        <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
        <classpathentry kind="output" path="bin"/>
</classpath>
 cat ./EMFDataStore/.project
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
        <name>EMFDataStore</name>
        <comment></comment>
        <projects>
        </projects>
        <buildSpec>
                <buildCommand>
                        <name>org.eclipse.jdt.core.javabuilder</name>
                        <arguments>
                        </arguments>
                </buildCommand>
                <buildCommand>
                        <name>org.eclipse.pde.ManifestBuilder</name>
                        <arguments>
                        </arguments>
                </buildCommand>
                <buildCommand>
                        <name>org.eclipse.pde.SchemaBuilder</name>
                        <arguments>
                        </arguments>
                </buildCommand>
        </buildSpec>
        <natures>
                <nature>org.eclipse.jdt.core.javanature</nature>
                <nature>org.eclipse.pde.PluginNature</nature>
        </natures>
</projectDescription>

Then : create new Ecore Model:

We want to generate a whole package:

find ./EMFDataStore/ -type f
./EMFDataStore/.classpath
./EMFDataStore/META-INF/MANIFEST.MF
./EMFDataStore/model/emfdatastore.ecore
./EMFDataStore/.project
 cat ./EMFDataStore/model/emfdatastore.ecore
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmi:version="2.0" name=""/>

Create EMF Generator Model