Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [TEXO] Java errors in generated code
[TEXO] Java errors in generated code [message #691182] Thu, 30 June 2011 22:25 Go to next message
Mike Cooper is currently offline Mike CooperFriend
Messages: 60
Registered: February 2011
Member
Just started using Texo and noticed that the Java code generated by texo for our ecore model uses the same casified name in the model for the "Valid Java Member Name". This leads to self-reference errors in a case like this:

private Origin Origin = Origin.NOTSET;

Origin is a EEnum type and "Origin" is used as the model field name.

Our workaround is to edit the annotation for each such model and change the "Valid Java Member Name" to be all lower case. This can be quite a pain in a large model.

It would be nice if Texo had an option to use all lowercase names for Java Members or some other convention to ensure the member names are not the same as the class names.

Cheers,
mike
Re: [TEXO] Java errors in generated code [message #691409 is a reply to message #691182] Fri, 01 July 2011 11:55 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Mike,
I am working on a new build which solves this, will probably be published late today.

gr. Martin

On 07/01/2011 12:25 AM, Mike Cooper wrote:
> Just started using Texo and noticed that the Java code generated by texo for our ecore model uses the same casified name
> in the model for the "Valid Java Member Name". This leads to self-reference errors in a case like this:
>
> private Origin Origin = Origin.NOTSET;
>
> Origin is a EEnum type and "Origin" is used as the model field name.
>
> Our workaround is to edit the annotation for each such model and change the "Valid Java Member Name" to be all lower
> case. This can be quite a pain in a large model.
>
> It would be nice if Texo had an option to use all lowercase names for Java Members or some other convention to ensure
> the member names are not the same as the class names.
>
> Cheers,
> mike
>


--

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@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [TEXO] Java errors in generated code [message #691432 is a reply to message #691182] Fri, 01 July 2011 12:43 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
I published a new build which should solve this, can you give it a try?

You need to regenerate the orm.xml.

gr. Martin

On 07/01/2011 12:25 AM, Mike Cooper wrote:
> Just started using Texo and noticed that the Java code generated by texo for our ecore model uses the same casified name
> in the model for the "Valid Java Member Name". This leads to self-reference errors in a case like this:
>
> private Origin Origin = Origin.NOTSET;
>
> Origin is a EEnum type and "Origin" is used as the model field name.
>
> Our workaround is to edit the annotation for each such model and change the "Valid Java Member Name" to be all lower
> case. This can be quite a pain in a large model.
>
> It would be nice if Texo had an option to use all lowercase names for Java Members or some other convention to ensure
> the member names are not the same as the class names.
>
> Cheers,
> mike
>


--

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@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [TEXO] Java errors in generated code [message #691551 is a reply to message #691432] Fri, 01 July 2011 17:41 Go to previous messageGo to next message
Mike Cooper is currently offline Mike CooperFriend
Messages: 60
Registered: February 2011
Member
Hi Martin,

You're behind Texo too? You are a very, very busy guy. Smile

Tried to update in eclipse but got update errors:

An error occurred while collecting items to be installed
session context was:(profile=epp.package.jee, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
Artifact not found: osgi.bundle,org.eclipse.emf.texo,0.1.0.v201107011214.
http://download.eclipse.org/modeling/emft/texo/updates/interim/plugins/org.eclipse.emf.texo_0.1.0.v201107011214.jar
Problems downloading artifact: osgi.bundle,org.eclipse.emf.texo.generator,0.1.0.v201107011214.
MD5 hash is not as expected. Expected: 0d7a841b3fac2cb1ddc1cd5d4cea33f9 and found a6db9e2b43501d0c9187740e37cd69bf.
Artifact not found: osgi.bundle,org.eclipse.emf.texo.modelgenerator,0.1.0.v201107011214.
http://download.eclipse.org/modeling/emft/texo/updates/interim/plugins/org.eclipse.emf.texo.modelgenerator_0.1.0.v201107011214.jar
Artifact not found: osgi.bundle,org.eclipse.emf.texo.modelgenerator.edit,0.1.0.v201107011214.
http://download.eclipse.org/modeling/emft/texo/updates/interim/plugins/org.eclipse.emf.texo.modelgenerator.edit_0.1.0.v201107011214.jar
Artifact not found: osgi.bundle,org.eclipse.emf.texo.modelgenerator.edit.source,0.1.0.v201107011214.
http://download.eclipse.org/modeling/emft/texo/updates/interim/plugins/org.eclipse.emf.texo.modelgenerator.edit.source_0.1.0.v201107011214.jar
Artifact not found: osgi.bundle,org.eclipse.emf.texo.modelgenerator.source,0.1.0.v201107011214.
http://download.eclipse.org/modeling/emft/texo/updates/interim/plugins/org.eclipse.emf.texo.modelgenerator.source_0.1.0.v201107011214.jar
Artifact not found: osgi.bundle,org.eclipse.emf.texo.orm,0.1.0.v201107011214.
http://download.eclipse.org/modeling/emft/texo/updates/interim/plugins/org.eclipse.emf.texo.orm_0.1.0.v201107011214.jar
Artifact not found: osgi.bundle,org.eclipse.emf.texo.orm.edit,0.1.0.v201107011214.
http://download.eclipse.org/modeling/emft/texo/updates/interim/plugins/org.eclipse.emf.texo.orm.edit_0.1.0.v201107011214.jar
Artifact not found: osgi.bundle,org.eclipse.emf.texo.orm.edit.source,0.1.0.v201107011214.
http://download.eclipse.org/modeling/emft/texo/updates/interim/plugins/org.eclipse.emf.texo.orm.edit.source_0.1.0.v201107011214.jar
Artifact not found: osgi.bundle,org.eclipse.emf.texo.orm.source,0.1.0.v201107011214.
http://download.eclipse.org/modeling/emft/texo/updates/interim/plugins/org.eclipse.emf.texo.orm.source_0.1.0.v201107011214.jar
Artifact not found: osgi.bundle,org.eclipse.emf.texo.source,0.1.0.v201107011214.
http://download.eclipse.org/modeling/emft/texo/updates/interim/plugins/org.eclipse.emf.texo.source_0.1.0.v201107011214.jar
Artifact not found: osgi.bundle,org.eclipse.emf.texo.xml,0.1.0.v201107011214.
http://download.eclipse.org/modeling/emft/texo/updates/interim/plugins/org.eclipse.emf.texo.xml_0.1.0.v201107011214.jar
Artifact not found: osgi.bundle,org.eclipse.emf.texo.xml.source,0.1.0.v201107011214.
http://download.eclipse.org/modeling/emft/texo/updates/interim/plugins/org.eclipse.emf.texo.xml.source_0.1.0.v201107011214.jar

Re: [TEXO] Java errors in generated code [message #691581 is a reply to message #691551] Fri, 01 July 2011 18:59 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Indeed quite busy :-)...

I get the same error, I tried a new build but something fails on the eclipse.org hudson build infrastructure. I will try
again later and send a reply to this thread again.

gr. Martin

On 07/01/2011 07:41 PM, Mike Cooper wrote:
> Hi Martin,
>
> You're behind Texo too? You are a very, very busy guy. :)
>
> Tried to update in eclipse but got update errors:
>
>
> An error occurred while collecting items to be installed
> session context was:(profile=epp.package.jee, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=,
> action=).
> Artifact not found: osgi.bundle,org.eclipse.emf.texo,0.1.0.v201107011214.
> http://download.eclipse.org/modeling/emft/texo/updates/interim/plugins/org.eclipse.emf.texo_0.1.0.v201107011214.jar
> Problems downloading artifact: osgi.bundle,org.eclipse.emf.texo.generator,0.1.0.v201107011214.
> MD5 hash is not as expected. Expected: 0d7a841b3fac2cb1ddc1cd5d4cea33f9 and found a6db9e2b43501d0c9187740e37cd69bf.
> Artifact not found: osgi.bundle,org.eclipse.emf.texo.modelgenerator,0.1.0.v201107011214.
> http://download.eclipse.org/modeling/emft/texo/updates/interim/plugins/org.eclipse.emf.texo.modelgenerator_0.1.0.v201107011214.jar
>
> Artifact not found: osgi.bundle,org.eclipse.emf.texo.modelgenerator.edit,0.1.0.v201107011214.
> http://download.eclipse.org/modeling/emft/texo/updates/interim/plugins/org.eclipse.emf.texo.modelgenerator.edit_0.1.0.v201107011214.jar
>
> Artifact not found: osgi.bundle,org.eclipse.emf.texo.modelgenerator.edit.source,0.1.0.v201107011214.
> http://download.eclipse.org/modeling/emft/texo/updates/interim/plugins/org.eclipse.emf.texo.modelgenerator.edit.source_0.1.0.v201107011214.jar
>
> Artifact not found: osgi.bundle,org.eclipse.emf.texo.modelgenerator.source,0.1.0.v201107011214.
> http://download.eclipse.org/modeling/emft/texo/updates/interim/plugins/org.eclipse.emf.texo.modelgenerator.source_0.1.0.v201107011214.jar
>
> Artifact not found: osgi.bundle,org.eclipse.emf.texo.orm,0.1.0.v201107011214.
> http://download.eclipse.org/modeling/emft/texo/updates/interim/plugins/org.eclipse.emf.texo.orm_0.1.0.v201107011214.jar
> Artifact not found: osgi.bundle,org.eclipse.emf.texo.orm.edit,0.1.0.v201107011214.
> http://download.eclipse.org/modeling/emft/texo/updates/interim/plugins/org.eclipse.emf.texo.orm.edit_0.1.0.v201107011214.jar
>
> Artifact not found: osgi.bundle,org.eclipse.emf.texo.orm.edit.source,0.1.0.v201107011214.
> http://download.eclipse.org/modeling/emft/texo/updates/interim/plugins/org.eclipse.emf.texo.orm.edit.source_0.1.0.v201107011214.jar
>
> Artifact not found: osgi.bundle,org.eclipse.emf.texo.orm.source,0.1.0.v201107011214.
> http://download.eclipse.org/modeling/emft/texo/updates/interim/plugins/org.eclipse.emf.texo.orm.source_0.1.0.v201107011214.jar
>
> Artifact not found: osgi.bundle,org.eclipse.emf.texo.source,0.1.0.v201107011214.
> http://download.eclipse.org/modeling/emft/texo/updates/interim/plugins/org.eclipse.emf.texo.source_0.1.0.v201107011214.jar
> Artifact not found: osgi.bundle,org.eclipse.emf.texo.xml,0.1.0.v201107011214.
> http://download.eclipse.org/modeling/emft/texo/updates/interim/plugins/org.eclipse.emf.texo.xml_0.1.0.v201107011214.jar
> Artifact not found: osgi.bundle,org.eclipse.emf.texo.xml.source,0.1.0.v201107011214.
> http://download.eclipse.org/modeling/emft/texo/updates/interim/plugins/org.eclipse.emf.texo.xml.source_0.1.0.v201107011214.jar
>
>
>


--

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@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Previous Topic:[EEF] Issue with
Next Topic:[TEXO/Hibernate] Help with AnnotationException: No identifier specified
Goto Forum:
  


Current Time: Fri Apr 19 20:18:43 GMT 2024

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

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

Back to the top