Home » Modeling » UML2 » storing stereotype/profile applications in arbitrary models
|
Re: storing stereotype/profile applications in arbitrary models [message #471348 is a reply to message #471346] |
Sat, 03 March 2007 13:41 |
Kenn Hussey Messages: 1620 Registered: July 2009 |
Senior Member |
|
|
Rafael,
By definition, profile applications must be owned by (and generally in the
same resource as) the package that has the profile applied to it - this is a
shortcoming in the specification, IMHO. Stereotype applications, on the
other hand, can certainly be placed in a different resource - just add the
result of Element#applyStereotype(Stereotype) to the contents of the other
resource, e.g.
otherResource.getContents().add(element.applyStereotype(ster eotype)).
Kenn
"Rafael Chaves" <chaves@inf.ufsc.nospam.br> wrote in message
news:es9fcd$mpl$1@utils.eclipse.org...
>I want to be able to apply stereotypes to a model but store the
>ProfileApplication and StereotypeApplication elements elsewhere. Think of a
>model that enriches another (read-only) model by applying stereotypes to
>its elements. Would that be feasible, at least from the point of view of
>the spec?
>
> From what I understand, StereotypeApplications and ProfileApplications are
> model elements themselves, so theoretically it should be possible to store
> them in a different model from the one they are applied to.
>
> One caveat seems that Element#applyStereotype and Package#applyProfile
> will add the corresponding StereotypeApplication and ProfileApplication
> objects to the target element/package namespace. I could adapt the
> implementation of those two methods to take a package where to store the
> application objects. Besides that, do you foresee any technical blocks?
>
> Thanks,
>
> Rafael
|
|
|
Re: storing stereotype/profile applications in arbitrary models [message #471349 is a reply to message #471348] |
Sat, 03 March 2007 15:52 |
Rafael Chaves Messages: 362 Registered: July 2009 |
Senior Member |
|
|
Thanks, Kenn.
Unfortunately, that means that my goal of allowing a package to
contribute stereotypes to 3rd-party packages is not feasible (because
before you can apply stereotypes to an element, you must apply the
profile defining the stereotypes to the package containing the target
elements).
Rafael
Kenn Hussey wrote:
> Rafael,
>
> By definition, profile applications must be owned by (and generally in the
> same resource as) the package that has the profile applied to it - this is a
> shortcoming in the specification, IMHO. Stereotype applications, on the
> other hand, can certainly be placed in a different resource - just add the
> result of Element#applyStereotype(Stereotype) to the contents of the other
> resource, e.g.
> otherResource.getContents().add(element.applyStereotype(ster eotype)).
>
> Kenn
>
> "Rafael Chaves" <chaves@inf.ufsc.nospam.br> wrote in message
> news:es9fcd$mpl$1@utils.eclipse.org...
>> I want to be able to apply stereotypes to a model but store the
>> ProfileApplication and StereotypeApplication elements elsewhere. Think of a
>> model that enriches another (read-only) model by applying stereotypes to
>> its elements. Would that be feasible, at least from the point of view of
>> the spec?
>>
>> From what I understand, StereotypeApplications and ProfileApplications are
>> model elements themselves, so theoretically it should be possible to store
>> them in a different model from the one they are applied to.
>>
>> One caveat seems that Element#applyStereotype and Package#applyProfile
>> will add the corresponding StereotypeApplication and ProfileApplication
>> objects to the target element/package namespace. I could adapt the
>> implementation of those two methods to take a package where to store the
>> application objects. Besides that, do you foresee any technical blocks?
>>
>> Thanks,
>>
>> Rafael
>
>
|
|
|
Re: storing stereotype/profile applications in arbitrary models [message #598240 is a reply to message #471346] |
Sat, 03 March 2007 13:41 |
Kenn Hussey Messages: 1620 Registered: July 2009 |
Senior Member |
|
|
Rafael,
By definition, profile applications must be owned by (and generally in the
same resource as) the package that has the profile applied to it - this is a
shortcoming in the specification, IMHO. Stereotype applications, on the
other hand, can certainly be placed in a different resource - just add the
result of Element#applyStereotype(Stereotype) to the contents of the other
resource, e.g.
otherResource.getContents().add(element.applyStereotype(ster eotype)).
Kenn
"Rafael Chaves" <chaves@inf.ufsc.nospam.br> wrote in message
news:es9fcd$mpl$1@utils.eclipse.org...
>I want to be able to apply stereotypes to a model but store the
>ProfileApplication and StereotypeApplication elements elsewhere. Think of a
>model that enriches another (read-only) model by applying stereotypes to
>its elements. Would that be feasible, at least from the point of view of
>the spec?
>
> From what I understand, StereotypeApplications and ProfileApplications are
> model elements themselves, so theoretically it should be possible to store
> them in a different model from the one they are applied to.
>
> One caveat seems that Element#applyStereotype and Package#applyProfile
> will add the corresponding StereotypeApplication and ProfileApplication
> objects to the target element/package namespace. I could adapt the
> implementation of those two methods to take a package where to store the
> application objects. Besides that, do you foresee any technical blocks?
>
> Thanks,
>
> Rafael
|
|
|
Re: storing stereotype/profile applications in arbitrary models [message #598249 is a reply to message #471348] |
Sat, 03 March 2007 15:52 |
Rafael Chaves Messages: 362 Registered: July 2009 |
Senior Member |
|
|
Thanks, Kenn.
Unfortunately, that means that my goal of allowing a package to
contribute stereotypes to 3rd-party packages is not feasible (because
before you can apply stereotypes to an element, you must apply the
profile defining the stereotypes to the package containing the target
elements).
Rafael
Kenn Hussey wrote:
> Rafael,
>
> By definition, profile applications must be owned by (and generally in the
> same resource as) the package that has the profile applied to it - this is a
> shortcoming in the specification, IMHO. Stereotype applications, on the
> other hand, can certainly be placed in a different resource - just add the
> result of Element#applyStereotype(Stereotype) to the contents of the other
> resource, e.g.
> otherResource.getContents().add(element.applyStereotype(ster eotype)).
>
> Kenn
>
> "Rafael Chaves" <chaves@inf.ufsc.nospam.br> wrote in message
> news:es9fcd$mpl$1@utils.eclipse.org...
>> I want to be able to apply stereotypes to a model but store the
>> ProfileApplication and StereotypeApplication elements elsewhere. Think of a
>> model that enriches another (read-only) model by applying stereotypes to
>> its elements. Would that be feasible, at least from the point of view of
>> the spec?
>>
>> From what I understand, StereotypeApplications and ProfileApplications are
>> model elements themselves, so theoretically it should be possible to store
>> them in a different model from the one they are applied to.
>>
>> One caveat seems that Element#applyStereotype and Package#applyProfile
>> will add the corresponding StereotypeApplication and ProfileApplication
>> objects to the target element/package namespace. I could adapt the
>> implementation of those two methods to take a package where to store the
>> application objects. Besides that, do you foresee any technical blocks?
>>
>> Thanks,
>>
>> Rafael
>
>
|
|
|
Goto Forum:
Current Time: Fri Apr 26 19:29:51 GMT 2024
Powered by FUDForum. Page generated in 0.02965 seconds
|