|
Re: Model api generation generates an ecore model again ? [message #414430 is a reply to message #414429] |
Tue, 06 November 2007 15:57 |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Stephane,
It looks like your EPackage implementation is generated to initialize its
metadata from the .ecore file. Hence, this file is deployed into the Java
package.
This would be either because your GenModel has the option to "initialize by
loading" enabled, or because the code generator detected that your EPackage
has too many elements to generate the static initialization (owing to the
size of the initialization method being to large for javac to compile).
HTH,
Christian
Stephane wrote:
> Hi,
>
> I have got a weird behavior when generating the model API for one of my
> EMF models (this model was originally created from annotated java code and
> is copied in another project where the generation is really done, I don't
> know if it is relevant).
> Indeed, I got a new ecore model among my model element implementation
> classes named "model.ecore". Weird isn't it ?
>
> I tried to debug the model generation, and I found that the ecore file is
> created by GenPackageGeneratorAdapter#generatePackageSerialization method.
> In this method, the local variable targetPathName (at line 249) is set to
> my implementation java package and the file is serialized on disk at line
> 338.
>
> Does anyone have an idea of what it is happening there ?
>
> Stephane.
|
|
|
Re: Model api generation generates an ecore model again ? [message #414431 is a reply to message #414430] |
Tue, 06 November 2007 16:52 |
Stephane fournier Messages: 340 Registered: July 2009 |
Senior Member |
|
|
Hi, Christian,
You're quite right !
My GenModel has the option "initialize by loading" enabled and the
EPackage has many elements.
Stephane.
Christian W. Damus wrote:
> Hi, Stephane,
> It looks like your EPackage implementation is generated to initialize its
> metadata from the .ecore file. Hence, this file is deployed into the Java
> package.
> This would be either because your GenModel has the option to "initialize by
> loading" enabled, or because the code generator detected that your EPackage
> has too many elements to generate the static initialization (owing to the
> size of the initialization method being to large for javac to compile).
> HTH,
> Christian
> Stephane wrote:
>> Hi,
>>
>> I have got a weird behavior when generating the model API for one of my
>> EMF models (this model was originally created from annotated java code and
>> is copied in another project where the generation is really done, I don't
>> know if it is relevant).
>> Indeed, I got a new ecore model among my model element implementation
>> classes named "model.ecore". Weird isn't it ?
>>
>> I tried to debug the model generation, and I found that the ecore file is
>> created by GenPackageGeneratorAdapter#generatePackageSerialization method.
>> In this method, the local variable targetPathName (at line 249) is set to
>> my implementation java package and the file is serialized on disk at line
>> 338.
>>
>> Does anyone have an idea of what it is happening there ?
>>
>> Stephane.
|
|
|
Powered by
FUDForum. Page generated in 0.05005 seconds