Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » UML2 genmodel properties for EClasses
UML2 genmodel properties for EClasses [message #495200] Wed, 04 November 2009 07:21 Go to next message
Timothy Marc is currently offline Timothy MarcFriend
Messages: 547
Registered: July 2009
Senior Member
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 #495647 is a reply to message #495200] Thu, 05 November 2009 15:40 Go to previous messageGo to next message
Rafael Chaves is currently offline Rafael ChavesFriend
Messages: 362
Registered: July 2009
Senior Member
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 #496373 is a reply to message #495647] Mon, 09 November 2009 19:36 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
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 #504287 is a reply to message #495647] Fri, 18 December 2009 04:46 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
The key property also affects the generated "look-up" methods.

Kenn
Re: UML2 genmodel properties for EClasses [message #628029 is a reply to message #495200] Thu, 05 November 2009 15:40 Go to previous message
Rafael Chaves is currently offline Rafael ChavesFriend
Messages: 362
Registered: July 2009
Senior Member
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 19:36 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
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 #628140 is a reply to message #495647] Fri, 18 December 2009 04:46 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
The key property also affects the generated "look-up" methods.

Kenn
Previous Topic:How to change label providers in UMLEditor?
Next Topic:UML2AdapterFactoryEditingDomain question
Goto Forum:
  


Current Time: Fri Mar 29 00:53:34 GMT 2024

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

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

Back to the top