Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Why is .ecore file copied to generated model impl package?
Why is .ecore file copied to generated model impl package? [message #414665] Fri, 16 November 2007 06:13 Go to next message
h1055071 is currently offline h1055071
Messages: 335
Registered: July 2009
Senior Member
Hi.

I have three .ecore and .genmodel files created from 3 XSD Schema files.
When I generate the model code from one of the .genmodel files the
corresponding .ecore file is copied to the source package's "impl"
folder. This does not happen for the other two .genmodel's generated
model code. Does anybody know why? I would like to stop this happening.

Thanks,

PB
Re: Why is .ecore file copied to generated model impl package? [message #414678 is a reply to message #414665] Fri, 16 November 2007 06:46 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25999
Registered: July 2009
Senior Member
Phillip,

This is controlled by the GenPackage property "Initialize By Loading "
set to true. It's initialized to true for models that are so large
they're likely to result in an XyzPackageImpl that exceeds Java's byte
code limits.


Phillip Beauvoir wrote:
> Hi.
>
> I have three .ecore and .genmodel files created from 3 XSD Schema
> files. When I generate the model code from one of the .genmodel files
> the corresponding .ecore file is copied to the source package's "impl"
> folder. This does not happen for the other two .genmodel's generated
> model code. Does anybody know why? I would like to stop this happening.
>
> Thanks,
>
> PB
Re: Why is .ecore file copied to generated model impl package? [message #414680 is a reply to message #414678] Fri, 16 November 2007 06:53 Go to previous messageGo to next message
h1055071 is currently offline h1055071
Messages: 335
Registered: July 2009
Senior Member
Ed Merks wrote:
> Phillip,
>
> This is controlled by the GenPackage property "Initialize By Loading "
> set to true. It's initialized to true for models that are so large
> they're likely to result in an XyzPackageImpl that exceeds Java's byte
> code limits.
>
>
> Phillip Beauvoir wrote:
>> Hi.
>>
>> I have three .ecore and .genmodel files created from 3 XSD Schema
>> files. When I generate the model code from one of the .genmodel files
>> the corresponding .ecore file is copied to the source package's "impl"
>> folder. This does not happen for the other two .genmodel's generated
>> model code. Does anybody know why? I would like to stop this happening.
>>
>> Thanks,
>>
>> PB

Ed, thanks for the quick answer.

Indeed the XSD the model is based on is quite large and the resulting
"ImsldV1p0PackageImpl.java" class is big too.

How do the two .ecore files stay in synch? Is it copied over anew each
time that I generate the model code? What would happen if I turn off
"Initialize By Loading"? Is it best to keep it turned on?

And thanks for taking the time to be so pro-active on this newsgroup!

PB
Re: Why is .ecore file copied to generated model impl package? [message #414681 is a reply to message #414680] Fri, 16 November 2007 07:11 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25999
Registered: July 2009
Senior Member
Phillip,

If you turn off, initialize by loading and you get the error about
exceeding the byte code limit for a method, you'll have to turn it back
on again. The .ecore that's produced isn't just a copy of the one you
started with. It's produced by the generator and is specialized to
refer to other packages via the nsURI rather than via their location in
the models folder; you might not notice that if your model doesn't
depend on other models, but it's very important.


Phillip Beauvoir wrote:
> Ed Merks wrote:
>> Phillip,
>>
>> This is controlled by the GenPackage property "Initialize By Loading
>> " set to true. It's initialized to true for models that are so large
>> they're likely to result in an XyzPackageImpl that exceeds Java's
>> byte code limits.
>>
>>
>> Phillip Beauvoir wrote:
>>> Hi.
>>>
>>> I have three .ecore and .genmodel files created from 3 XSD Schema
>>> files. When I generate the model code from one of the .genmodel
>>> files the corresponding .ecore file is copied to the source
>>> package's "impl" folder. This does not happen for the other two
>>> .genmodel's generated model code. Does anybody know why? I would
>>> like to stop this happening.
>>>
>>> Thanks,
>>>
>>> PB
>
> Ed, thanks for the quick answer.
>
> Indeed the XSD the model is based on is quite large and the resulting
> "ImsldV1p0PackageImpl.java" class is big too.
>
> How do the two .ecore files stay in synch? Is it copied over anew each
> time that I generate the model code? What would happen if I turn off
> "Initialize By Loading"? Is it best to keep it turned on?
>
> And thanks for taking the time to be so pro-active on this newsgroup!
>
> PB
Re: Why is .ecore file copied to generated model impl package? [message #414683 is a reply to message #414681] Fri, 16 November 2007 07:28 Go to previous messageGo to next message
h1055071 is currently offline h1055071
Messages: 335
Registered: July 2009
Senior Member
Ed Merks wrote:
> Phillip,
>
> If you turn off, initialize by loading and you get the error about
> exceeding the byte code limit for a method, you'll have to turn it back
> on again. The .ecore that's produced isn't just a copy of the one you
> started with. It's produced by the generator and is specialized to
> refer to other packages via the nsURI rather than via their location in
> the models folder; you might not notice that if your model doesn't
> depend on other models, but it's very important.
>
>
> Phillip Beauvoir wrote:
>> Ed Merks wrote:
>>> Phillip,
>>>
>>> This is controlled by the GenPackage property "Initialize By Loading
>>> " set to true. It's initialized to true for models that are so large
>>> they're likely to result in an XyzPackageImpl that exceeds Java's
>>> byte code limits.
>>>
>>>
>>> Phillip Beauvoir wrote:
>>>> Hi.
>>>>
>>>> I have three .ecore and .genmodel files created from 3 XSD Schema
>>>> files. When I generate the model code from one of the .genmodel
>>>> files the corresponding .ecore file is copied to the source
>>>> package's "impl" folder. This does not happen for the other two
>>>> .genmodel's generated model code. Does anybody know why? I would
>>>> like to stop this happening.
>>>>
>>>> Thanks,
>>>>
>>>> PB
>>
>> Ed, thanks for the quick answer.
>>
>> Indeed the XSD the model is based on is quite large and the resulting
>> "ImsldV1p0PackageImpl.java" class is big too.
>>
>> How do the two .ecore files stay in synch? Is it copied over anew each
>> time that I generate the model code? What would happen if I turn off
>> "Initialize By Loading"? Is it best to keep it turned on?
>>
>> And thanks for taking the time to be so pro-active on this newsgroup!
>>
>> PB


OK, thanks for that info, Ed. I'll leave it turned on.

BTW - I did a text "diff" beteen the original .ecore file and the
generated one and could only see one difference - an eAnnotations entry
was removed from the generated one. Otherwise they are the same.

PB
Re: Why is .ecore file copied to generated model impl package? [message #414684 is a reply to message #414683] Fri, 16 November 2007 07:46 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25999
Registered: July 2009
Senior Member
Phillip,

Yep, if there are no dependencies on other models you won't see much
difference. I assume the annotation was related to documentation?
There is a property to control whether documentation annotations end up
in the generated model..


Phillip Beauvoir wrote:
> Ed Merks wrote:
>> Phillip,
>>
>> If you turn off, initialize by loading and you get the error about
>> exceeding the byte code limit for a method, you'll have to turn it
>> back on again. The .ecore that's produced isn't just a copy of the
>> one you started with. It's produced by the generator and is
>> specialized to refer to other packages via the nsURI rather than via
>> their location in the models folder; you might not notice that if
>> your model doesn't depend on other models, but it's very important.
>>
>>
>> Phillip Beauvoir wrote:
>>> Ed Merks wrote:
>>>> Phillip,
>>>>
>>>> This is controlled by the GenPackage property "Initialize By
>>>> Loading " set to true. It's initialized to true for models that
>>>> are so large they're likely to result in an XyzPackageImpl that
>>>> exceeds Java's byte code limits.
>>>>
>>>>
>>>> Phillip Beauvoir wrote:
>>>>> Hi.
>>>>>
>>>>> I have three .ecore and .genmodel files created from 3 XSD Schema
>>>>> files. When I generate the model code from one of the .genmodel
>>>>> files the corresponding .ecore file is copied to the source
>>>>> package's "impl" folder. This does not happen for the other two
>>>>> .genmodel's generated model code. Does anybody know why? I would
>>>>> like to stop this happening.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> PB
>>>
>>> Ed, thanks for the quick answer.
>>>
>>> Indeed the XSD the model is based on is quite large and the
>>> resulting "ImsldV1p0PackageImpl.java" class is big too.
>>>
>>> How do the two .ecore files stay in synch? Is it copied over anew
>>> each time that I generate the model code? What would happen if I
>>> turn off "Initialize By Loading"? Is it best to keep it turned on?
>>>
>>> And thanks for taking the time to be so pro-active on this newsgroup!
>>>
>>> PB
>
>
> OK, thanks for that info, Ed. I'll leave it turned on.
>
> BTW - I did a text "diff" beteen the original .ecore file and the
> generated one and could only see one difference - an eAnnotations
> entry was removed from the generated one. Otherwise they are the same.
>
> PB
Re: Why is .ecore file copied to generated model impl package? [message #414688 is a reply to message #414684] Fri, 16 November 2007 07:55 Go to previous message
h1055071 is currently offline h1055071
Messages: 335
Registered: July 2009
Senior Member
Yes, it was.

OK, many thanks for the help, Ed. Just trying to get an understanding
of the process.

Thanks once again.

PB


Ed Merks wrote:
> Phillip,
>
> Yep, if there are no dependencies on other models you won't see much
> difference. I assume the annotation was related to documentation?
> There is a property to control whether documentation annotations end up
> in the generated model..
>
>
> Phillip Beauvoir wrote:
>> Ed Merks wrote:
>>> Phillip,
>>>
>>> If you turn off, initialize by loading and you get the error about
>>> exceeding the byte code limit for a method, you'll have to turn it
>>> back on again. The .ecore that's produced isn't just a copy of the
>>> one you started with. It's produced by the generator and is
>>> specialized to refer to other packages via the nsURI rather than via
>>> their location in the models folder; you might not notice that if
>>> your model doesn't depend on other models, but it's very important.
>>>
>>>
>>> Phillip Beauvoir wrote:
>>>> Ed Merks wrote:
>>>>> Phillip,
>>>>>
>>>>> This is controlled by the GenPackage property "Initialize By
>>>>> Loading " set to true. It's initialized to true for models that
>>>>> are so large they're likely to result in an XyzPackageImpl that
>>>>> exceeds Java's byte code limits.
>>>>>
>>>>>
>>>>> Phillip Beauvoir wrote:
>>>>>> Hi.
>>>>>>
>>>>>> I have three .ecore and .genmodel files created from 3 XSD Schema
>>>>>> files. When I generate the model code from one of the .genmodel
>>>>>> files the corresponding .ecore file is copied to the source
>>>>>> package's "impl" folder. This does not happen for the other two
>>>>>> .genmodel's generated model code. Does anybody know why? I would
>>>>>> like to stop this happening.
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> PB
>>>>
>>>> Ed, thanks for the quick answer.
>>>>
>>>> Indeed the XSD the model is based on is quite large and the
>>>> resulting "ImsldV1p0PackageImpl.java" class is big too.
>>>>
>>>> How do the two .ecore files stay in synch? Is it copied over anew
>>>> each time that I generate the model code? What would happen if I
>>>> turn off "Initialize By Loading"? Is it best to keep it turned on?
>>>>
>>>> And thanks for taking the time to be so pro-active on this newsgroup!
>>>>
>>>> PB
>>
>>
>> OK, thanks for that info, Ed. I'll leave it turned on.
>>
>> BTW - I did a text "diff" beteen the original .ecore file and the
>> generated one and could only see one difference - an eAnnotations
>> entry was removed from the generated one. Otherwise they are the same.
>>
>> PB
Previous Topic:AdapterFactory not getting invoked. ?
Next Topic:EMF Model Synchrinization with Multipage Editor (Tree based Editor and Text Editor)
Goto Forum:
  


Current Time: Thu Aug 21 02:24:48 EDT 2014

Powered by FUDForum. Page generated in 0.04005 seconds