Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Apply Ecore stereotype in UML2 editor
Apply Ecore stereotype in UML2 editor [message #526253] Fri, 09 April 2010 11:38 Go to next message
Karel Smutny is currently offline Karel SmutnyFriend
Messages: 22
Registered: July 2009
Junior Member
This would be a totally newbie question, but I just can't find any answer to it.

How do I apply a stereotype from Ecore profile in a blank UML2 file in UML2 editor? I tried to load resource Ecore.profile.uml (which I had extracted from some .jar deeply in Eclipse/plugin directory before), but clicking to UML Editor -> Element -> Apply stereotype... does not offer me any stereotype from Ecore profile applicable to selected element (say an operation).

Complementary question: Do I understand right that in order to model a subsetted/subsetting property or attribute/operation redefinition to be generated in EMF I need to apply EReference or EAttribute or EOperation (respectively) stereotypes to corresponding elements in my UML2 model?

Thanks a lot for any help
Karel
Re: Apply Ecore stereotype in UML2 editor [message #526278 is a reply to message #526253] Fri, 09 April 2010 12:50 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

Hi, Karel,

See some replies in-line, below.

HTH,

Christian


On 09/04/10 07:38 AM, Karel Smutny wrote:
> This would be a totally newbie question, but I just can't find any
> answer to it.
>
> How do I apply a stereotype from Ecore profile in a blank UML2 file in
> UML2 editor? I tried to load resource Ecore.profile.uml (which I had
> extracted from some .jar deeply in Eclipse/plugin directory before), but
> clicking to UML Editor -> Element -> Apply stereotype... does not offer
> me any stereotype from Ecore profile applicable to selected element (say
> an operation).

You must first apply the Ecore profile to some package (often the root
package) in your model. Then you can apply its stereotypes to elements
within that package and its sub-packages.

See the "UML Editor -> Package" menu in the main menu bar.


> Complementary question: Do I understand right that in order to model a
> subsetted/subsetting property or attribute/operation redefinition to be
> generated in EMF I need to apply EReference or EAttribute or EOperation
> (respectively) stereotypes to corresponding elements in my UML2 model?

No stereotypes are required for subsetting and redefinition. These are
purely UML constructs. Use the property sheet of your attributes and
operations to set these relationships.


> Thanks a lot for any help
> Karel
Re: Apply Ecore stereotype in UML2 editor [message #526981 is a reply to message #526278] Tue, 13 April 2010 15:47 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
This may also be of some use ...
http://www.eclipse.org/modeling/mdt/uml2/docs/articles/Intro duction_to_UML2_Profiles/article.html

"Christian W. Damus" <cdamus@qnx.com> wrote in message
news:hpn7qc$9ip$1@build.eclipse.org...
> Hi, Karel,
>
> See some replies in-line, below.
>
> HTH,
>
> Christian
>
>
> On 09/04/10 07:38 AM, Karel Smutny wrote:
>> This would be a totally newbie question, but I just can't find any
>> answer to it.
>>
>> How do I apply a stereotype from Ecore profile in a blank UML2 file in
>> UML2 editor? I tried to load resource Ecore.profile.uml (which I had
>> extracted from some .jar deeply in Eclipse/plugin directory before), but
>> clicking to UML Editor -> Element -> Apply stereotype... does not offer
>> me any stereotype from Ecore profile applicable to selected element (say
>> an operation).
>
> You must first apply the Ecore profile to some package (often the root
> package) in your model. Then you can apply its stereotypes to elements
> within that package and its sub-packages.
>
> See the "UML Editor -> Package" menu in the main menu bar.
>
>
>> Complementary question: Do I understand right that in order to model a
>> subsetted/subsetting property or attribute/operation redefinition to be
>> generated in EMF I need to apply EReference or EAttribute or EOperation
>> (respectively) stereotypes to corresponding elements in my UML2 model?
>
> No stereotypes are required for subsetting and redefinition. These are
> purely UML constructs. Use the property sheet of your attributes and
> operations to set these relationships.
>
>
>> Thanks a lot for any help
>> Karel
>
Re: Apply Ecore stereotype in UML2 editor [message #527375 is a reply to message #526981] Thu, 15 April 2010 05:48 Go to previous messageGo to next message
Timothy Marc is currently offline Timothy MarcFriend
Messages: 547
Registered: July 2009
Senior Member
Dear Karel,

if you want to use subsets and redefinitions in your EMF model (which is
natively not supported), you must model your metamodel as UML using
these capabilities of subsets and redefinitions and afterwards import
the UML model for the creation of an EMF model by the UML2 Importer. The
UML2 project provide a particular template for Ecore generation, using a
specific list framework for subsets and redefinitions.

Have fun
Timothy

James Bruck schrieb:
> This may also be of some use ...
> http://www.eclipse.org/modeling/mdt/uml2/docs/articles/Intro duction_to_UML2_Profiles/article.html
>
> "Christian W. Damus" <cdamus@qnx.com> wrote in message
> news:hpn7qc$9ip$1@build.eclipse.org...
>> Hi, Karel,
>>
>> See some replies in-line, below.
>>
>> HTH,
>>
>> Christian
>>
>>
>> On 09/04/10 07:38 AM, Karel Smutny wrote:
>>> This would be a totally newbie question, but I just can't find any
>>> answer to it.
>>>
>>> How do I apply a stereotype from Ecore profile in a blank UML2 file in
>>> UML2 editor? I tried to load resource Ecore.profile.uml (which I had
>>> extracted from some .jar deeply in Eclipse/plugin directory before), but
>>> clicking to UML Editor -> Element -> Apply stereotype... does not offer
>>> me any stereotype from Ecore profile applicable to selected element (say
>>> an operation).
>> You must first apply the Ecore profile to some package (often the root
>> package) in your model. Then you can apply its stereotypes to elements
>> within that package and its sub-packages.
>>
>> See the "UML Editor -> Package" menu in the main menu bar.
>>
>>
>>> Complementary question: Do I understand right that in order to model a
>>> subsetted/subsetting property or attribute/operation redefinition to be
>>> generated in EMF I need to apply EReference or EAttribute or EOperation
>>> (respectively) stereotypes to corresponding elements in my UML2 model?
>> No stereotypes are required for subsetting and redefinition. These are
>> purely UML constructs. Use the property sheet of your attributes and
>> operations to set these relationships.
>>
>>
>>> Thanks a lot for any help
>>> Karel
>
>
Re: Apply Ecore stereotype in UML2 editor [message #531207 is a reply to message #527375] Tue, 04 May 2010 08:08 Go to previous messageGo to next message
Karel Smutny is currently offline Karel SmutnyFriend
Messages: 22
Registered: July 2009
Junior Member
Hello,

Thank you for all your answers and sorry for my late answer.

I used redefinition and subsetting in my UML2 model in order with UML2 specs. What confused me was a message (in a UML2 importer wizard) "Operation 'B::xyz' should be annotated as redefinition of operation 'B::xyz'". So I thought there is some more annotation next to regular UML2 features.

Then I switched 'Redefining operations' option from 'Report' value to 'Process' and 'Duplicate operation' to Ignore. (One would think if the redefinition is properly set in a UML2 model it would NOT be reported as duplicate operation!)

All is OK now (the same for subsetting). Though a bit confusing (or contra-intuitive?) for a newbie user Wink Yet i might be doing something completelly wrong. Please correct me if I do.

Thanks!
K.
Re: Apply Ecore stereotype in UML2 editor [message #628361 is a reply to message #526278] Tue, 13 April 2010 15:47 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
This may also be of some use ...
http://www.eclipse.org/modeling/mdt/uml2/docs/articles/Intro duction_to_UML2_Profiles/article.html

"Christian W. Damus" <cdamus@qnx.com> wrote in message
news:hpn7qc$9ip$1@build.eclipse.org...
> Hi, Karel,
>
> See some replies in-line, below.
>
> HTH,
>
> Christian
>
>
> On 09/04/10 07:38 AM, Karel Smutny wrote:
>> This would be a totally newbie question, but I just can't find any
>> answer to it.
>>
>> How do I apply a stereotype from Ecore profile in a blank UML2 file in
>> UML2 editor? I tried to load resource Ecore.profile.uml (which I had
>> extracted from some .jar deeply in Eclipse/plugin directory before), but
>> clicking to UML Editor -> Element -> Apply stereotype... does not offer
>> me any stereotype from Ecore profile applicable to selected element (say
>> an operation).
>
> You must first apply the Ecore profile to some package (often the root
> package) in your model. Then you can apply its stereotypes to elements
> within that package and its sub-packages.
>
> See the "UML Editor -> Package" menu in the main menu bar.
>
>
>> Complementary question: Do I understand right that in order to model a
>> subsetted/subsetting property or attribute/operation redefinition to be
>> generated in EMF I need to apply EReference or EAttribute or EOperation
>> (respectively) stereotypes to corresponding elements in my UML2 model?
>
> No stereotypes are required for subsetting and redefinition. These are
> purely UML constructs. Use the property sheet of your attributes and
> operations to set these relationships.
>
>
>> Thanks a lot for any help
>> Karel
>
Re: Apply Ecore stereotype in UML2 editor [message #628368 is a reply to message #526981] Thu, 15 April 2010 05:48 Go to previous messageGo to next message
Timothy Marc is currently offline Timothy MarcFriend
Messages: 547
Registered: July 2009
Senior Member
Dear Karel,

if you want to use subsets and redefinitions in your EMF model (which is
natively not supported), you must model your metamodel as UML using
these capabilities of subsets and redefinitions and afterwards import
the UML model for the creation of an EMF model by the UML2 Importer. The
UML2 project provide a particular template for Ecore generation, using a
specific list framework for subsets and redefinitions.

Have fun
Timothy

James Bruck schrieb:
> This may also be of some use ...
> http://www.eclipse.org/modeling/mdt/uml2/docs/articles/Intro duction_to_UML2_Profiles/article.html
>
> "Christian W. Damus" <cdamus@qnx.com> wrote in message
> news:hpn7qc$9ip$1@build.eclipse.org...
>> Hi, Karel,
>>
>> See some replies in-line, below.
>>
>> HTH,
>>
>> Christian
>>
>>
>> On 09/04/10 07:38 AM, Karel Smutny wrote:
>>> This would be a totally newbie question, but I just can't find any
>>> answer to it.
>>>
>>> How do I apply a stereotype from Ecore profile in a blank UML2 file in
>>> UML2 editor? I tried to load resource Ecore.profile.uml (which I had
>>> extracted from some .jar deeply in Eclipse/plugin directory before), but
>>> clicking to UML Editor -> Element -> Apply stereotype... does not offer
>>> me any stereotype from Ecore profile applicable to selected element (say
>>> an operation).
>> You must first apply the Ecore profile to some package (often the root
>> package) in your model. Then you can apply its stereotypes to elements
>> within that package and its sub-packages.
>>
>> See the "UML Editor -> Package" menu in the main menu bar.
>>
>>
>>> Complementary question: Do I understand right that in order to model a
>>> subsetted/subsetting property or attribute/operation redefinition to be
>>> generated in EMF I need to apply EReference or EAttribute or EOperation
>>> (respectively) stereotypes to corresponding elements in my UML2 model?
>> No stereotypes are required for subsetting and redefinition. These are
>> purely UML constructs. Use the property sheet of your attributes and
>> operations to set these relationships.
>>
>>
>>> Thanks a lot for any help
>>> Karel
>
>
Re: Apply Ecore stereotype in UML2 editor [message #628433 is a reply to message #527375] Tue, 04 May 2010 08:08 Go to previous message
Karel Smutny is currently offline Karel SmutnyFriend
Messages: 22
Registered: July 2009
Junior Member
Hello,

Thank you for all your answers and sorry for my late answer.

I used redefinition and subsetting in my UML2 model in order with UML2 specs. What confused me was a message (in a UML2 importer wizard) "Operation 'B::xyz' should be annotated as redefinition of operation 'B::xyz'". So I thought there is some more annotation next to regular UML2 features.

Then I switched 'Redefining operations' option from 'Report' value to 'Process' and 'Duplicate operation' to Ignore. (One would think if the redefinition is properly set in a UML2 model it would NOT be reported as duplicate operation!)

All is OK now (the same for subsetting). Though a bit confusing (or contra-intuitive?) for a newbie user ;) Yet i might be doing something completelly wrong. Please correct me if I do.

Thanks!
K.
Previous Topic:Static Profiles and predefined type system
Next Topic:Using shared editing domain for tree and diagram editors
Goto Forum:
  


Current Time: Thu Mar 28 15:51:09 GMT 2024

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

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

Back to the top