|
Re: Multi Java Annotations in the model [message #986406 is a reply to message #986398] |
Tue, 20 November 2012 10:42 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Gabriele,
The content of the eannotation is a large text field, so you can put them all in one eannotation, that will work.
But it is probably no work to add support for this, can you enter a bugzilla for this?
gr. Martin
On 11/20/2012 11:30 AM, gabriele boldrin wrote:
> I've specified in the model a java annotation.
> If I insert more than one java annotation for node, TEXO considers only the first java annotation and the others are ignored.
>
>
> Example:
>
>
>
> Generation Code:
>
>
>
> /**
> * Returns the value of '<em><b>field2</b></em>' feature.
> *
> * <!-- begin-user-doc --> <!-- end-user-doc -->
> *
> * @return the value of '<em><b>field2</b></em>' feature
> * @generated
> */
> @Overview(Overview.DATE)
> public String getField2() {
> return field2;
> }
>
>
> code generation that I expect:
>
>
>
> /**
> * Returns the value of '<em><b>field2</b></em>' feature.
> *
> * <!-- begin-user-doc --> <!-- end-user-doc -->
> *
> * @return the value of '<em><b>field2</b></em>' feature
> * @generated
> */
> @Overview(Overview.DATE)
> @Overview(Overview.TEXT)
> public String getField2() {
> return field2;
> }
>
--
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: Multi Java Annotations in the model [message #991128 is a reply to message #991125] |
Mon, 17 December 2012 12:38 |
Erdal Karaca Messages: 854 Registered: July 2009 |
Senior Member |
|
|
Andreas Brieg wrote on Mon, 17 December 2012 13:26As a side node: the Java code you want to be generated won't be valid. You can't annotate something with the same annotation type more than once. You would need something like
@Overviews(@Overview(Overview.Date), @Overview(Overview.Text))
or
@Overview({Overview.Date, Overview.Text})
It is the second one as you can only have one optional value/attribute in a java annotation...
[Updated on: Mon, 17 December 2012 12:39] Report message to a moderator
|
|
|
Re: Multi Java Annotations in the model [message #991131 is a reply to message #991128] |
Mon, 17 December 2012 12:45 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Andreas,
Not sure which annotation/annotation type do you mean, is it related to Texo or to something else?
gr. Martin
On 12/17/2012 01:38 PM, Erdal Karaca wrote:
> Andreas Brieg wrote on Mon, 17 December 2012 13:26
>> As a side node: the Java code you want to be generated won't be valid. You can't annotate something with the same
>> annotation type more than once. You would need something like
>>
>> @Overviews(@Overview(Overview.Date), @Overview(Overview.Text))
>>
>> or
>>
>> @Overview({Overview.Date, Overview.Text})
>
>
--
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: Multi Java Annotations in the model [message #991138 is a reply to message #991131] |
Mon, 17 December 2012 13:15 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Ha Andreas,
Forget my question, I see now that you refer to (the invalid example in) the original question.
gr. Martin
On 12/17/2012 01:45 PM, Martin Taal wrote:
> Hi Andreas,
> Not sure which annotation/annotation type do you mean, is it related to Texo or to something else?
>
> gr. Martin
>
> On 12/17/2012 01:38 PM, Erdal Karaca wrote:
>> Andreas Brieg wrote on Mon, 17 December 2012 13:26
>>> As a side node: the Java code you want to be generated won't be valid. You can't annotate something with the same
>>> annotation type more than once. You would need something like
>>>
>>> @Overviews(@Overview(Overview.Date), @Overview(Overview.Text))
>>>
>>> or
>>>
>>> @Overview({Overview.Date, Overview.Text})
>>
>>
>
>
--
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
|
|
|
Powered by
FUDForum. Page generated in 0.05338 seconds