Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » customization templates: EPackageModelGenAnnotation not found(customization templates: EPackageModelGenAnnotation not found)
customization templates: EPackageModelGenAnnotation not found [message #986692] Wed, 21 November 2012 11:23 Go to next message
gabriele Mising name is currently offline gabriele Mising nameFriend
Messages: 19
Registered: December 2009
Junior Member
Hi Martin, thanks for the bug fixed but now I have another problem in customizing templates

I have overwritten your templates following the procedure that you indicated in the blog (http://wiki.eclipse.org/Texo/Template_Overriding)
but when I'm generating the code using the action "JPA Annotated Model Code + DAO", this error occurs:

Click the details button for more information, and check the Error Log view for any exceptions.
java.lang.IllegalStateException: No Definition 'org::eclipse::emf::texo::modelgenerator::templates::modelpackage::root(org::eclipse::emf::texo::generator::ModelController) for org::eclipse::emf::texo::modelgenerator::modelannotations::EPackageModelGenAnnotation' found!


I thought I have done something wrong, so I replaced my templates in the folder "templates" with your templates downloaded from GIT repository.
This should produce the same code that the system creates by default.
But the system gives me the same error so I assume that there is some problem in overriding templates.
Re: customization templates: EPackageModelGenAnnotation not found [message #986718 is a reply to message #986692] Wed, 21 November 2012 12:47 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Gabriele,
I have testcases for template overriding, so maybe it is specific to this template. Which template are you overriding?

Fyi, the xpand templates in git are not being used for code generation anymore, I moved Texo to xtend2, so over time the
xpand templates in git may get outdated.

gr. Martin

On 11/21/2012 12:23 PM, gabriele boldrin wrote:
> Hi Martin, thanks for the bug fixed but now I have another problem in customizing templates
> I have overwritten your templates following the procedure that you indicated in the blog
> (http://wiki.eclipse.org/Texo/Template_Overriding)
> but when I'm generating the code using the action "JPA Annotated Model Code + DAO", this error occurs:
>
>
> Click the details button for more information, and check the Error Log view for any exceptions.
> java.lang.IllegalStateException: No Definition
> 'org::eclipse::emf::texo::modelgenerator::templates::modelpackage::root(org::eclipse::emf::texo::generator::ModelController)
> for org::eclipse::emf::texo::modelgenerator::modelannotations::EPackageModelGenAnnotation' found!
>
> I thought I have done something wrong, so I replaced my templates in the folder "templates" with your templates
> downloaded from GIT repository.
> This should produce the same code that the system creates by default.
> But the system gives me the same error so I assume that there is some problem in overriding templates.


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: customization templates: EPackageModelGenAnnotation not found [message #986807 is a reply to message #986718] Wed, 21 November 2012 17:22 Go to previous messageGo to next message
gabriele Mising name is currently offline gabriele Mising nameFriend
Messages: 19
Registered: December 2009
Junior Member
Hi Martin,

If I put this template "advices.xpt" (that is empty) I get this error (the template is downloaded from your GIT Repository)

Click the details button for more information, and check the Error Log view for any exceptions.
java.lang.IllegalStateException: No Definition 'org::eclipse::emf::texo::modelgenerator::templates::advices::root(org::eclipse::emf::texo::generator::ModelController) for org::eclipse::emf::texo::generator::ModelController' found!



If I put this template "modelpackage.xpt" I get this error (the template is downloaded from your GIT Repository)

Click the details button for more information, and check the Error Log view for any exceptions.
java.lang.IllegalStateException: No Definition 'org::eclipse::emf::texo::modelgenerator::templates::modelpackage::root(org::eclipse::emf::texo::generator::ModelController) for org::eclipse::emf::texo::modelgenerator::modelannotations::EPackageModelGenAnnotation' found!


[Updated on: Wed, 21 November 2012 17:22]

Report message to a moderator

Re: customization templates: EPackageModelGenAnnotation not found [message #987535 is a reply to message #986807] Tue, 27 November 2012 01:15 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Gabriele,
I published a new build which should solve this. Note that the advices.xpt needs a DEFINE statement. I have added it in git.

Let me know if you still encounter problems.

gr. Martin

On 11/21/2012 06:22 PM, gabriele boldrin wrote:
> Hi,
>
> If I put this template "advices.xpt" (that is empty) I get this error (the template is downloaded from your GIT Repository)
>
> Click the details button for more information, and check the Error Log view for any exceptions.
> java.lang.IllegalStateException: No Definition 'org::eclipse::emf::texo::modelgenerator::templates::advices::root(org::eclipse::emf::texo::generator::ModelController) for org::eclipse::emf::texo::generator::ModelController' found!
>
>
> If I put this template "modelpackage.xpt" I get this error (the template is downloaded from your GIT Repository)
>
> Click the details button for more information, and check the Error Log view for any exceptions.
> java.lang.IllegalStateException: No Definition 'org::eclipse::emf::texo::modelgenerator::templates::modelpackage::root(org::eclipse::emf::texo::generator::ModelController) for org::eclipse::emf::texo::modelgenerator::modelannotations::EPackageModelGenAnnotation' found!
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: customization templates: EPackageModelGenAnnotation not found [message #987629 is a reply to message #986692] Tue, 27 November 2012 11:16 Go to previous messageGo to next message
gabriele Mising name is currently offline gabriele Mising nameFriend
Messages: 19
Registered: December 2009
Junior Member
Hi Martin
thanks for your fixs.

But there is another problem:
During the generation code the custom template 'modelfactory.xpt' is ignored
and it always generates the default code.

Re: customization templates: EPackageModelGenAnnotation not found [message #987669 is a reply to message #987629] Tue, 27 November 2012 14:12 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
An oversight from me while transferring the templates to xtend...

I published a new build which should solve this.

Note that this particular template is a bit 'dangerous' to override as it is quite technical. It uses 2 other templates
which are not overrideable (for featuremap and modelobject).

For my interest, what are you changing/adding to this template? Maybe I can provide an extra internal override point
which is safer for future enhancements in the main template.

gr. Martin

On 11/27/2012 12:16 PM, gabriele boldrin wrote:
> Hi Martin thanks for your fixs.
>
> But there is another problem:
> During the generation code the custom template 'modelfactory.xpt' is ignored and it always generates the default code.
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: customization templates: EPackageModelGenAnnotation not found [message #988323 is a reply to message #987669] Thu, 29 November 2012 12:04 Go to previous messageGo to next message
gabriele Mising name is currently offline gabriele Mising nameFriend
Messages: 19
Registered: December 2009
Junior Member
Hi Martin,

I have changed some things.
My application has a requirement to support dynamic (flex) fields on Entity Objects.
In addition, this application runs in a multitenant environment.
I used EMF for the description and data management.
My requirement is to have in memory for the same model n° instances of modelPackage because every user can add/remove custom attributes on the fly.
Re: customization templates: EPackageModelGenAnnotation not found [message #988399 is a reply to message #988323] Thu, 29 November 2012 18:00 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Gabriele,
Yes this is interesting functionality, I have seen this requirement more often. Are there ideas/solutions which you
could/want to share/contribute to get support for this in Texo?

For example, people change the ecore model? Do you add subtypes or add dynamic efeatures to an eclass?

gr. Martin

On 11/29/2012 01:04 PM, gabriele boldrin wrote:
> Hi Martin,
>
> I have changed some things.
> My application has a requirement to support dynamic (flex) fields on Entity Objects.
> In addition, this application runs in a multitenant environment.
> I used EMF for the description and data management.
> My requirement is to have in memory for the same model n° instances of modelPackage because every user can add/remove
> custom attributes on the fly.


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Previous Topic:Teneo EMF @OneToOne and @ManyToOne
Next Topic:[EEF] Contributing new widgets
Goto Forum:
  


Current Time: Tue Apr 16 07:40:20 GMT 2024

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

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

Back to the top