Skip to main content


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 11:13 Go to next message
h1055071 is currently offline h1055071Friend
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 11:46 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
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


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Why is .ecore file copied to generated model impl package? [message #414680 is a reply to message #414678] Fri, 16 November 2007 11:53 Go to previous messageGo to next message
h1055071 is currently offline h1055071Friend
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 12:11 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
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


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Why is .ecore file copied to generated model impl package? [message #414683 is a reply to message #414681] Fri, 16 November 2007 12:28 Go to previous messageGo to next message
h1055071 is currently offline h1055071Friend
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 12:46 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
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


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Why is .ecore file copied to generated model impl package? [message #414688 is a reply to message #414684] Fri, 16 November 2007 12:55 Go to previous message
h1055071 is currently offline h1055071Friend
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: Sat Apr 20 03:00:32 GMT 2024

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

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

Back to the top