UML2 genmodel properties for EClasses [message #495200] |
Wed, 04 November 2009 02:21  |
Eclipse User |
|
|
|
Hi all,
i'm using the UML2 genmodel to enhance EMF with UML2-specific
capabilities. I've found 2 properties, i really can't explain to myself,
namely 'Key' and 'Pluralization Exception'. What are the purposes for
these fields?
Thanks a lot
Timothy
|
|
|
|
Re: UML2 genmodel properties for EClasses [message #496373 is a reply to message #495647] |
Mon, 09 November 2009 14:36   |
Eclipse User |
|
|
|
The 'Key' attribute affects the createXXX() methods.
For example, in a TemplateableElement, we set TemplateSignature as a "key"
property. If you have a look at
TemplateableElement.createTemplateBinding() it takes as a parameter a
TemplateSignature.
All features that are required to uniquely create elements should be marked
as "key" features.
Cheers,
- James.
"Rafael Chaves" <rafael@abstratt.com> wrote in message
news:hcurli$39s$1@build.eclipse.org...
> For a property foo with upper bound > 1, the default accessor method will
> be:
>
> EList getFoos()
>
> But if you set pluralizationException to be true, the generated accessor
> will be EList getFoo().
>
> The key thing I don't know what is for.
>
> HTH,
>
> Rafael
> http://abstratt.com/blog/
>
> Timothy Marc wrote:
>> Hi all,
>>
>> i'm using the UML2 genmodel to enhance EMF with UML2-specific
>> capabilities. I've found 2 properties, i really can't explain to myself,
>> namely 'Key' and 'Pluralization Exception'. What are the purposes for
>> these fields?
>>
>> Thanks a lot
>> Timothy
|
|
|
|
Re: UML2 genmodel properties for EClasses [message #628029 is a reply to message #495200] |
Thu, 05 November 2009 10:40  |
Eclipse User |
|
|
|
For a property foo with upper bound > 1, the default accessor method
will be:
EList getFoos()
But if you set pluralizationException to be true, the generated accessor
will be EList getFoo().
The key thing I don't know what is for.
HTH,
Rafael
http://abstratt.com/blog/
Timothy Marc wrote:
> Hi all,
>
> i'm using the UML2 genmodel to enhance EMF with UML2-specific
> capabilities. I've found 2 properties, i really can't explain to myself,
> namely 'Key' and 'Pluralization Exception'. What are the purposes for
> these fields?
>
> Thanks a lot
> Timothy
|
|
|
Re: UML2 genmodel properties for EClasses [message #628036 is a reply to message #495647] |
Mon, 09 November 2009 14:36  |
Eclipse User |
|
|
|
The 'Key' attribute affects the createXXX() methods.
For example, in a TemplateableElement, we set TemplateSignature as a "key"
property. If you have a look at
TemplateableElement.createTemplateBinding() it takes as a parameter a
TemplateSignature.
All features that are required to uniquely create elements should be marked
as "key" features.
Cheers,
- James.
"Rafael Chaves" <rafael@abstratt.com> wrote in message
news:hcurli$39s$1@build.eclipse.org...
> For a property foo with upper bound > 1, the default accessor method will
> be:
>
> EList getFoos()
>
> But if you set pluralizationException to be true, the generated accessor
> will be EList getFoo().
>
> The key thing I don't know what is for.
>
> HTH,
>
> Rafael
> http://abstratt.com/blog/
>
> Timothy Marc wrote:
>> Hi all,
>>
>> i'm using the UML2 genmodel to enhance EMF with UML2-specific
>> capabilities. I've found 2 properties, i really can't explain to myself,
>> namely 'Key' and 'Pluralization Exception'. What are the purposes for
>> these fields?
>>
>> Thanks a lot
>> Timothy
|
|
|
|
Powered by
FUDForum. Page generated in 0.06610 seconds