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 08:54  |
Eclipse User |
|
|
|
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 #65383 is a reply to message #65322] |
Thu, 21 December 2006 10:18   |
Eclipse User |
|
|
|
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. 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
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 09:12   |
Eclipse User |
|
|
|
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 09:41  |
Eclipse User |
|
|
|
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 09:01  |
Eclipse User |
|
|
|
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 10:18  |
Eclipse User |
|
|
|
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. 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
Thanks
Aurelien
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
<br>
</body>
</html>
--------------000003050406090404090409--
|
|
|
Re: How to programmatically generate editor code from .ecore file [message #600232 is a reply to message #65383] |
Tue, 26 December 2006 09:12  |
Eclipse User |
|
|
|
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 09:41  |
Eclipse User |
|
|
|
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.
|
|
|
Goto Forum:
Current Time: Thu May 15 22:57:51 EDT 2025
Powered by FUDForum. Page generated in 0.50563 seconds
|