|
Re: how to use ant to generate genmodel [message #400872 is a reply to message #400771] |
Fri, 05 May 2006 15:07 |
Ed Merks Messages: 33217 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
--------------090608090208040801060106
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
Larry,
We have an Ant task for XSD -> GenModel but not one for Ecore ->
GenModel so the best I can do is point you to that as an example.
http://download.eclipse.org/tools/emf/xsd/2.2.0/javadoc/org/ eclipse/xsd/ecore/importer/taskdefs/XSDGeneratorTask.html
If someone works on Ecore -> GenModel, that would be a nice contribution
to the project...
larry wrote:
> hello, i want to generate a *.genmodel from a given ecore file using
> the ant, how could i just run the ant file and can generate the
> genmodel and finally get the gnerated code, is that possible to do it
> in this way? i can't find some useful information, does anyone have
> some simple exanples of this ant file, i will be grateful for some
> useful examples, thanks larry
>
--------------090608090208040801060106
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Larry,<br>
<br>
We have an Ant task for XSD -> GenModel but not one for Ecore ->
GenModel so the best I can do is point you to that as an example.<br>
<blockquote><a
href=" http://download.eclipse.org/tools/emf/xsd/2.2.0/javadoc/org/ eclipse/xsd/ecore/importer/taskdefs/XSDGeneratorTask.html"> http://download.eclipse.org/tools/emf/xsd/2.2.0/javadoc/org/ eclipse/xsd/ecore/importer/taskdefs/XSDGeneratorTask.html</a><br>
</blockquote>
If someone works on Ecore -> GenModel, that would be a nice
contribution to the project...<br>
<br>
<br>
larry wrote:
<blockquote cite="mid4cce63b3f17ffc604ca888c99b63dc46$1@www.eclipse.org"
type="cite">
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Re: how to use ant to generate genmodel [message #400954 is a reply to message #400950] |
Wed, 10 May 2006 11:20 |
Ed Merks Messages: 33217 Registered: July 2009 |
Senior Member |
|
|
Larry,
Marcelo is looking into providing an Ant task for this. Maybe it will
be ready for tomorrow's build. In the mean time, all I can do is point
you at source code. Such as the support for -ecore2GenModel in the
org.eclipse.emf.codegen.ecore.Generator.
larry wrote:
> hi:
> i have checked this xsd2genmodel package, it seems useful, but i
> can't use it, i didn't find any related information of this
> ecore2genmodel in ant build. i think the better way to do that is to
> use ant taskdef to define the task in the java code, but also i can't
> find enough information in this, if you have some information about
> how to use build a genmodel in the workspace and load ecore file in
> this genmodel, please show me an example, thank you inadvance
> regards
> larry
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: how to use ant to generate genmodel [message #520097 is a reply to message #400954] |
Thu, 11 March 2010 07:13 |
|
This should work! Please be sure to include modelproject="" and modelprojectfragmentpath="", as well as the other "I do not want..." options. If you do not include them, the ant task just throws nasty unexplained exceptions at you.
(IndexOutOfBounds, etc...)
<target name="makeGenModel">
<emf.Ecore2Java
generateeditorproject="false"
generateeditproject="false"
generatemodelproject="false"
generatejavacode="false"
genmodel="model/imported.genmodel"
model="model/sourceMetamodel.ecore"
reconcilegenmodel="overwrite"
validatemodel="true"
modelproject="" modelprojectfragmentpath=""/>
</target>
|
|
|
|
Re: how to use ant to generate genmodel [message #529104 is a reply to message #529102] |
Fri, 23 April 2010 00:20 |
|
It is the task shown above. Make sure you run it from within eclipse, it has many dependencies. Documentation is available in the eclipse online help and the back of the EMF book. Alternatively, look at oaw (open architecture ware) they should have tools for that purpose.
|
|
|
|
Powered by
FUDForum. Page generated in 0.06230 seconds