[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.uml2] Re: Stereotypes loosing their base classes?

If I don't delete it, the "define profile" action will duplicate the 
contents section within the annotations. Is this the expected outcome? It 
sounded strange for me at a first glance...

Does this mean that if I have a model with several stereotyped classes and I 
change the stereotype in its profile definition, I'll have to reapply the 
stereotype again in all classes? If so, is there an easy way of doing so?

Thanks a lot,
-- 
Ricardo Giacomin


"Kenn Hussey" <khussey@xxxxxxxxxx> wrote in message 
news:egivh0$fjf$1@xxxxxxxxxxxxxxxxxxxx
> Ricardo,
>
> Just as I suspected in my previous post, you are removing the Ecore 
> representation of the profile - this should not be done (as indicated in 
> the "Introduction to UML2 Profiles" article) unless you are sure no models 
> are referencing this metadata. Removing step 15 will eliminate the 
> problem.
>
> Kenn
>
> "Ricardo Giacomin" <giacomin@xxxxxxxxxxxxx> wrote in message 
> news:egh290$kfh$1@xxxxxxxxxxxxxxxxxxxx
>> The following sequence leads to the problem I mentioned. Hopefully you'll 
>> find what I'm doing wrongly.
>>
>> 1. Create a new profile (say p.profile.uml)
>> 2. Set 'p' as the name of the Profile root element
>> 3. Create a child Package Element Stereotype element
>> 4. Give it the name 's'
>> 5. Make the brand new profile to reference the metaclass uml::Class
>> 6. Create an extension for the stereotype 's' to uml::Class
>> 7. Define the profile.
>>
>> 8. Create a new model (say m.uml)
>> 9. Create a child Package Element Class element
>> 10. Load resource p.profile.uml from workspace
>> 11. Apply profile p to the brand new model
>> 12. Apply stereotype p::s to the new Class
>> 13. Save and close the model
>>
>> 14. Open p.profile.uml again
>> 15. Delete element p (child of "<Profile> p -> UML")
>> 16. Redefine profile p
>> 17. Open the model (m.uml) again
>>
>>
>> I believe the problem is the way I redefine de profile (steps 15 and 16). 
>> The problem persists regardless I unapply and reapply the profile.
>>
>> Regards,
>> -- 
>> Ricardo Giacomin
>>
>>
>>
>> "James Bruck" <jbruck@xxxxxxxxxx> wrote in message 
>> news:eggcu7$c14$1@xxxxxxxxxxxxxxxxxxxx
>>> If the profile has been changed in a significant way, I believe you 
>>> would
>>> have to redefine your profile ( ie create a new EPackage 
>>> representation )
>>> and then reapply your profile to your model, then re-open.  From my
>>> understanding, when you apply your profile, you are really referring to 
>>> the
>>> EPackage representation created in the profile as a result of defining 
>>> it.
>>> If you then start changing your profile, stereotypes etc, your EPackage
>>> could get out of sync.  ( it would depend on the kinds of changes you
>>> make ).  Kenn is the expert on profiles but that is my understanding.
>>>
>>> Did you try to redefine then reapply?
>>>
>>> - James.
>>>
>>> "Kenn Hussey" <khussey@xxxxxxxxxx> wrote in message
>>> news:eggbk7$3lq$1@xxxxxxxxxxxxxxxxxxxx
>>>> Ricardo,
>>>>
>>>> Did you do anything to your profiles (in addition to adding new
>>> stereotypes)
>>>> other than redefine them (e.g. removing any annotations or 
>>>> stereotypes)?
>>> If
>>>> you can post your models (or a representative sample), we'll try to 
>>>> find
>>> out
>>>> what is going wrong...
>>>>
>>>> Kenn
>>>>
>>>> "Ricardo Giacomin" <giacomin@xxxxxxxxxxxxx> wrote in message
>>>> news:egecge$q6k$1@xxxxxxxxxxxxxxxxxxxx
>>>> > Hi,
>>>> >
>>>> > Please refer to the image in attachment.
>>>> >
>>>> > There are 2 profiles (mad and mad.ui) applied to the gpao.uml model. 
>>>> > I
>>>> > applied the stereotypes in these profiles to the classes in the 
>>>> > model.
>>> For
>>>> > instance, the 3 selected classes had the <<Page>> stereotype. 
>>>> > Everthing
>>>> > worked fine in the first time I created and saved the model. After
>>> closing
>>>> > the document, I changed the profiles to include more stereotypes and
>>>> > redefined the profiles. Since then, when I open the document the
>>>> > stereotypes seem to not refer to the classes anymore (the attached
>>> picture
>>>> > depicts the problem).
>>>> >
>>>> > The symptom seems to be the same as reported by Laco (see thread 
>>>> > "model
>>>> > with stereotypes applied not saved correctly", on 10/3): all applied
>>>> > stereotypes are displayed as children of root element and not the
>>> classes
>>>> > which they were applied to (however, i'm not working programmatically
>>>> > neither have defined the prototype twice).
>>>> >
>>>> > Any help would be appreciated.
>>>> >
>>>> > Regards,
>>>> > -- 
>>>> > Ricardo Giacomin
>>>> >
>>>> >
>>>> >
>>>>
>>>>
>>>
>>>
>>
>>
>
>