Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Multivalued feature names
Multivalued feature names [message #467985] Mon, 03 August 2009 14:09 Go to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 676
Registered: July 2009
Senior Member
Hey,

probably asked and discussed a thousand times already.

In generated API I like to use methods 'getApples()' and 'getPeaches()'
when a feature is multivalued, so I name the features 'apples' and
'peaches'. But this looks a bit stupid in serialized format...

<apples color='green'/>
<apples color='red'>
....

where I'd prefer
<apple color='green'/>
...

Probably no easy way to get both?


Felix
Re: Multivalued feature names [message #467989 is a reply to message #467985] Mon, 03 August 2009 14:21 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 30685
Registered: July 2009
Senior Member
Felix,

Comments below.

Felix Dorner wrote:
> Hey,
>
> probably asked and discussed a thousand times already.
>
> In generated API I like to use methods 'getApples()' and
> 'getPeaches()' when a feature is multivalued, so I name the features
> 'apples' and 'peaches'. But this looks a bit stupid in serialized
> format...
>
> <apples color='green'/>
> <apples color='red'>
> ...
>
> where I'd prefer
> <apple color='green'/>
> ..
>
> Probably no easy way to get both?
You can use extended meta data annotations as well as the associated
option (OPTION_EXTENDED_META_DATA) so that the annotations are respected
during load and save.
>
>
> Felix
Previous Topic:Cancellation of XMI load/save
Next Topic:Customize code generation.
Goto Forum:
  


Current Time: Fri Dec 06 17:40:30 GMT 2019

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

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

Back to the top