Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » How to programmatically generate editor code from .ecore file
How to programmatically generate editor code from .ecore file [message #65301] Thu, 21 December 2006 13:54 Go to next message
Eclipse UserFriend
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
Re: How to programmatically generate editor code from .ecore file [message #65322 is a reply to message #65301] Thu, 21 December 2006 14:01 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: How to programmatically generate editor code from .ecore file [message #65383 is a reply to message #65322] Thu, 21 December 2006 15:18 Go to previous messageGo to next message
Eclipse UserFriend
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:

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
>>
>
>


--------------000003050406090404090409
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!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.&nbsp; 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&amp ;cmd=Search%21&amp;form=extended&amp;wf=574a74&a mp;ps=10&amp;m=all&amp;t=5&amp;ul=%2Fnewslists%2 Fnews.eclipse.tools.emf&amp;wm=wrd&amp;t=News&am p;t=Mail "> http://www.eclipse.org/search/search.cgi?q=generate+code+pro grammatically&amp ;cmd=Search%21&amp;form=extended&amp;wf=574a74&a mp;ps=10&amp;m=all&amp;t=5&amp;ul=%2Fnewslists%2 Fnews.eclipse.tools.emf&amp;wm=wrd&amp;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

Thanks

Aurelien
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
<br>
</body>
</html>

--------------000003050406090404090409--
Re: How to programmatically generate editor code from .ecore file [message #65533 is a reply to message #65383] Tue, 26 December 2006 14:12 Go to previous messageGo to next message
Eclipse UserFriend
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:

>
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
>>>
>>
>>
Re: How to programmatically generate editor code from .ecore file [message #65556 is a reply to message #65533] Tue, 26 December 2006 14:41 Go to previous message
Eclipse UserFriend
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...

IPath ecorePath = new Path(arguments[1]);
generator.basePackage = arguments[2];
String prefix = arguments[3];

ResourceSet resourceSet = new ResourceSetImpl();

resourceSet.getURIConverter().getURIMap().putAll(EcorePlugin .computePlatformURIMap());

URI ecoreURI = URI.createFileURI(ecorePath.toString());
Resource resource = resourceSet.getResource(ecoreURI,
true);
EPackage ePackage =
(EPackage)resource.getContents().get(0);

IPath genModelPath =
ecorePath.removeFileExtension().addFileExtension("genmodel");
progressMonitor.beginTask("", 2);
progressMonitor.subTask("Creating " + genModelPath);

URI genModelURI =
URI.createFileURI(genModelPath.toString());
Resource genModelResource =

Resource.Factory.Registry.INSTANCE.getFactory(genModelURI).c reateResource(genModelURI);
GenModel genModel =
GenModelFactory.eINSTANCE.createGenModel();
genModelResource.getContents().add(genModel);
resourceSet.getResources().add(genModelResource);
genModel.setModelDirectory("/TargetProject/src");
genModel.getForeignModel().add(ecorePath.toString());
genModel.initialize(Collections.singleton(ePackage));
GenPackage genPackage =
(GenPackage)genModel.getGenPackages().get(0);

genModel.setModelName(genModelURI.trimFileExtension().lastSe gment());

genPackage.setPrefix(prefix);
genPackage.setBasePackage(generator.basePackage);

progressMonitor.worked(1);

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
>>>>
>>>
>>>
>
>


--------------040404050009050805080200
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">
<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.
Re: How to programmatically generate editor code from .ecore file [message #597295 is a reply to message #65301] Thu, 21 December 2006 14:01 Go to previous message
Eclipse UserFriend
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
Re: How to programmatically generate editor code from .ecore file [message #597320 is a reply to message #65322] Thu, 21 December 2006 15:18 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
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:

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
>>
>
>


--------------000003050406090404090409
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!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.&nbsp; 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&amp ;cmd=Search%21&amp;form=extended&amp;wf=574a74&a mp;ps=10&amp;m=all&amp;t=5&amp;ul=%2Fnewslists%2 Fnews.eclipse.tools.emf&amp;wm=wrd&amp;t=News&am p;t=Mail "> http://www.eclipse.org/search/search.cgi?q=generate+code+pro grammatically&amp ;cmd=Search%21&amp;form=extended&amp;wf=574a74&a mp;ps=10&amp;m=all&amp;t=5&amp;ul=%2Fnewslists%2 Fnews.eclipse.tools.emf&amp;wm=wrd&amp;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

Thanks

Aurelien
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
<br>
</body>
</html>

--------------000003050406090404090409--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to programmatically generate editor code from .ecore file [message #600232 is a reply to message #65383] Tue, 26 December 2006 14:12 Go to previous message
Aur is currently offline AurFriend
Messages: 29
Registered: August 2010
Junior Member
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
>>>
>>
>>
Re: How to programmatically generate editor code from .ecore file [message #600243 is a reply to message #65533] Tue, 26 December 2006 14:41 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
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...

IPath ecorePath = new Path(arguments[1]);
generator.basePackage = arguments[2];
String prefix = arguments[3];

ResourceSet resourceSet = new ResourceSetImpl();

resourceSet.getURIConverter().getURIMap().putAll(EcorePlugin .computePlatformURIMap());

URI ecoreURI = URI.createFileURI(ecorePath.toString());
Resource resource = resourceSet.getResource(ecoreURI,
true);
EPackage ePackage =
(EPackage)resource.getContents().get(0);

IPath genModelPath =
ecorePath.removeFileExtension().addFileExtension("genmodel");
progressMonitor.beginTask("", 2);
progressMonitor.subTask("Creating " + genModelPath);

URI genModelURI =
URI.createFileURI(genModelPath.toString());
Resource genModelResource =

Resource.Factory.Registry.INSTANCE.getFactory(genModelURI).c reateResource(genModelURI);
GenModel genModel =
GenModelFactory.eINSTANCE.createGenModel();
genModelResource.getContents().add(genModel);
resourceSet.getResources().add(genModelResource);
genModel.setModelDirectory("/TargetProject/src");
genModel.getForeignModel().add(ecorePath.toString());
genModel.initialize(Collections.singleton(ePackage));
GenPackage genPackage =
(GenPackage)genModel.getGenPackages().get(0);

genModel.setModelName(genModelURI.trimFileExtension().lastSe gment());

genPackage.setPrefix(prefix);
genPackage.setBasePackage(generator.basePackage);

progressMonitor.worked(1);

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
>>>>
>>>
>>>
>
>


--------------040404050009050805080200
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">
<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 Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:teneo - Performance penalty for larger models in HibernateResource
Next Topic:Teneo: Objects are not added to resource.contents if fetch="subselect" for collection
Goto Forum:
  


Current Time: Fri Mar 29 05:43:43 GMT 2024

Powered by FUDForum. Page generated in 0.03298 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top