Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsHow to programmatically generate editor code from .ecore file
https://www.eclipse.org/forums/index.php/mv/msg/20352/65301/#msg_65301
Originally posted by: aurelien.tit.wanadoo.fr
Hi!
I've (programmatically) created an EMF project and an .ecore file into
this project (which is in my workspace).
What I'd like to do is to find a way to programmatically generate the
model code, the edit plugin code and the editor plugin code from this
ecore file. Have I to create a .genmodel file and how to do it?
If you could show me a code example of which class(es) I've to use, it
would be great ... but any idea is welcome
Thanks
Aurelien]]>2006-12-21T13:54:03-00:00Re: How to programmatically generate editor code from .ecore file
https://www.eclipse.org/forums/index.php/mv/msg/20352/65322/#msg_65322
Originally posted by: cdamus.ca.ibm.com
Hi, Aurelien,
This kind of core EMF question will find more answers and a more interested
audience in the EMF newsgroup (which I have copied). Ed does patrol EMFT,
too, but ...
Cheers,
Christian
Aurelien wrote:
> Hi!
> I've (programmatically) created an EMF project and an .ecore file into
> this project (which is in my workspace).
>
> What I'd like to do is to find a way to programmatically generate the
> model code, the edit plugin code and the editor plugin code from this
> ecore file. Have I to create a .genmodel file and how to do it?
>
> If you could show me a code example of which class(es) I've to use, it
> would be great ... but any idea is welcome
>
> Thanks
>
> Aurelien]]>2006-12-21T14:01:57-00:00Re: How to programmatically generate editor code from .ecore file
https://www.eclipse.org/forums/index.php/mv/msg/20352/597295/#msg_597295
Originally posted by: cdamus.ca.ibm.com
Hi, Aurelien,
This kind of core EMF question will find more answers and a more interested
audience in the EMF newsgroup (which I have copied). Ed does patrol EMFT,
too, but ...
Cheers,
Christian
Aurelien wrote:
> Hi!
> I've (programmatically) created an EMF project and an .ecore file into
> this project (which is in my workspace).
>
> What I'd like to do is to find a way to programmatically generate the
> model code, the edit plugin code and the editor plugin code from this
> ecore file. Have I to create a .genmodel file and how to do it?
>
> If you could show me a code example of which class(es) I've to use, it
> would be great ... but any idea is welcome
>
> Thanks
>
> Aurelien]]>2006-12-21T14:01:57-00:00Re: How to programmatically generate editor code from .ecore file
https://www.eclipse.org/forums/index.php/mv/msg/20352/597320/#msg_597320
--------------000003050406090404090409
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Christian,
Thanks for the alert. ;-)
Probably Aurelian would find it useful to look at the Ant tasks that do
these things. E.g.,
org.eclipse.emf.importer.ecore.taskdefs.EcoreGeneratorTask.
Searches like this should turn up previous answers:
Christian W. Damus wrote:
> Hi, Aurelien,
>
> This kind of core EMF question will find more answers and a more interested
> audience in the EMF newsgroup (which I have copied). Ed does patrol EMFT,
> too, but ...
>
> Cheers,
>
> Christian
>
>
> Aurelien wrote:
>
>
>> Hi!
>> I've (programmatically) created an EMF project and an .ecore file into
>> this project (which is in my workspace).
>>
>> What I'd like to do is to find a way to programmatically generate the
>> model code, the edit plugin code and the editor plugin code from this
>> ecore file. Have I to create a .genmodel file and how to do it?
>>
>> If you could show me a code example of which class(es) I've to use, it
>> would be great ... but any idea is welcome
>>
>> Thanks
>>
>> Aurelien
>>
>
>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Christian,<br>
<br>
Thanks for the alert. ;-)<br>
<br>
Probably Aurelian would find it useful to look at the Ant tasks that do
these things. E.g.,
org.eclipse.emf.importer.ecore.taskdefs.EcoreGeneratorTask.& amp;nbsp; <br>
<br>
Searches like this should turn up previous answers:<br>
<blockquote><a
href=" http://www.eclipse.org/search/search.cgi?q=generate+code+pro grammatically& ;cmd=Search%21&form=extended&wf=574a74&a mp;ps=10&m=all&t=5&ul=%2Fnewslists%2 Fnews.eclipse.tools.emf&wm=wrd&t=News&am p;t=Mail "> http://www.eclipse.org/search/search.cgi?q=generate+code+pro grammatically& ;cmd=Search%21&form=extended&wf=574a74&a mp;ps=10&m=all&t=5&ul=%2Fnewslists%2 Fnews.eclipse.tools.emf&wm=wrd&t=News&am p;t=Mail </a><br>
</blockquote>
<br>
<br>
Christian W. Damus wrote:
<blockquote cite="mideme44d$3jb$1@utils.eclipse.org" type="cite">
<pre wrap="">Hi, Aurelien,
This kind of core EMF question will find more answers and a more interested
audience in the EMF newsgroup (which I have copied). Ed does patrol EMFT,
too, but ...
Cheers,
Christian
Aurelien wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi!
I've (programmatically) created an EMF project and an .ecore file into
this project (which is in my workspace).
What I'd like to do is to find a way to programmatically generate the
model code, the edit plugin code and the editor plugin code from this
ecore file. Have I to create a .genmodel file and how to do it?
If you could show me a code example of which class(es) I've to use, it
would be great ... but any idea is welcome
--------------000003050406090404090409--]]>Ed Merks2006-12-21T15:18:36-00:00Re: How to programmatically generate editor code from .ecore file
https://www.eclipse.org/forums/index.php/mv/msg/20352/65383/#msg_65383
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------000003050406090404090409
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Christian,
Thanks for the alert. ;-)
Probably Aurelian would find it useful to look at the Ant tasks that do
these things. E.g.,
org.eclipse.emf.importer.ecore.taskdefs.EcoreGeneratorTask.
Searches like this should turn up previous answers:
Christian W. Damus wrote:
> Hi, Aurelien,
>
> This kind of core EMF question will find more answers and a more interested
> audience in the EMF newsgroup (which I have copied). Ed does patrol EMFT,
> too, but ...
>
> Cheers,
>
> Christian
>
>
> Aurelien wrote:
>
>
>> Hi!
>> I've (programmatically) created an EMF project and an .ecore file into
>> this project (which is in my workspace).
>>
>> What I'd like to do is to find a way to programmatically generate the
>> model code, the edit plugin code and the editor plugin code from this
>> ecore file. Have I to create a .genmodel file and how to do it?
>>
>> If you could show me a code example of which class(es) I've to use, it
>> would be great ... but any idea is welcome
>>
>> Thanks
>>
>> Aurelien
>>
>
>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Christian,<br>
<br>
Thanks for the alert. ;-)<br>
<br>
Probably Aurelian would find it useful to look at the Ant tasks that do
these things. E.g.,
org.eclipse.emf.importer.ecore.taskdefs.EcoreGeneratorTask.& amp;nbsp; <br>
<br>
Searches like this should turn up previous answers:<br>
<blockquote><a
href=" http://www.eclipse.org/search/search.cgi?q=generate+code+pro grammatically& ;cmd=Search%21&form=extended&wf=574a74&a mp;ps=10&m=all&t=5&ul=%2Fnewslists%2 Fnews.eclipse.tools.emf&wm=wrd&t=News&am p;t=Mail "> http://www.eclipse.org/search/search.cgi?q=generate+code+pro grammatically& ;cmd=Search%21&form=extended&wf=574a74&a mp;ps=10&m=all&t=5&ul=%2Fnewslists%2 Fnews.eclipse.tools.emf&wm=wrd&t=News&am p;t=Mail </a><br>
</blockquote>
<br>
<br>
Christian W. Damus wrote:
<blockquote cite="mideme44d$3jb$1@utils.eclipse.org" type="cite">
<pre wrap="">Hi, Aurelien,
This kind of core EMF question will find more answers and a more interested
audience in the EMF newsgroup (which I have copied). Ed does patrol EMFT,
too, but ...
Cheers,
Christian
Aurelien wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi!
I've (programmatically) created an EMF project and an .ecore file into
this project (which is in my workspace).
What I'd like to do is to find a way to programmatically generate the
model code, the edit plugin code and the editor plugin code from this
ecore file. Have I to create a .genmodel file and how to do it?
If you could show me a code example of which class(es) I've to use, it
would be great ... but any idea is welcome
--------------000003050406090404090409--]]>2006-12-21T15:18:36-00:00Re: How to programmatically generate editor code from .ecore file
https://www.eclipse.org/forums/index.php/mv/msg/20352/600232/#msg_600232
What I'd like to do is to create a .genmodel file from a .ecore file; and
I don't know which classes I should use: I tried with an EcoreImporter but
I couldn't find how to initialise it from the .ecore file.
I just want to get in output a GenModel instance ready to generate
matching plugins.
Thanks
Aurelien
Ed Merks wrote:
> Christian,
> Thanks for the alert. ;-)
> Probably Aurelian would find it useful to look at the Ant tasks that do
> these things. E.g.,
> org.eclipse.emf.importer.ecore.taskdefs.EcoreGeneratorTask.
> Searches like this should turn up previous answers:
> Christian W. Damus wrote:
>> Hi, Aurelien,
>>
>> This kind of core EMF question will find more answers and a more interested
>> audience in the EMF newsgroup (which I have copied). Ed does patrol EMFT,
>> too, but ...
>>
>> Cheers,
>>
>> Christian
>>
>>
>> Aurelien wrote:
>>
>>
>>> Hi!
>>> I've (programmatically) created an EMF project and an .ecore file into
>>> this project (which is in my workspace).
>>>
>>> What I'd like to do is to find a way to programmatically generate the
>>> model code, the edit plugin code and the editor plugin code from this
>>> ecore file. Have I to create a .genmodel file and how to do it?
>>>
>>> If you could show me a code example of which class(es) I've to use, it
>>> would be great ... but any idea is welcome
>>>
>>> Thanks
>>>
>>> Aurelien
>>>
>>
>>]]>Aur2006-12-26T14:12:50-00:00Re: How to programmatically generate editor code from .ecore file
https://www.eclipse.org/forums/index.php/mv/msg/20352/65533/#msg_65533
Originally posted by: aurelien.tit.wanadoo.fr
Hi!
What I'd like to do is to create a .genmodel file from a .ecore file; and
I don't know which classes I should use: I tried with an EcoreImporter but
I couldn't find how to initialise it from the .ecore file.
I just want to get in output a GenModel instance ready to generate
matching plugins.
Thanks
Aurelien
Ed Merks wrote:
> Christian,
> Thanks for the alert. ;-)
> Probably Aurelian would find it useful to look at the Ant tasks that do
> these things. E.g.,
> org.eclipse.emf.importer.ecore.taskdefs.EcoreGeneratorTask.
> Searches like this should turn up previous answers:
> Christian W. Damus wrote:
>> Hi, Aurelien,
>>
>> This kind of core EMF question will find more answers and a more interested
>> audience in the EMF newsgroup (which I have copied). Ed does patrol EMFT,
>> too, but ...
>>
>> Cheers,
>>
>> Christian
>>
>>
>> Aurelien wrote:
>>
>>
>>> Hi!
>>> I've (programmatically) created an EMF project and an .ecore file into
>>> this project (which is in my workspace).
>>>
>>> What I'd like to do is to find a way to programmatically generate the
>>> model code, the edit plugin code and the editor plugin code from this
>>> ecore file. Have I to create a .genmodel file and how to do it?
>>>
>>> If you could show me a code example of which class(es) I've to use, it
>>> would be great ... but any idea is welcome
>>>
>>> Thanks
>>>
>>> Aurelien
>>>
>>
>>]]>2006-12-26T14:12:50-00:00Re: How to programmatically generate editor code from .ecore file
https://www.eclipse.org/forums/index.php/mv/msg/20352/65556/#msg_65556
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------040404050009050805080200
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
Aurelien,
It's good to search the newsgroup since I'm sure I've explained this
before... It's also good to browse the source and do searches like, find
all places that use GenModelFactory's createGenModel, which can be done
from the popup. And finally, it's also good to figure things out by
running the code under debug control. For example, setting a breakpoint
in the constructor for GenModelImpl and seeing when it gets created is a
great way to see what state the working environment is in when it's
doing the work...
Probably the most concise example of how to create a GenModel is from
org.eclipse.emf.codegen.ecore.Generator, but I still suspect that would
you'll perhaps need is something more like what the importer is doing
and what all the Ant tasks are designed to do ---an Ant task that's
designed to read an Ecore model and generate its code---so I highly
recommend that's it's worth your while to learn what the "fancy
facilities" are providing rather than to try to build them from the
bottom up until you end up with something similar and that if you do
want to do the later, learn how the former works and strip it down...
if (arguments.length > 4 && "-sdo".equals(arguments[4]))
{
setSDODefaults(genModel);
}
genModelResource.save(Collections.EMPTY_MAP);
Aurelien wrote:
> Hi!
> What I'd like to do is to create a .genmodel file from a .ecore file;
> and I don't know which classes I should use: I tried with an
> EcoreImporter but I couldn't find how to initialise it from the .ecore
> file.
> I just want to get in output a GenModel instance ready to generate
> matching plugins.
> Thanks
> Aurelien
>
>
> Ed Merks wrote:
>
>> Christian,
>
>> Thanks for the alert. ;-)
>
>> Probably Aurelian would find it useful to look at the Ant tasks that
>> do these things. E.g.,
>> org.eclipse.emf.importer.ecore.taskdefs.EcoreGeneratorTask.
>
>> Searches like this should turn up previous answers:
>
>>
> http://www.eclipse.org/search/search.cgi?q=generate+code+pro grammatically&cmd=Search%21&form=extended&wf=574 a74&ps=10&m=all&t=5&ul=%2Fnewslists%2Fnews.e clipse.tools.emf&wm=wrd&t=News&t=Mail
>
>>
> < http://www.eclipse.org/search/search.cgi?q=generate+code+pro grammatically&cmd=Search%21&form=extended&wf=574 a74&ps=10&m=all&t=5&ul=%2Fnewslists%2Fnews.e clipse.tools.emf&wm=wrd&t=News&t=Mail>
>
>
>
>
>> Christian W. Damus wrote:
>>> Hi, Aurelien,
>>>
>>> This kind of core EMF question will find more answers and a more
>>> interested
>>> audience in the EMF newsgroup (which I have copied). Ed does patrol
>>> EMFT,
>>> too, but ...
>>>
>>> Cheers,
>>>
>>> Christian
>>>
>>>
>>> Aurelien wrote:
>>>
>>>
>>>> Hi!
>>>> I've (programmatically) created an EMF project and an .ecore file into
>>>> this project (which is in my workspace).
>>>>
>>>> What I'd like to do is to find a way to programmatically generate the
>>>> model code, the edit plugin code and the editor plugin code from this
>>>> ecore file. Have I to create a .genmodel file and how to do it?
>>>>
>>>> If you could show me a code example of which class(es) I've to use, it
>>>> would be great ... but any idea is welcome
>>>>
>>>> Thanks
>>>>
>>>> Aurelien
>>>>
>>>
>>>
>
>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Aurelien,<br>
<br>
It's good to search the newsgroup since I'm sure I've explained this
before... It's also good to browse the source and do searches like,
find all places that use GenModelFactory's createGenModel, which can be
done from the popup.]]>2006-12-26T14:41:13-00:00Re: How to programmatically generate editor code from .ecore file
https://www.eclipse.org/forums/index.php/mv/msg/20352/600243/#msg_600243
--------------040404050009050805080200
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
Aurelien,
It's good to search the newsgroup since I'm sure I've explained this
before... It's also good to browse the source and do searches like, find
all places that use GenModelFactory's createGenModel, which can be done
from the popup. And finally, it's also good to figure things out by
running the code under debug control. For example, setting a breakpoint
in the constructor for GenModelImpl and seeing when it gets created is a
great way to see what state the working environment is in when it's
doing the work...
Probably the most concise example of how to create a GenModel is from
org.eclipse.emf.codegen.ecore.Generator, but I still suspect that would
you'll perhaps need is something more like what the importer is doing
and what all the Ant tasks are designed to do ---an Ant task that's
designed to read an Ecore model and generate its code---so I highly
recommend that's it's worth your while to learn what the "fancy
facilities" are providing rather than to try to build them from the
bottom up until you end up with something similar and that if you do
want to do the later, learn how the former works and strip it down...
if (arguments.length > 4 && "-sdo".equals(arguments[4]))
{
setSDODefaults(genModel);
}
genModelResource.save(Collections.EMPTY_MAP);
Aurelien wrote:
> Hi!
> What I'd like to do is to create a .genmodel file from a .ecore file;
> and I don't know which classes I should use: I tried with an
> EcoreImporter but I couldn't find how to initialise it from the .ecore
> file.
> I just want to get in output a GenModel instance ready to generate
> matching plugins.
> Thanks
> Aurelien
>
>
> Ed Merks wrote:
>
>> Christian,
>
>> Thanks for the alert. ;-)
>
>> Probably Aurelian would find it useful to look at the Ant tasks that
>> do these things. E.g.,
>> org.eclipse.emf.importer.ecore.taskdefs.EcoreGeneratorTask.
>
>> Searches like this should turn up previous answers:
>
>>
> http://www.eclipse.org/search/search.cgi?q=generate+code+pro grammatically&cmd=Search%21&form=extended&wf=574 a74&ps=10&m=all&t=5&ul=%2Fnewslists%2Fnews.e clipse.tools.emf&wm=wrd&t=News&t=Mail
>
>>
> < http://www.eclipse.org/search/search.cgi?q=generate+code+pro grammatically&cmd=Search%21&form=extended&wf=574 a74&ps=10&m=all&t=5&ul=%2Fnewslists%2Fnews.e clipse.tools.emf&wm=wrd&t=News&t=Mail>
>
>
>
>
>> Christian W. Damus wrote:
>>> Hi, Aurelien,
>>>
>>> This kind of core EMF question will find more answers and a more
>>> interested
>>> audience in the EMF newsgroup (which I have copied). Ed does patrol
>>> EMFT,
>>> too, but ...
>>>
>>> Cheers,
>>>
>>> Christian
>>>
>>>
>>> Aurelien wrote:
>>>
>>>
>>>> Hi!
>>>> I've (programmatically) created an EMF project and an .ecore file into
>>>> this project (which is in my workspace).
>>>>
>>>> What I'd like to do is to find a way to programmatically generate the
>>>> model code, the edit plugin code and the editor plugin code from this
>>>> ecore file. Have I to create a .genmodel file and how to do it?
>>>>
>>>> If you could show me a code example of which class(es) I've to use, it
>>>> would be great ... but any idea is welcome
>>>>
>>>> Thanks
>>>>
>>>> Aurelien
>>>>
>>>
>>>
>
>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Aurelien,<br>
<br>
It's good to search the newsgroup since I'm sure I've explained this
before... It's also good to browse the source and do searches like,
find all places that use GenModelFactory's createGenModel, which can be
done from the popup.]]>Ed Merks2006-12-26T14:41:13-00:00