Home » Modeling » UML2 » Confusion about Generalization and Extensions of Stereotypes
| |
Re: Confusion about Generalization and Extensions of Stereotypes [message #477941 is a reply to message #477939] |
Thu, 06 November 2008 16:37 |
Kenn Hussey Messages: 1620 Registered: July 2009 |
Senior Member |
|
|
Jochen,
Generalizations between stereotypes aren't necessary, but may be useful if
you find that several steretypes shared the same tags. Generally speaking,
it's better to create the extensions on concrete stereotypes, e.g. on the
leaf stereotypes in a hierarchy.
After you created your new extension to Association, did you redefine your
profile? In order for it to work, you'll need to redefine the profile, which
effectively updates the Ecore metadata so that it knows that the stereotype
can now be applied to associations. Of course, if you already have the
profile applied to a package, you'll need to reapply the profile to pick up
the latest version...
Kenn
"Jochen" <jochen.wuttke@gmx.de> wrote in message
news:geurlv$856$1@build.eclipse.org...
> Hi,
>
> I have a profile with a couple of stereotypes. I would like to apply a
> given stereotype to classes as well as associations. To create my profile
> I followed the steps in the tutorial that comes with Eclipse and that got
> me to the point where I can apply the stereotype to classes. Then I
> repeated the steps of creating an extension for uml:Association and was
> expecting that I then would be able to apply the stereotype to
> associations. That however doesn't work.
>
> Now here's my question:
> In the tutorial most stereotypes have "EStructuralFeature" as
> Generalization, and then an "Extension" to the actual UML Metaclass the
> stereotype should be applied to. What I'm not clear about is whether or
> not the Generalizations have anything to do with the applicability of
> stereotypes to model elements.
>
>
> Thanks,
> Jochen
|
|
|
Re: Confusion about Generalization and Extensions of Stereotypes [message #477945 is a reply to message #477941] |
Fri, 07 November 2008 09:59 |
Jochen Wuttke Messages: 41 Registered: July 2009 |
Member |
|
|
Kenn Hussey wrote:
> Jochen,
>
> Generalizations between stereotypes aren't necessary, but may be useful if
> you find that several steretypes shared the same tags. Generally speaking,
> it's better to create the extensions on concrete stereotypes, e.g. on the
> leaf stereotypes in a hierarchy.
>
> After you created your new extension to Association, did you redefine your
> profile? In order for it to work, you'll need to redefine the profile, which
> effectively updates the Ecore metadata so that it knows that the stereotype
> can now be applied to associations. Of course, if you already have the
> profile applied to a package, you'll need to reapply the profile to pick up
> the latest version...
That was the problem, I didn't redefine the profile. This leads me to a
question about the general workflow while developing a profile.
I'm working on this project with a colleague and we are extending the
profile in different parts. When he adds something new to the profile,
he simply re-defines the profile without deleting the previous
"definition". That leads to multiple "definitions" showing up in the
editor and in the file. However, this has the advantage that the models
using older versions of the profile will continue working and you can
still use the new elements.
Instead, I always delete all old definitions and the define the profile.
However, that way the models don't work anymore, because all the
identifiers are different.
I would say my way of doing things is more tidy, but creates a lot of
overhead, because we have to update the model every time. So what is the
suggested or intended workflow? Or is there no such thing, because
profiles are usually developed once and then only used?
Jochen
|
|
|
Re: Confusion about Generalization and Extensions of Stereotypes [message #477947 is a reply to message #477945] |
Fri, 07 November 2008 16:20 |
Kenn Hussey Messages: 1620 Registered: July 2009 |
Senior Member |
|
|
Jochen,
The older definitions are kept intentionally to support migration of models
that may be using previous versions of the profile. Whether your application
needs to support this is up to you. I know some consumers of UML2 have
introduced additional metadata/signifiance to specific definitions (e.g. by
calling them "releases") and provided a "purge" utility to help users
compact profiles that have grown over the development cycle...
Kenn
"Jochen" <jochen.wuttke@gmx.de> wrote in message
news:gf13ib$j49$1@build.eclipse.org...
> Kenn Hussey wrote:
>> Jochen,
>>
>> Generalizations between stereotypes aren't necessary, but may be useful
>> if you find that several steretypes shared the same tags. Generally
>> speaking, it's better to create the extensions on concrete stereotypes,
>> e.g. on the leaf stereotypes in a hierarchy.
>>
>> After you created your new extension to Association, did you redefine
>> your profile? In order for it to work, you'll need to redefine the
>> profile, which effectively updates the Ecore metadata so that it knows
>> that the stereotype can now be applied to associations. Of course, if you
>> already have the profile applied to a package, you'll need to reapply the
>> profile to pick up the latest version...
>
> That was the problem, I didn't redefine the profile. This leads me to a
> question about the general workflow while developing a profile.
>
> I'm working on this project with a colleague and we are extending the
> profile in different parts. When he adds something new to the profile, he
> simply re-defines the profile without deleting the previous "definition".
> That leads to multiple "definitions" showing up in the editor and in the
> file. However, this has the advantage that the models using older versions
> of the profile will continue working and you can still use the new
> elements.
> Instead, I always delete all old definitions and the define the profile.
> However, that way the models don't work anymore, because all the
> identifiers are different.
> I would say my way of doing things is more tidy, but creates a lot of
> overhead, because we have to update the model every time. So what is the
> suggested or intended workflow? Or is there no such thing, because
> profiles are usually developed once and then only used?
>
> Jochen
|
|
| |
Re: Confusion about Generalization and Extensions of Stereotypes [message #627150 is a reply to message #477939] |
Thu, 06 November 2008 16:37 |
Kenn Hussey Messages: 1620 Registered: July 2009 |
Senior Member |
|
|
Jochen,
Generalizations between stereotypes aren't necessary, but may be useful if
you find that several steretypes shared the same tags. Generally speaking,
it's better to create the extensions on concrete stereotypes, e.g. on the
leaf stereotypes in a hierarchy.
After you created your new extension to Association, did you redefine your
profile? In order for it to work, you'll need to redefine the profile, which
effectively updates the Ecore metadata so that it knows that the stereotype
can now be applied to associations. Of course, if you already have the
profile applied to a package, you'll need to reapply the profile to pick up
the latest version...
Kenn
"Jochen" <jochen.wuttke@gmx.de> wrote in message
news:geurlv$856$1@build.eclipse.org...
> Hi,
>
> I have a profile with a couple of stereotypes. I would like to apply a
> given stereotype to classes as well as associations. To create my profile
> I followed the steps in the tutorial that comes with Eclipse and that got
> me to the point where I can apply the stereotype to classes. Then I
> repeated the steps of creating an extension for uml:Association and was
> expecting that I then would be able to apply the stereotype to
> associations. That however doesn't work.
>
> Now here's my question:
> In the tutorial most stereotypes have "EStructuralFeature" as
> Generalization, and then an "Extension" to the actual UML Metaclass the
> stereotype should be applied to. What I'm not clear about is whether or
> not the Generalizations have anything to do with the applicability of
> stereotypes to model elements.
>
>
> Thanks,
> Jochen
|
|
|
Re: Confusion about Generalization and Extensions of Stereotypes [message #627154 is a reply to message #477941] |
Fri, 07 November 2008 09:59 |
Jochen Wuttke Messages: 41 Registered: July 2009 |
Member |
|
|
Kenn Hussey wrote:
> Jochen,
>
> Generalizations between stereotypes aren't necessary, but may be useful if
> you find that several steretypes shared the same tags. Generally speaking,
> it's better to create the extensions on concrete stereotypes, e.g. on the
> leaf stereotypes in a hierarchy.
>
> After you created your new extension to Association, did you redefine your
> profile? In order for it to work, you'll need to redefine the profile, which
> effectively updates the Ecore metadata so that it knows that the stereotype
> can now be applied to associations. Of course, if you already have the
> profile applied to a package, you'll need to reapply the profile to pick up
> the latest version...
That was the problem, I didn't redefine the profile. This leads me to a
question about the general workflow while developing a profile.
I'm working on this project with a colleague and we are extending the
profile in different parts. When he adds something new to the profile,
he simply re-defines the profile without deleting the previous
"definition". That leads to multiple "definitions" showing up in the
editor and in the file. However, this has the advantage that the models
using older versions of the profile will continue working and you can
still use the new elements.
Instead, I always delete all old definitions and the define the profile.
However, that way the models don't work anymore, because all the
identifiers are different.
I would say my way of doing things is more tidy, but creates a lot of
overhead, because we have to update the model every time. So what is the
suggested or intended workflow? Or is there no such thing, because
profiles are usually developed once and then only used?
Jochen
|
|
|
Re: Confusion about Generalization and Extensions of Stereotypes [message #627159 is a reply to message #477945] |
Fri, 07 November 2008 16:20 |
Kenn Hussey Messages: 1620 Registered: July 2009 |
Senior Member |
|
|
Jochen,
The older definitions are kept intentionally to support migration of models
that may be using previous versions of the profile. Whether your application
needs to support this is up to you. I know some consumers of UML2 have
introduced additional metadata/signifiance to specific definitions (e.g. by
calling them "releases") and provided a "purge" utility to help users
compact profiles that have grown over the development cycle...
Kenn
"Jochen" <jochen.wuttke@gmx.de> wrote in message
news:gf13ib$j49$1@build.eclipse.org...
> Kenn Hussey wrote:
>> Jochen,
>>
>> Generalizations between stereotypes aren't necessary, but may be useful
>> if you find that several steretypes shared the same tags. Generally
>> speaking, it's better to create the extensions on concrete stereotypes,
>> e.g. on the leaf stereotypes in a hierarchy.
>>
>> After you created your new extension to Association, did you redefine
>> your profile? In order for it to work, you'll need to redefine the
>> profile, which effectively updates the Ecore metadata so that it knows
>> that the stereotype can now be applied to associations. Of course, if you
>> already have the profile applied to a package, you'll need to reapply the
>> profile to pick up the latest version...
>
> That was the problem, I didn't redefine the profile. This leads me to a
> question about the general workflow while developing a profile.
>
> I'm working on this project with a colleague and we are extending the
> profile in different parts. When he adds something new to the profile, he
> simply re-defines the profile without deleting the previous "definition".
> That leads to multiple "definitions" showing up in the editor and in the
> file. However, this has the advantage that the models using older versions
> of the profile will continue working and you can still use the new
> elements.
> Instead, I always delete all old definitions and the define the profile.
> However, that way the models don't work anymore, because all the
> identifiers are different.
> I would say my way of doing things is more tidy, but creates a lot of
> overhead, because we have to update the model every time. So what is the
> suggested or intended workflow? Or is there no such thing, because
> profiles are usually developed once and then only used?
>
> Jochen
|
|
|
Goto Forum:
Current Time: Fri Apr 19 20:06:13 GMT 2024
Powered by FUDForum. Page generated in 0.04221 seconds
|