[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.mdt.uml2] Re: Question about extending classes with multiple stereotypes
|
My apologies about the delay on this one.
You are right! Once the stereotypes are applied, there is no way to unapply
them. This is an issue. Please raise a defect on that.
In terms of being able to apply the stereotypes, it does seem reasonable to
allow the application of the stereotypes as can be done from the editor.
What is the desired behavior that you would like to see? There seems to be
ambiguity in this area from the position of the spec. but the way the
application works now seems to be ok.
By the way, I had to "define" the profile you provided in the snippet below
and then re-apply. I don't think you were using static profile definition?
Cheers,
- James.
"James Bruck" <jbruck@xxxxxxxxxx> wrote in message
news:gfk49b$lmt$1@xxxxxxxxxxxxxxxxxxxx
> ... I haven't forgotten about this ... will look into later today :)
>
>
> "Alex " <eistoeter@xxxxxx> wrote in message
> news:a883f38111657994158a234966ee7db7$1@xxxxxxxxxxxxxxxxxx
>> Hi James. Thanks for your interest in this problem.
>>
>> Here comes the profile:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <uml:Profile xmi:version="2.1"
>> xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
>> xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML"
>> xmi:id="_itvycKXKEd2-KYIfOrm7fA" name="Faktor-IPS Profile"
>> metaclassReference="_qVRZoKwOEd2sZYFMsQch6A">
>> <elementImport xmi:id="_qVRZoKwOEd2sZYFMsQch6A" alias="Class">
>> <importedElement xmi:type="uml:Class"
>> href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
>> </elementImport>
>> <packagedElement xmi:type="uml:Stereotype"
>> xmi:id="_mvNcwKXKEd2-KYIfOrm7fA" name="PolicyCmptType">
>> <generalization xmi:id="_nVypYKwREd2z9Lg5-Fmnrw"
>> general="_e6t6gKwREd2z9Lg5-Fmnrw"/>
>> </packagedElement>
>> <packagedElement xmi:type="uml:Stereotype"
>> xmi:id="_-9kMQKXMEd2-KYIfOrm7fA" name="ProductCmptType2">
>> <generalization xmi:id="_wkZG8KwREd2z9Lg5-Fmnrw"
>> general="_e6t6gKwREd2z9Lg5-Fmnrw"/>
>> </packagedElement>
>> <packagedElement xmi:type="uml:Stereotype"
>> xmi:id="_e6t6gKwREd2z9Lg5-Fmnrw" name="Type" isAbstract="true">
>> <ownedAttribute xmi:id="_7pE8YawREd2z9Lg5-Fmnrw" name="base_Class"
>> association="_7o4IEKwREd2z9Lg5-Fmnrw">
>> <type xmi:type="uml:Class"
>> href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
>> </ownedAttribute>
>> </packagedElement>
>> <packagedElement xmi:type="uml:Extension"
>> xmi:id="_7o4IEKwREd2z9Lg5-Fmnrw" name="Class_Type"
>> memberEnd="_7pE8YKwREd2z9Lg5-Fmnrw _7pE8YawREd2z9Lg5-Fmnrw">
>> <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_7pE8YKwREd2z9Lg5-Fmnrw"
>> name="extension_IpsObject" type="_e6t6gKwREd2z9Lg5-Fmnrw"
>> aggregation="composite" association="_7o4IEKwREd2z9Lg5-Fmnrw">
>> <lowerValue xmi:type="uml:LiteralInteger"
>> xmi:id="_BwxTYKwSEd2z9Lg5-Fmnrw" value="1"/>
>> </ownedEnd>
>> </packagedElement>
>> </uml:Profile>
>>
>> And here comes an example model for it. I should not be able to assign
>> these two stereotypes to myclass but only one of both:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:FaktorIPSProfile="http:///schemas/FaktorIPSProfile/_Ztp10LCdEd2r-NXccNaiJQ/0"
>> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
>> xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML"
>> xsi:schemaLocation="http:///schemas/FaktorIPSProfile/_Ztp10LCdEd2r-NXccNaiJQ/0
>> ./../plugin/org.faktorips.uml/FaktorIpsProfile.profile.uml#_Ztzm0LCdEd2r-NXccNaiJQ">
>> <uml:Model xmi:id="_q8bikK0GEd2GcoPSbdQh2w" name="example">
>> <packagedElement xmi:type="uml:Class" xmi:id="_48SHILDAEd24mM2Z0RL5og"
>> name="myclass"/>
>> <profileApplication xmi:id="_3ZgFwLDAEd24mM2Z0RL5og">
>> <eAnnotations xmi:id="_3ZpPsLDAEd24mM2Z0RL5og"
>> source="http://www.eclipse.org/uml2/2.0.0/UML">
>> <references xmi:type="ecore:EPackage"
>> href="../../plugin/org.faktorips.uml/FaktorIpsProfile.profile.uml#_Ztzm0LCdEd2r-NXccNaiJQ"/>
>> </eAnnotations>
>> <appliedProfile
>> href="../../plugin/org.faktorips.uml/FaktorIpsProfile.profile.uml#_itvycKXKEd2-KYIfOrm7fA"/>
>> </profileApplication>
>> </uml:Model>
>> <FaktorIPSProfile:PolicyCmptType xmi:id="_7-YmMLDAEd24mM2Z0RL5og"
>> base_Class="_48SHILDAEd24mM2Z0RL5og"/>
>> <FaktorIPSProfile:ProductCmptType2 xmi:id="_7-i-QLDAEd24mM2Z0RL5og"
>> base_Class="_48SHILDAEd24mM2Z0RL5og"/>
>> </xmi:XMI>
>>
>> Even more critical is, that I have no possibility to unassign any of
>> these two stereotypes. So I can add one stereotype and I can't unassign
>> it. This is the wanted behaviour. But I can add another stereotype and
>> then I can't unassign any of these two.
>>
>>
>>
>
>