Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Annotations on EnumLiteral
Annotations on EnumLiteral [message #1005010] Thu, 24 January 2013 10:09 Go to next message
Pradeep Badiger is currently offline Pradeep BadigerFriend
Messages: 53
Registered: November 2012
Member
Annotations added via "texo.java.annotation" on an enum literal value is not added as part of the generated code, even though I see that been present on the enum template for reading the annotations.

I have created a bug for this

https://bugs.eclipse.org/bugs/show_bug.cgi?id=398950#c0

thanks,
Pradeep V.B.

[Updated on: Thu, 24 January 2013 10:10]

Report message to a moderator

Re: Annotations on EnumLiteral [message #1005375 is a reply to message #1005010] Fri, 25 January 2013 07:40 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Pradeep,
Yes this was/is a missing feature/bug, I tested a fix for this but I got into a problem with the part (jmerge) which
merges generated and manual source code for this specific location (enumliterals). This is a bigger thing to solve. I
will get back to you in the bugzilla if/when I know more.

But for now this (annotation on enumliteral) is not supported...

gr. Martin

On 01/24/2013 11:09 AM, Pradeep Badiger wrote:
> Annotations added via "texo.java.annotation" on an enum literal value is not added as part of the generated code, even
> though I see that been present on the enum template for reading the annotations.
>
> thanks,
> Pradeep V.B.


--

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: Annotations on EnumLiteral [message #1006363 is a reply to message #1005375] Thu, 31 January 2013 04:50 Go to previous messageGo to next message
Pradeep Badiger is currently offline Pradeep BadigerFriend
Messages: 53
Registered: November 2012
Member
Hi Martin,

Could you please point to me the location which is causing the problem. I would like to try this out from my side.

Also, I was thinking if we can support custom identifiers for the annotations apart from type, field, getter and setter. This will allow user to use these as code control identifiers inside templates.

Is there a limitation here?

thanks,
Pradeep V.B.
Re: Annotations on EnumLiteral [message #1006464 is a reply to message #1006363] Thu, 31 January 2013 12:02 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Pradeep,
I published a new build which sets annotations on enum literals, but it gives an error (only if the original enumliteral
does not yet have an annotation). It will fail in the SourceMerger class on line 119, this because jmerge incorrectly
merges a current and the new source (with the annotation on the enumliteral). I posted on the EMF forum to see if maybe
Ed knows more about it... See the post there for some details on the generated source/merged sources.

For custom identifiers, isn't this already possible? Or can you implement what you think of and then post a diff? That
would be even easier (and would get it in Texo quite fast :-).

gr. Martin


On 01/31/2013 05:50 AM, Pradeep Badiger wrote:
> Hi Martin,
>
> Could you please point to me the location which is causing the problem. I would like to try this out from my side.
>
> Also, I was thinking if we can support custom identifiers for the annotations apart from type, field, getter and setter.
> This will allow user to use these as code control identifiers inside templates.
>
> Is there a limitation here?
>
> thanks,
> Pradeep V.B.


--

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: Annotations on EnumLiteral [message #1006468 is a reply to message #1006464] Thu, 31 January 2013 12:24 Go to previous message
Pradeep Badiger is currently offline Pradeep BadigerFriend
Messages: 53
Registered: November 2012
Member
Thanks for the update Martin..

Yeah, the custom identifiers are indeed supported.. I missed this because I was working with enum literals. Sad

I will take an update and try this.

thanks,
Pradeep V.B.
Previous Topic:While loop with .ext language
Next Topic:[Edapt] Migrating an extended metamodel
Goto Forum:
  


Current Time: Thu Mar 28 08:41:54 GMT 2024

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

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

Back to the top