Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Applying stereotypes
Applying stereotypes [message #478657] Sun, 02 August 2009 06:39 Go to next message
Eban Escott is currently offline Eban EscottFriend
Messages: 61
Registered: July 2009
Member
Hello, I am doing my first UML2 profile and have been following the
article below.

http://www.eclipse.org/modeling/mdt/uml2/docs/articles/Intro duction_to_UML2_Profiles/article.html

It all seems to go well up until the 'Applying Stereotypes' section step 3:

1) Select an element (i.e. <Property> pendingOrders : PurchaseOrder [0..*]
in <Class> Supplier) in the UML editor.
2) Select the UML Editor > Element > Apply Stereotype… menu item.
3) Choose a stereotype (i.e. ecore::EReference), press the Add button,
then press the OK button.

When the dialogue appears with the available choices it is empty!? Hmm, I
have tried it several times and playd around with it and searched the
newsgroup but I can't work it out. I am sure it will be simple as all the
doco states that doing a lightweight extension is easy :)

For what reason could the choices dialogue be empty? I have applied the
profile as per the previous steps in the article.

Thanks in advance
Eban
Re: Applying stereotypes [message #478658 is a reply to message #478657] Mon, 03 August 2009 12:00 Go to previous messageGo to next message
Tas Frangoullides is currently offline Tas FrangoullidesFriend
Messages: 195
Registered: July 2009
Senior Member
Hi Eban,

Have you applied the profile to the model as described in the previous step?
Do you see a <Profile Application> under the model.

Tas


"Eban Escott" <eban.escott@uqconnect.edu.au> wrote in message
news:fd8d76f91955252da3593d39eb0c29d8$1@www.eclipse.org...
> Hello, I am doing my first UML2 profile and have been following the
> article below.
>
> http://www.eclipse.org/modeling/mdt/uml2/docs/articles/Intro duction_to_UML2_Profiles/article.html
>
> It all seems to go well up until the 'Applying Stereotypes' section step
> 3:
>
> 1) Select an element (i.e. <Property> pendingOrders : PurchaseOrder [0..*]
> in <Class> Supplier) in the UML editor.
> 2) Select the UML Editor > Element > Apply Stereotype… menu item.
> 3) Choose a stereotype (i.e. ecore::EReference), press the Add button,
> then press the OK button.
>
> When the dialogue appears with the available choices it is empty!? Hmm, I
> have tried it several times and playd around with it and searched the
> newsgroup but I can't work it out. I am sure it will be simple as all the
> doco states that doing a lightweight extension is easy :)
>
> For what reason could the choices dialogue be empty? I have applied the
> profile as per the previous steps in the article.
>
> Thanks in advance
> Eban
>
Re: Applying stereotypes [message #478665 is a reply to message #478658] Tue, 04 August 2009 23:19 Go to previous messageGo to next message
Eban Escott is currently offline Eban EscottFriend
Messages: 61
Registered: July 2009
Member
Hi Tas, fair question and the answer is yes, I can see the <Profile
Application> with my profile name. Here is a snippet out of my model that
I am trying to apply the profile to ...

<uml:Package xmi:version="2.1"
xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML"
xmi:id="_0_66AHTmEd6IgYzPRYD2Nw" name="InputV">

...

<profileApplication xmi:id="_itRSgH8tEd6YbOsakxhBTg">
<eAnnotations xmi:id="_itRSgX8tEd6YbOsakxhBTg"
source="http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="ecore:EPackage"
href="../../Profile/model/My.profile.uml#_UKhawX8tEd6YbOsakxhBTg "/>
</eAnnotations>
<appliedProfile
href="../../Profile/model/My.profile.uml#_i9mfcH8rEd6YbOsakxhBTg "/>
</profileApplication>

So, does this look ok? Then I guess the other possible mistake I have made
is in the profile itself. I don't normally like posting masses like this
but here it is ...

<?xml version="1.0" encoding="UTF-8"?>
<uml:Profile xmi:version="2.1"
xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML"
xmi:id="_i9mfcH8rEd6YbOsakxhBTg" name="my"
metaclassReference="_Fu--QH8tEd6YbOsakxhBTg">
<eAnnotations xmi:id="_UKhawH8tEd6YbOsakxhBTg"
source="http://www.eclipse.org/uml2/2.0.0/UML">
<contents xmi:type="ecore:EPackage" xmi:id="_UKhawX8tEd6YbOsakxhBTg"
name="my" nsURI="http:///schemas/my/_UKgzsH8tEd6YbOsakxhBTg/0"
nsPrefix="my">
<eClassifiers xmi:type="ecore:EClass"
xmi:id="_UKhawn8tEd6YbOsakxhBTg" name="EStructuralFeature" abstract="true">
<eAnnotations xmi:id="_UKhaw38tEd6YbOsakxhBTg"
source="http://www.eclipse.org/uml2/2.0.0/UML"
references="_BeCi8H8sEd6YbOsakxhBTg"/>
<eStructuralFeatures xmi:type="ecore:EAttribute"
xmi:id="_UKhaxH8tEd6YbOsakxhBTg" name="isTransient" ordered="false"
defaultValueLiteral="true">
<eType xmi:type="ecore:EDataType"
href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass"
xmi:id="_UKhaxn8tEd6YbOsakxhBTg" name="EAttribute" abstract="true"
eSuperTypes="_UKhawn8tEd6YbOsakxhBTg">
<eAnnotations xmi:id="_UKhax38tEd6YbOsakxhBTg"
source="http://www.eclipse.org/uml2/2.0.0/UML"
references="_HGeyIH8sEd6YbOsakxhBTg"/>
<eStructuralFeatures xmi:type="ecore:EReference"
xmi:id="_UKhayH8tEd6YbOsakxhBTg" name="base_Property" ordered="false"
lowerBound="1">
<eType xmi:type="ecore:EClass"
href="http://www.eclipse.org/uml2/3.0.0/UML#//Property"/>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass"
xmi:id="_UKhay38tEd6YbOsakxhBTg" name="EReference" abstract="true"
eSuperTypes="_UKhawn8tEd6YbOsakxhBTg">
<eAnnotations xmi:id="_UKhazH8tEd6YbOsakxhBTg"
source="http://www.eclipse.org/uml2/2.0.0/UML"
references="_Mk2fUH8sEd6YbOsakxhBTg"/>
<eStructuralFeatures xmi:type="ecore:EReference"
xmi:id="_UKhazX8tEd6YbOsakxhBTg" name="base_Property" ordered="false"
lowerBound="1">
<eType xmi:type="ecore:EClass"
href="http://www.eclipse.org/uml2/3.0.0/UML#//Property"/>
</eStructuralFeatures>
</eClassifiers>
</contents>
</eAnnotations>
<elementImport xmi:id="_3qiBgH8rEd6YbOsakxhBTg">
<importedElement xmi:type="uml:PrimitiveType"
href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolea n"/>
</elementImport>
<elementImport xmi:id="_3qiBgX8rEd6YbOsakxhBTg">
<importedElement xmi:type="uml:PrimitiveType"
href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
</elementImport>
<elementImport xmi:id="_Fu--QH8tEd6YbOsakxhBTg">
<importedElement xmi:type="uml:Class"
href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
</elementImport>
<packagedElement xmi:type="uml:Stereotype"
xmi:id="_BeCi8H8sEd6YbOsakxhBTg" name="EStructuralFeature"
isAbstract="true">
<ownedAttribute xmi:id="_gOf_cH8sEd6YbOsakxhBTg" name="isTransient">
<type xmi:type="uml:PrimitiveType"
href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolea n"/>
<lowerValue xmi:type="uml:LiteralInteger"
xmi:id="_n4PYAH8sEd6YbOsakxhBTg"/>
<defaultValue xmi:type="uml:LiteralBoolean"
xmi:id="_rdIbEH8sEd6YbOsakxhBTg" value="true"/>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Stereotype"
xmi:id="_HGeyIH8sEd6YbOsakxhBTg" name="EAttribute" isAbstract="true">
<generalization xmi:id="_SF7iQH8sEd6YbOsakxhBTg"
general="_BeCi8H8sEd6YbOsakxhBTg"/>
<ownedAttribute xmi:id="_NXaIMn8tEd6YbOsakxhBTg" name="base_Property"
association="_NXaIMH8tEd6YbOsakxhBTg">
<type xmi:type="uml:Class"
href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Stereotype"
xmi:id="_Mk2fUH8sEd6YbOsakxhBTg" name="EReference" isAbstract="true">
<generalization xmi:id="_Zz3eUH8sEd6YbOsakxhBTg"
general="_BeCi8H8sEd6YbOsakxhBTg"/>
<ownedAttribute xmi:id="_QVkicn8tEd6YbOsakxhBTg" name="base_Property"
association="_QVkicH8tEd6YbOsakxhBTg">
<type xmi:type="uml:Class"
href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Extension"
xmi:id="_NXaIMH8tEd6YbOsakxhBTg" name="Property_EAttribute"
memberEnd="_NXaIMX8tEd6YbOsakxhBTg _NXaIMn8tEd6YbOsakxhBTg">
<ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_NXaIMX8tEd6YbOsakxhBTg"
name="extension_EAttribute" type="_HGeyIH8sEd6YbOsakxhBTg"
aggregation="composite" association="_NXaIMH8tEd6YbOsakxhBTg"/>
</packagedElement>
<packagedElement xmi:type="uml:Extension"
xmi:id="_QVkicH8tEd6YbOsakxhBTg" name="Property_EReference"
memberEnd="_QVkicX8tEd6YbOsakxhBTg _QVkicn8tEd6YbOsakxhBTg">
<ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_QVkicX8tEd6YbOsakxhBTg"
name="extension_EReference" type="_Mk2fUH8sEd6YbOsakxhBTg"
aggregation="composite" association="_QVkicH8tEd6YbOsakxhBTg"/>
</packagedElement>
</uml:Profile>

Thanks again Tas!!
Re: Applying stereotypes [message #478666 is a reply to message #478665] Tue, 04 August 2009 23:38 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Eban,

Is the profile in the same location relative to the model when you load
it as when you saved it (after applying the profile)?

Kenn

Eban Escott wrote:
> Hi Tas, fair question and the answer is yes, I can see the <Profile
> Application> with my profile name. Here is a snippet out of my model
> that I am trying to apply the profile to ...
>
> <uml:Package xmi:version="2.1"
> xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
> xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML"
> xmi:id="_0_66AHTmEd6IgYzPRYD2Nw" name="InputV">
>
> ..
>
> <profileApplication xmi:id="_itRSgH8tEd6YbOsakxhBTg">
> <eAnnotations xmi:id="_itRSgX8tEd6YbOsakxhBTg"
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <references xmi:type="ecore:EPackage"
> href="../../Profile/model/My.profile.uml#_UKhawX8tEd6YbOsakxhBTg "/>
> </eAnnotations>
> <appliedProfile
> href="../../Profile/model/My.profile.uml#_i9mfcH8rEd6YbOsakxhBTg "/>
> </profileApplication>
>
> So, does this look ok? Then I guess the other possible mistake I have
> made is in the profile itself. I don't normally like posting masses like
> this but here it is ...
>
> <?xml version="1.0" encoding="UTF-8"?>
> <uml:Profile xmi:version="2.1"
> xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
> xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML"
> xmi:id="_i9mfcH8rEd6YbOsakxhBTg" name="my"
> metaclassReference="_Fu--QH8tEd6YbOsakxhBTg">
> <eAnnotations xmi:id="_UKhawH8tEd6YbOsakxhBTg"
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <contents xmi:type="ecore:EPackage" xmi:id="_UKhawX8tEd6YbOsakxhBTg"
> name="my" nsURI="http:///schemas/my/_UKgzsH8tEd6YbOsakxhBTg/0"
> nsPrefix="my">
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_UKhawn8tEd6YbOsakxhBTg" name="EStructuralFeature" abstract="true">
> <eAnnotations xmi:id="_UKhaw38tEd6YbOsakxhBTg"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_BeCi8H8sEd6YbOsakxhBTg"/>
> <eStructuralFeatures xmi:type="ecore:EAttribute"
> xmi:id="_UKhaxH8tEd6YbOsakxhBTg" name="isTransient" ordered="false"
> defaultValueLiteral="true">
> <eType xmi:type="ecore:EDataType"
> href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_UKhaxn8tEd6YbOsakxhBTg" name="EAttribute" abstract="true"
> eSuperTypes="_UKhawn8tEd6YbOsakxhBTg">
> <eAnnotations xmi:id="_UKhax38tEd6YbOsakxhBTg"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_HGeyIH8sEd6YbOsakxhBTg"/>
> <eStructuralFeatures xmi:type="ecore:EReference"
> xmi:id="_UKhayH8tEd6YbOsakxhBTg" name="base_Property" ordered="false"
> lowerBound="1">
> <eType xmi:type="ecore:EClass"
> href="http://www.eclipse.org/uml2/3.0.0/UML#//Property"/>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_UKhay38tEd6YbOsakxhBTg" name="EReference" abstract="true"
> eSuperTypes="_UKhawn8tEd6YbOsakxhBTg">
> <eAnnotations xmi:id="_UKhazH8tEd6YbOsakxhBTg"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_Mk2fUH8sEd6YbOsakxhBTg"/>
> <eStructuralFeatures xmi:type="ecore:EReference"
> xmi:id="_UKhazX8tEd6YbOsakxhBTg" name="base_Property" ordered="false"
> lowerBound="1">
> <eType xmi:type="ecore:EClass"
> href="http://www.eclipse.org/uml2/3.0.0/UML#//Property"/>
> </eStructuralFeatures>
> </eClassifiers>
> </contents>
> </eAnnotations>
> <elementImport xmi:id="_3qiBgH8rEd6YbOsakxhBTg">
> <importedElement xmi:type="uml:PrimitiveType"
> href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolea n"/>
> </elementImport>
> <elementImport xmi:id="_3qiBgX8rEd6YbOsakxhBTg">
> <importedElement xmi:type="uml:PrimitiveType"
> href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
> </elementImport>
> <elementImport xmi:id="_Fu--QH8tEd6YbOsakxhBTg">
> <importedElement xmi:type="uml:Class"
> href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
> </elementImport>
> <packagedElement xmi:type="uml:Stereotype"
> xmi:id="_BeCi8H8sEd6YbOsakxhBTg" name="EStructuralFeature"
> isAbstract="true">
> <ownedAttribute xmi:id="_gOf_cH8sEd6YbOsakxhBTg" name="isTransient">
> <type xmi:type="uml:PrimitiveType"
> href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolea n"/>
> <lowerValue xmi:type="uml:LiteralInteger"
> xmi:id="_n4PYAH8sEd6YbOsakxhBTg"/>
> <defaultValue xmi:type="uml:LiteralBoolean"
> xmi:id="_rdIbEH8sEd6YbOsakxhBTg" value="true"/>
> </ownedAttribute>
> </packagedElement>
> <packagedElement xmi:type="uml:Stereotype"
> xmi:id="_HGeyIH8sEd6YbOsakxhBTg" name="EAttribute" isAbstract="true">
> <generalization xmi:id="_SF7iQH8sEd6YbOsakxhBTg"
> general="_BeCi8H8sEd6YbOsakxhBTg"/>
> <ownedAttribute xmi:id="_NXaIMn8tEd6YbOsakxhBTg" name="base_Property"
> association="_NXaIMH8tEd6YbOsakxhBTg">
> <type xmi:type="uml:Class"
> href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
> </ownedAttribute>
> </packagedElement>
> <packagedElement xmi:type="uml:Stereotype"
> xmi:id="_Mk2fUH8sEd6YbOsakxhBTg" name="EReference" isAbstract="true">
> <generalization xmi:id="_Zz3eUH8sEd6YbOsakxhBTg"
> general="_BeCi8H8sEd6YbOsakxhBTg"/>
> <ownedAttribute xmi:id="_QVkicn8tEd6YbOsakxhBTg" name="base_Property"
> association="_QVkicH8tEd6YbOsakxhBTg">
> <type xmi:type="uml:Class"
> href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
> </ownedAttribute>
> </packagedElement>
> <packagedElement xmi:type="uml:Extension"
> xmi:id="_NXaIMH8tEd6YbOsakxhBTg" name="Property_EAttribute"
> memberEnd="_NXaIMX8tEd6YbOsakxhBTg _NXaIMn8tEd6YbOsakxhBTg">
> <ownedEnd xmi:type="uml:ExtensionEnd"
> xmi:id="_NXaIMX8tEd6YbOsakxhBTg" name="extension_EAttribute"
> type="_HGeyIH8sEd6YbOsakxhBTg" aggregation="composite"
> association="_NXaIMH8tEd6YbOsakxhBTg"/>
> </packagedElement>
> <packagedElement xmi:type="uml:Extension"
> xmi:id="_QVkicH8tEd6YbOsakxhBTg" name="Property_EReference"
> memberEnd="_QVkicX8tEd6YbOsakxhBTg _QVkicn8tEd6YbOsakxhBTg">
> <ownedEnd xmi:type="uml:ExtensionEnd"
> xmi:id="_QVkicX8tEd6YbOsakxhBTg" name="extension_EReference"
> type="_Mk2fUH8sEd6YbOsakxhBTg" aggregation="composite"
> association="_QVkicH8tEd6YbOsakxhBTg"/>
> </packagedElement>
> </uml:Profile>
>
> Thanks again Tas!!
>
Re: Applying stereotypes [message #478668 is a reply to message #478665] Wed, 05 August 2009 10:05 Go to previous messageGo to next message
Tas Frangoullides is currently offline Tas FrangoullidesFriend
Messages: 195
Registered: July 2009
Senior Member
Hi Eban,

I think I see the problem. Your EAttribute and EReference stereotypes are
declared as abstract. You need to change isAbstract to false for both those
stereotypes. EStructuralFeature should remain abstract. I think you'll need
to define the profile again and reapply it.

Tas


"Eban Escott" <eban.escott@uqconnect.edu.au> wrote in message
news:9b04da2e9a22a36f8a66dba47d9ea645$1@www.eclipse.org...
> Hi Tas, fair question and the answer is yes, I can see the <Profile
> Application> with my profile name. Here is a snippet out of my model that
> I am trying to apply the profile to ...
>
> <uml:Package xmi:version="2.1"
> xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
> xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML"
> xmi:id="_0_66AHTmEd6IgYzPRYD2Nw" name="InputV">
>
> ..
>
> <profileApplication xmi:id="_itRSgH8tEd6YbOsakxhBTg">
> <eAnnotations xmi:id="_itRSgX8tEd6YbOsakxhBTg"
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <references xmi:type="ecore:EPackage"
> href="../../Profile/model/My.profile.uml#_UKhawX8tEd6YbOsakxhBTg "/>
> </eAnnotations>
> <appliedProfile
> href="../../Profile/model/My.profile.uml#_i9mfcH8rEd6YbOsakxhBTg "/>
> </profileApplication>
>
> So, does this look ok? Then I guess the other possible mistake I have made
> is in the profile itself. I don't normally like posting masses like this
> but here it is ...
>
> <?xml version="1.0" encoding="UTF-8"?>
> <uml:Profile xmi:version="2.1"
> xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
> xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML"
> xmi:id="_i9mfcH8rEd6YbOsakxhBTg" name="my"
> metaclassReference="_Fu--QH8tEd6YbOsakxhBTg">
> <eAnnotations xmi:id="_UKhawH8tEd6YbOsakxhBTg"
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <contents xmi:type="ecore:EPackage" xmi:id="_UKhawX8tEd6YbOsakxhBTg"
> name="my" nsURI="http:///schemas/my/_UKgzsH8tEd6YbOsakxhBTg/0"
> nsPrefix="my">
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_UKhawn8tEd6YbOsakxhBTg" name="EStructuralFeature"
> abstract="true">
> <eAnnotations xmi:id="_UKhaw38tEd6YbOsakxhBTg"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_BeCi8H8sEd6YbOsakxhBTg"/>
> <eStructuralFeatures xmi:type="ecore:EAttribute"
> xmi:id="_UKhaxH8tEd6YbOsakxhBTg" name="isTransient" ordered="false"
> defaultValueLiteral="true">
> <eType xmi:type="ecore:EDataType"
> href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_UKhaxn8tEd6YbOsakxhBTg" name="EAttribute" abstract="true"
> eSuperTypes="_UKhawn8tEd6YbOsakxhBTg">
> <eAnnotations xmi:id="_UKhax38tEd6YbOsakxhBTg"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_HGeyIH8sEd6YbOsakxhBTg"/>
> <eStructuralFeatures xmi:type="ecore:EReference"
> xmi:id="_UKhayH8tEd6YbOsakxhBTg" name="base_Property" ordered="false"
> lowerBound="1">
> <eType xmi:type="ecore:EClass"
> href="http://www.eclipse.org/uml2/3.0.0/UML#//Property"/>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_UKhay38tEd6YbOsakxhBTg" name="EReference" abstract="true"
> eSuperTypes="_UKhawn8tEd6YbOsakxhBTg">
> <eAnnotations xmi:id="_UKhazH8tEd6YbOsakxhBTg"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_Mk2fUH8sEd6YbOsakxhBTg"/>
> <eStructuralFeatures xmi:type="ecore:EReference"
> xmi:id="_UKhazX8tEd6YbOsakxhBTg" name="base_Property" ordered="false"
> lowerBound="1">
> <eType xmi:type="ecore:EClass"
> href="http://www.eclipse.org/uml2/3.0.0/UML#//Property"/>
> </eStructuralFeatures>
> </eClassifiers>
> </contents>
> </eAnnotations>
> <elementImport xmi:id="_3qiBgH8rEd6YbOsakxhBTg">
> <importedElement xmi:type="uml:PrimitiveType"
> href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolea n"/>
> </elementImport>
> <elementImport xmi:id="_3qiBgX8rEd6YbOsakxhBTg">
> <importedElement xmi:type="uml:PrimitiveType"
> href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
> </elementImport>
> <elementImport xmi:id="_Fu--QH8tEd6YbOsakxhBTg">
> <importedElement xmi:type="uml:Class"
> href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
> </elementImport>
> <packagedElement xmi:type="uml:Stereotype"
> xmi:id="_BeCi8H8sEd6YbOsakxhBTg" name="EStructuralFeature"
> isAbstract="true">
> <ownedAttribute xmi:id="_gOf_cH8sEd6YbOsakxhBTg" name="isTransient">
> <type xmi:type="uml:PrimitiveType"
> href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolea n"/>
> <lowerValue xmi:type="uml:LiteralInteger"
> xmi:id="_n4PYAH8sEd6YbOsakxhBTg"/>
> <defaultValue xmi:type="uml:LiteralBoolean"
> xmi:id="_rdIbEH8sEd6YbOsakxhBTg" value="true"/>
> </ownedAttribute>
> </packagedElement>
> <packagedElement xmi:type="uml:Stereotype"
> xmi:id="_HGeyIH8sEd6YbOsakxhBTg" name="EAttribute" isAbstract="true">
> <generalization xmi:id="_SF7iQH8sEd6YbOsakxhBTg"
> general="_BeCi8H8sEd6YbOsakxhBTg"/>
> <ownedAttribute xmi:id="_NXaIMn8tEd6YbOsakxhBTg" name="base_Property"
> association="_NXaIMH8tEd6YbOsakxhBTg">
> <type xmi:type="uml:Class"
> href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
> </ownedAttribute>
> </packagedElement>
> <packagedElement xmi:type="uml:Stereotype"
> xmi:id="_Mk2fUH8sEd6YbOsakxhBTg" name="EReference" isAbstract="true">
> <generalization xmi:id="_Zz3eUH8sEd6YbOsakxhBTg"
> general="_BeCi8H8sEd6YbOsakxhBTg"/>
> <ownedAttribute xmi:id="_QVkicn8tEd6YbOsakxhBTg" name="base_Property"
> association="_QVkicH8tEd6YbOsakxhBTg">
> <type xmi:type="uml:Class"
> href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
> </ownedAttribute>
> </packagedElement>
> <packagedElement xmi:type="uml:Extension"
> xmi:id="_NXaIMH8tEd6YbOsakxhBTg" name="Property_EAttribute"
> memberEnd="_NXaIMX8tEd6YbOsakxhBTg _NXaIMn8tEd6YbOsakxhBTg">
> <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_NXaIMX8tEd6YbOsakxhBTg"
> name="extension_EAttribute" type="_HGeyIH8sEd6YbOsakxhBTg"
> aggregation="composite" association="_NXaIMH8tEd6YbOsakxhBTg"/>
> </packagedElement>
> <packagedElement xmi:type="uml:Extension"
> xmi:id="_QVkicH8tEd6YbOsakxhBTg" name="Property_EReference"
> memberEnd="_QVkicX8tEd6YbOsakxhBTg _QVkicn8tEd6YbOsakxhBTg">
> <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_QVkicX8tEd6YbOsakxhBTg"
> name="extension_EReference" type="_Mk2fUH8sEd6YbOsakxhBTg"
> aggregation="composite" association="_QVkicH8tEd6YbOsakxhBTg"/>
> </packagedElement>
> </uml:Profile>
>
> Thanks again Tas!!
>
Re: Applying stereotypes [message #478669 is a reply to message #478668] Wed, 05 August 2009 10:08 Go to previous messageGo to next message
Tas Frangoullides is currently offline Tas FrangoullidesFriend
Messages: 195
Registered: July 2009
Senior Member
Also, notice that in the UML editor abstract elements appear in italics.


"Tas Frangoullides" <tfrangoullides@model-driven.co.uk> wrote in message
news:h5blhe$29q$1@build.eclipse.org...
> Hi Eban,
>
> I think I see the problem. Your EAttribute and EReference stereotypes are
> declared as abstract. You need to change isAbstract to false for both
> those stereotypes. EStructuralFeature should remain abstract. I think
> you'll need to define the profile again and reapply it.
>
> Tas
>
>
> "Eban Escott" <eban.escott@uqconnect.edu.au> wrote in message
> news:9b04da2e9a22a36f8a66dba47d9ea645$1@www.eclipse.org...
>> Hi Tas, fair question and the answer is yes, I can see the <Profile
>> Application> with my profile name. Here is a snippet out of my model that
>> I am trying to apply the profile to ...
>>
>> <uml:Package xmi:version="2.1"
>> xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
>> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
>> xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML"
>> xmi:id="_0_66AHTmEd6IgYzPRYD2Nw" name="InputV">
>>
>> ..
>>
>> <profileApplication xmi:id="_itRSgH8tEd6YbOsakxhBTg">
>> <eAnnotations xmi:id="_itRSgX8tEd6YbOsakxhBTg"
>> source="http://www.eclipse.org/uml2/2.0.0/UML">
>> <references xmi:type="ecore:EPackage"
>> href="../../Profile/model/My.profile.uml#_UKhawX8tEd6YbOsakxhBTg "/>
>> </eAnnotations>
>> <appliedProfile
>> href="../../Profile/model/My.profile.uml#_i9mfcH8rEd6YbOsakxhBTg "/>
>> </profileApplication>
>>
>> So, does this look ok? Then I guess the other possible mistake I have
>> made is in the profile itself. I don't normally like posting masses like
>> this but here it is ...
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <uml:Profile xmi:version="2.1"
>> xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
>> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
>> xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML"
>> xmi:id="_i9mfcH8rEd6YbOsakxhBTg" name="my"
>> metaclassReference="_Fu--QH8tEd6YbOsakxhBTg">
>> <eAnnotations xmi:id="_UKhawH8tEd6YbOsakxhBTg"
>> source="http://www.eclipse.org/uml2/2.0.0/UML">
>> <contents xmi:type="ecore:EPackage" xmi:id="_UKhawX8tEd6YbOsakxhBTg"
>> name="my" nsURI="http:///schemas/my/_UKgzsH8tEd6YbOsakxhBTg/0"
>> nsPrefix="my">
>> <eClassifiers xmi:type="ecore:EClass"
>> xmi:id="_UKhawn8tEd6YbOsakxhBTg" name="EStructuralFeature"
>> abstract="true">
>> <eAnnotations xmi:id="_UKhaw38tEd6YbOsakxhBTg"
>> source="http://www.eclipse.org/uml2/2.0.0/UML"
>> references="_BeCi8H8sEd6YbOsakxhBTg"/>
>> <eStructuralFeatures xmi:type="ecore:EAttribute"
>> xmi:id="_UKhaxH8tEd6YbOsakxhBTg" name="isTransient" ordered="false"
>> defaultValueLiteral="true">
>> <eType xmi:type="ecore:EDataType"
>> href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
>> </eStructuralFeatures>
>> </eClassifiers>
>> <eClassifiers xmi:type="ecore:EClass"
>> xmi:id="_UKhaxn8tEd6YbOsakxhBTg" name="EAttribute" abstract="true"
>> eSuperTypes="_UKhawn8tEd6YbOsakxhBTg">
>> <eAnnotations xmi:id="_UKhax38tEd6YbOsakxhBTg"
>> source="http://www.eclipse.org/uml2/2.0.0/UML"
>> references="_HGeyIH8sEd6YbOsakxhBTg"/>
>> <eStructuralFeatures xmi:type="ecore:EReference"
>> xmi:id="_UKhayH8tEd6YbOsakxhBTg" name="base_Property" ordered="false"
>> lowerBound="1">
>> <eType xmi:type="ecore:EClass"
>> href="http://www.eclipse.org/uml2/3.0.0/UML#//Property"/>
>> </eStructuralFeatures>
>> </eClassifiers>
>> <eClassifiers xmi:type="ecore:EClass"
>> xmi:id="_UKhay38tEd6YbOsakxhBTg" name="EReference" abstract="true"
>> eSuperTypes="_UKhawn8tEd6YbOsakxhBTg">
>> <eAnnotations xmi:id="_UKhazH8tEd6YbOsakxhBTg"
>> source="http://www.eclipse.org/uml2/2.0.0/UML"
>> references="_Mk2fUH8sEd6YbOsakxhBTg"/>
>> <eStructuralFeatures xmi:type="ecore:EReference"
>> xmi:id="_UKhazX8tEd6YbOsakxhBTg" name="base_Property" ordered="false"
>> lowerBound="1">
>> <eType xmi:type="ecore:EClass"
>> href="http://www.eclipse.org/uml2/3.0.0/UML#//Property"/>
>> </eStructuralFeatures>
>> </eClassifiers>
>> </contents>
>> </eAnnotations>
>> <elementImport xmi:id="_3qiBgH8rEd6YbOsakxhBTg">
>> <importedElement xmi:type="uml:PrimitiveType"
>> href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolea n"/>
>> </elementImport>
>> <elementImport xmi:id="_3qiBgX8rEd6YbOsakxhBTg">
>> <importedElement xmi:type="uml:PrimitiveType"
>> href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
>> </elementImport>
>> <elementImport xmi:id="_Fu--QH8tEd6YbOsakxhBTg">
>> <importedElement xmi:type="uml:Class"
>> href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
>> </elementImport>
>> <packagedElement xmi:type="uml:Stereotype"
>> xmi:id="_BeCi8H8sEd6YbOsakxhBTg" name="EStructuralFeature"
>> isAbstract="true">
>> <ownedAttribute xmi:id="_gOf_cH8sEd6YbOsakxhBTg" name="isTransient">
>> <type xmi:type="uml:PrimitiveType"
>> href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolea n"/>
>> <lowerValue xmi:type="uml:LiteralInteger"
>> xmi:id="_n4PYAH8sEd6YbOsakxhBTg"/>
>> <defaultValue xmi:type="uml:LiteralBoolean"
>> xmi:id="_rdIbEH8sEd6YbOsakxhBTg" value="true"/>
>> </ownedAttribute>
>> </packagedElement>
>> <packagedElement xmi:type="uml:Stereotype"
>> xmi:id="_HGeyIH8sEd6YbOsakxhBTg" name="EAttribute" isAbstract="true">
>> <generalization xmi:id="_SF7iQH8sEd6YbOsakxhBTg"
>> general="_BeCi8H8sEd6YbOsakxhBTg"/>
>> <ownedAttribute xmi:id="_NXaIMn8tEd6YbOsakxhBTg" name="base_Property"
>> association="_NXaIMH8tEd6YbOsakxhBTg">
>> <type xmi:type="uml:Class"
>> href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
>> </ownedAttribute>
>> </packagedElement>
>> <packagedElement xmi:type="uml:Stereotype"
>> xmi:id="_Mk2fUH8sEd6YbOsakxhBTg" name="EReference" isAbstract="true">
>> <generalization xmi:id="_Zz3eUH8sEd6YbOsakxhBTg"
>> general="_BeCi8H8sEd6YbOsakxhBTg"/>
>> <ownedAttribute xmi:id="_QVkicn8tEd6YbOsakxhBTg" name="base_Property"
>> association="_QVkicH8tEd6YbOsakxhBTg">
>> <type xmi:type="uml:Class"
>> href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
>> </ownedAttribute>
>> </packagedElement>
>> <packagedElement xmi:type="uml:Extension"
>> xmi:id="_NXaIMH8tEd6YbOsakxhBTg" name="Property_EAttribute"
>> memberEnd="_NXaIMX8tEd6YbOsakxhBTg _NXaIMn8tEd6YbOsakxhBTg">
>> <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_NXaIMX8tEd6YbOsakxhBTg"
>> name="extension_EAttribute" type="_HGeyIH8sEd6YbOsakxhBTg"
>> aggregation="composite" association="_NXaIMH8tEd6YbOsakxhBTg"/>
>> </packagedElement>
>> <packagedElement xmi:type="uml:Extension"
>> xmi:id="_QVkicH8tEd6YbOsakxhBTg" name="Property_EReference"
>> memberEnd="_QVkicX8tEd6YbOsakxhBTg _QVkicn8tEd6YbOsakxhBTg">
>> <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_QVkicX8tEd6YbOsakxhBTg"
>> name="extension_EReference" type="_Mk2fUH8sEd6YbOsakxhBTg"
>> aggregation="composite" association="_QVkicH8tEd6YbOsakxhBTg"/>
>> </packagedElement>
>> </uml:Profile>
>>
>> Thanks again Tas!!
>>
>
Re: Applying stereotypes [message #478670 is a reply to message #478666] Wed, 05 August 2009 23:21 Go to previous messageGo to next message
Eban Escott is currently offline Eban EscottFriend
Messages: 61
Registered: July 2009
Member
Hey Kenn, I have not moved the profile after defining and saving it. I
have have 2 projects in my workspace, one with the .profile.uml and one
with the .uml.

Firstly, for the .profile.uml I do ...

1. Highlight the <profile> twirl-down
2. UML Editor -> Profile -> Define and it reports operation success
3. I then save it by File -> Save

From within the .uml I do ...

1. UML Editor -> Load Resource -> Choose Browse Workspace
2. Navigate to the other project and choose the .profile.uml (it appears
in the list below the package)
3. Highlight the <Package> twirl-down
4. UML Editor -> Package -> Apply Profile ... add the profile (<Profile
Application> appears)

Is this the correct procedure?

Thanks heaps Kenn for the help.
Eban
Re: Applying stereotypes [message #478671 is a reply to message #478669] Wed, 05 August 2009 23:30 Go to previous messageGo to next message
Eban Escott is currently offline Eban EscottFriend
Messages: 61
Registered: July 2009
Member
Hey Tas, I got excited as I thought this could be it ... but no :( I made
the changes and it is still the same. I also downloaded the source code
down the bottom of

http://www.eclipse.org/modeling/mdt/uml2/docs/articles/Getti ng_Started_with_UML2/article.html

Inside the zip file is a the profile example I am trying to create but
using a different profile name ... Ecore.profile.uml. I copied this into
my workspace, defined it, saved it, loaded it and still no luck.

I am starting to feel a little stupid as all the doco says applying
stereotypes is easy but I can't seem to get it. Could you maybe try with
the profile from the zip file?

Also, I am stretching here ... but are there any restrictions on what
packaged elements you can apply a stereotype? I am trying to apply a
stereotype to a class.

Thanks heaps!
Eban
Re: Applying stereotypes [message #478672 is a reply to message #478671] Wed, 05 August 2009 23:50 Go to previous messageGo to next message
Eban Escott is currently offline Eban EscottFriend
Messages: 61
Registered: July 2009
Member
Tas! I sort of worked it out from my last question to you? I quote from
the tutorial

"stereotypes defined in the profile can be applied to instances of the
appropriate metaclasses (as per the defined extensions)"

So, the stereotypes I created can only be applied to <Property> not
<Class> because of the extension points I use?

I don't fully understand it yet but I can now apply a stereotype from a
profile to a property!!! Sweet.

Thanks for your patience.
Eban
Re: Applying stereotypes [message #479202 is a reply to message #478672] Mon, 10 August 2009 08:44 Go to previous message
Tas Frangoullides is currently offline Tas FrangoullidesFriend
Messages: 195
Registered: July 2009
Senior Member
Hi Eban,

Sorry for the late reply. I was away on a short vacation.

I'm glad you have it working now. That's right, Profiles are considered a
"Lightweight" extension of the meta-model and you have to decide which parts
of the meta-model to extend. It is possible to have a stereotype extend more
than one metaclass so that the stereotype can be applied on multiple types.
Also, the stereotype can be applied to all sub-classes of the extended
metaclass.

Tas


"Eban Escott" <eban.escott@uqconnect.edu.au> wrote in message
news:18672070559dba8e9a6e94aa41e3e28a$1@www.eclipse.org...
> Tas! I sort of worked it out from my last question to you? I quote from
> the tutorial
>
> "stereotypes defined in the profile can be applied to instances of the
> appropriate metaclasses (as per the defined extensions)"
>
> So, the stereotypes I created can only be applied to <Property> not
> <Class> because of the extension points I use?
>
> I don't fully understand it yet but I can now apply a stereotype from a
> profile to a property!!! Sweet.
>
> Thanks for your patience.
> Eban
>
Re: Applying stereotypes [message #627836 is a reply to message #478657] Mon, 03 August 2009 12:00 Go to previous message
Tas Frangoullides is currently offline Tas FrangoullidesFriend
Messages: 195
Registered: July 2009
Senior Member
Hi Eban,

Have you applied the profile to the model as described in the previous step?
Do you see a <Profile Application> under the model.

Tas


"Eban Escott" <eban.escott@uqconnect.edu.au> wrote in message
news:fd8d76f91955252da3593d39eb0c29d8$1@www.eclipse.org...
> Hello, I am doing my first UML2 profile and have been following the
> article below.
>
> http://www.eclipse.org/modeling/mdt/uml2/docs/articles/Intro duction_to_UML2_Profiles/article.html
>
> It all seems to go well up until the 'Applying Stereotypes' section step
> 3:
>
> 1) Select an element (i.e. <Property> pendingOrders : PurchaseOrder [0..*]
> in <Class> Supplier) in the UML editor.
> 2) Select the UML Editor > Element > Apply Stereotype… menu item.
> 3) Choose a stereotype (i.e. ecore::EReference), press the Add button,
> then press the OK button.
>
> When the dialogue appears with the available choices it is empty!? Hmm, I
> have tried it several times and playd around with it and searched the
> newsgroup but I can't work it out. I am sure it will be simple as all the
> doco states that doing a lightweight extension is easy :)
>
> For what reason could the choices dialogue be empty? I have applied the
> profile as per the previous steps in the article.
>
> Thanks in advance
> Eban
>
Re: Applying stereotypes [message #627845 is a reply to message #478658] Tue, 04 August 2009 23:19 Go to previous message
Eban Escott is currently offline Eban EscottFriend
Messages: 61
Registered: July 2009
Member
Hi Tas, fair question and the answer is yes, I can see the <Profile
Application> with my profile name. Here is a snippet out of my model that
I am trying to apply the profile to ...

<uml:Package xmi:version="2.1"
xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML"
xmi:id="_0_66AHTmEd6IgYzPRYD2Nw" name="InputV">

...

<profileApplication xmi:id="_itRSgH8tEd6YbOsakxhBTg">
<eAnnotations xmi:id="_itRSgX8tEd6YbOsakxhBTg"
source="http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="ecore:EPackage"
href="../../Profile/model/My.profile.uml#_UKhawX8tEd6YbOsakxhBTg "/>
</eAnnotations>
<appliedProfile
href="../../Profile/model/My.profile.uml#_i9mfcH8rEd6YbOsakxhBTg "/>
</profileApplication>

So, does this look ok? Then I guess the other possible mistake I have made
is in the profile itself. I don't normally like posting masses like this
but here it is ...

<?xml version="1.0" encoding="UTF-8"?>
<uml:Profile xmi:version="2.1"
xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML"
xmi:id="_i9mfcH8rEd6YbOsakxhBTg" name="my"
metaclassReference="_Fu--QH8tEd6YbOsakxhBTg">
<eAnnotations xmi:id="_UKhawH8tEd6YbOsakxhBTg"
source="http://www.eclipse.org/uml2/2.0.0/UML">
<contents xmi:type="ecore:EPackage" xmi:id="_UKhawX8tEd6YbOsakxhBTg"
name="my" nsURI="http:///schemas/my/_UKgzsH8tEd6YbOsakxhBTg/0"
nsPrefix="my">
<eClassifiers xmi:type="ecore:EClass"
xmi:id="_UKhawn8tEd6YbOsakxhBTg" name="EStructuralFeature" abstract="true">
<eAnnotations xmi:id="_UKhaw38tEd6YbOsakxhBTg"
source="http://www.eclipse.org/uml2/2.0.0/UML"
references="_BeCi8H8sEd6YbOsakxhBTg"/>
<eStructuralFeatures xmi:type="ecore:EAttribute"
xmi:id="_UKhaxH8tEd6YbOsakxhBTg" name="isTransient" ordered="false"
defaultValueLiteral="true">
<eType xmi:type="ecore:EDataType"
href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass"
xmi:id="_UKhaxn8tEd6YbOsakxhBTg" name="EAttribute" abstract="true"
eSuperTypes="_UKhawn8tEd6YbOsakxhBTg">
<eAnnotations xmi:id="_UKhax38tEd6YbOsakxhBTg"
source="http://www.eclipse.org/uml2/2.0.0/UML"
references="_HGeyIH8sEd6YbOsakxhBTg"/>
<eStructuralFeatures xmi:type="ecore:EReference"
xmi:id="_UKhayH8tEd6YbOsakxhBTg" name="base_Property" ordered="false"
lowerBound="1">
<eType xmi:type="ecore:EClass"
href="http://www.eclipse.org/uml2/3.0.0/UML#//Property"/>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass"
xmi:id="_UKhay38tEd6YbOsakxhBTg" name="EReference" abstract="true"
eSuperTypes="_UKhawn8tEd6YbOsakxhBTg">
<eAnnotations xmi:id="_UKhazH8tEd6YbOsakxhBTg"
source="http://www.eclipse.org/uml2/2.0.0/UML"
references="_Mk2fUH8sEd6YbOsakxhBTg"/>
<eStructuralFeatures xmi:type="ecore:EReference"
xmi:id="_UKhazX8tEd6YbOsakxhBTg" name="base_Property" ordered="false"
lowerBound="1">
<eType xmi:type="ecore:EClass"
href="http://www.eclipse.org/uml2/3.0.0/UML#//Property"/>
</eStructuralFeatures>
</eClassifiers>
</contents>
</eAnnotations>
<elementImport xmi:id="_3qiBgH8rEd6YbOsakxhBTg">
<importedElement xmi:type="uml:PrimitiveType"
href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolea n"/>
</elementImport>
<elementImport xmi:id="_3qiBgX8rEd6YbOsakxhBTg">
<importedElement xmi:type="uml:PrimitiveType"
href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
</elementImport>
<elementImport xmi:id="_Fu--QH8tEd6YbOsakxhBTg">
<importedElement xmi:type="uml:Class"
href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
</elementImport>
<packagedElement xmi:type="uml:Stereotype"
xmi:id="_BeCi8H8sEd6YbOsakxhBTg" name="EStructuralFeature"
isAbstract="true">
<ownedAttribute xmi:id="_gOf_cH8sEd6YbOsakxhBTg" name="isTransient">
<type xmi:type="uml:PrimitiveType"
href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolea n"/>
<lowerValue xmi:type="uml:LiteralInteger"
xmi:id="_n4PYAH8sEd6YbOsakxhBTg"/>
<defaultValue xmi:type="uml:LiteralBoolean"
xmi:id="_rdIbEH8sEd6YbOsakxhBTg" value="true"/>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Stereotype"
xmi:id="_HGeyIH8sEd6YbOsakxhBTg" name="EAttribute" isAbstract="true">
<generalization xmi:id="_SF7iQH8sEd6YbOsakxhBTg"
general="_BeCi8H8sEd6YbOsakxhBTg"/>
<ownedAttribute xmi:id="_NXaIMn8tEd6YbOsakxhBTg" name="base_Property"
association="_NXaIMH8tEd6YbOsakxhBTg">
<type xmi:type="uml:Class"
href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Stereotype"
xmi:id="_Mk2fUH8sEd6YbOsakxhBTg" name="EReference" isAbstract="true">
<generalization xmi:id="_Zz3eUH8sEd6YbOsakxhBTg"
general="_BeCi8H8sEd6YbOsakxhBTg"/>
<ownedAttribute xmi:id="_QVkicn8tEd6YbOsakxhBTg" name="base_Property"
association="_QVkicH8tEd6YbOsakxhBTg">
<type xmi:type="uml:Class"
href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Extension"
xmi:id="_NXaIMH8tEd6YbOsakxhBTg" name="Property_EAttribute"
memberEnd="_NXaIMX8tEd6YbOsakxhBTg _NXaIMn8tEd6YbOsakxhBTg">
<ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_NXaIMX8tEd6YbOsakxhBTg"
name="extension_EAttribute" type="_HGeyIH8sEd6YbOsakxhBTg"
aggregation="composite" association="_NXaIMH8tEd6YbOsakxhBTg"/>
</packagedElement>
<packagedElement xmi:type="uml:Extension"
xmi:id="_QVkicH8tEd6YbOsakxhBTg" name="Property_EReference"
memberEnd="_QVkicX8tEd6YbOsakxhBTg _QVkicn8tEd6YbOsakxhBTg">
<ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_QVkicX8tEd6YbOsakxhBTg"
name="extension_EReference" type="_Mk2fUH8sEd6YbOsakxhBTg"
aggregation="composite" association="_QVkicH8tEd6YbOsakxhBTg"/>
</packagedElement>
</uml:Profile>

Thanks again Tas!!
Re: Applying stereotypes [message #627846 is a reply to message #478665] Tue, 04 August 2009 23:38 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Eban,

Is the profile in the same location relative to the model when you load
it as when you saved it (after applying the profile)?

Kenn

Eban Escott wrote:
> Hi Tas, fair question and the answer is yes, I can see the <Profile
> Application> with my profile name. Here is a snippet out of my model
> that I am trying to apply the profile to ...
>
> <uml:Package xmi:version="2.1"
> xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
> xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML"
> xmi:id="_0_66AHTmEd6IgYzPRYD2Nw" name="InputV">
>
> ..
>
> <profileApplication xmi:id="_itRSgH8tEd6YbOsakxhBTg">
> <eAnnotations xmi:id="_itRSgX8tEd6YbOsakxhBTg"
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <references xmi:type="ecore:EPackage"
> href="../../Profile/model/My.profile.uml#_UKhawX8tEd6YbOsakxhBTg "/>
> </eAnnotations>
> <appliedProfile
> href="../../Profile/model/My.profile.uml#_i9mfcH8rEd6YbOsakxhBTg "/>
> </profileApplication>
>
> So, does this look ok? Then I guess the other possible mistake I have
> made is in the profile itself. I don't normally like posting masses like
> this but here it is ...
>
> <?xml version="1.0" encoding="UTF-8"?>
> <uml:Profile xmi:version="2.1"
> xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
> xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML"
> xmi:id="_i9mfcH8rEd6YbOsakxhBTg" name="my"
> metaclassReference="_Fu--QH8tEd6YbOsakxhBTg">
> <eAnnotations xmi:id="_UKhawH8tEd6YbOsakxhBTg"
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <contents xmi:type="ecore:EPackage" xmi:id="_UKhawX8tEd6YbOsakxhBTg"
> name="my" nsURI="http:///schemas/my/_UKgzsH8tEd6YbOsakxhBTg/0"
> nsPrefix="my">
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_UKhawn8tEd6YbOsakxhBTg" name="EStructuralFeature" abstract="true">
> <eAnnotations xmi:id="_UKhaw38tEd6YbOsakxhBTg"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_BeCi8H8sEd6YbOsakxhBTg"/>
> <eStructuralFeatures xmi:type="ecore:EAttribute"
> xmi:id="_UKhaxH8tEd6YbOsakxhBTg" name="isTransient" ordered="false"
> defaultValueLiteral="true">
> <eType xmi:type="ecore:EDataType"
> href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_UKhaxn8tEd6YbOsakxhBTg" name="EAttribute" abstract="true"
> eSuperTypes="_UKhawn8tEd6YbOsakxhBTg">
> <eAnnotations xmi:id="_UKhax38tEd6YbOsakxhBTg"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_HGeyIH8sEd6YbOsakxhBTg"/>
> <eStructuralFeatures xmi:type="ecore:EReference"
> xmi:id="_UKhayH8tEd6YbOsakxhBTg" name="base_Property" ordered="false"
> lowerBound="1">
> <eType xmi:type="ecore:EClass"
> href="http://www.eclipse.org/uml2/3.0.0/UML#//Property"/>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_UKhay38tEd6YbOsakxhBTg" name="EReference" abstract="true"
> eSuperTypes="_UKhawn8tEd6YbOsakxhBTg">
> <eAnnotations xmi:id="_UKhazH8tEd6YbOsakxhBTg"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_Mk2fUH8sEd6YbOsakxhBTg"/>
> <eStructuralFeatures xmi:type="ecore:EReference"
> xmi:id="_UKhazX8tEd6YbOsakxhBTg" name="base_Property" ordered="false"
> lowerBound="1">
> <eType xmi:type="ecore:EClass"
> href="http://www.eclipse.org/uml2/3.0.0/UML#//Property"/>
> </eStructuralFeatures>
> </eClassifiers>
> </contents>
> </eAnnotations>
> <elementImport xmi:id="_3qiBgH8rEd6YbOsakxhBTg">
> <importedElement xmi:type="uml:PrimitiveType"
> href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolea n"/>
> </elementImport>
> <elementImport xmi:id="_3qiBgX8rEd6YbOsakxhBTg">
> <importedElement xmi:type="uml:PrimitiveType"
> href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
> </elementImport>
> <elementImport xmi:id="_Fu--QH8tEd6YbOsakxhBTg">
> <importedElement xmi:type="uml:Class"
> href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
> </elementImport>
> <packagedElement xmi:type="uml:Stereotype"
> xmi:id="_BeCi8H8sEd6YbOsakxhBTg" name="EStructuralFeature"
> isAbstract="true">
> <ownedAttribute xmi:id="_gOf_cH8sEd6YbOsakxhBTg" name="isTransient">
> <type xmi:type="uml:PrimitiveType"
> href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolea n"/>
> <lowerValue xmi:type="uml:LiteralInteger"
> xmi:id="_n4PYAH8sEd6YbOsakxhBTg"/>
> <defaultValue xmi:type="uml:LiteralBoolean"
> xmi:id="_rdIbEH8sEd6YbOsakxhBTg" value="true"/>
> </ownedAttribute>
> </packagedElement>
> <packagedElement xmi:type="uml:Stereotype"
> xmi:id="_HGeyIH8sEd6YbOsakxhBTg" name="EAttribute" isAbstract="true">
> <generalization xmi:id="_SF7iQH8sEd6YbOsakxhBTg"
> general="_BeCi8H8sEd6YbOsakxhBTg"/>
> <ownedAttribute xmi:id="_NXaIMn8tEd6YbOsakxhBTg" name="base_Property"
> association="_NXaIMH8tEd6YbOsakxhBTg">
> <type xmi:type="uml:Class"
> href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
> </ownedAttribute>
> </packagedElement>
> <packagedElement xmi:type="uml:Stereotype"
> xmi:id="_Mk2fUH8sEd6YbOsakxhBTg" name="EReference" isAbstract="true">
> <generalization xmi:id="_Zz3eUH8sEd6YbOsakxhBTg"
> general="_BeCi8H8sEd6YbOsakxhBTg"/>
> <ownedAttribute xmi:id="_QVkicn8tEd6YbOsakxhBTg" name="base_Property"
> association="_QVkicH8tEd6YbOsakxhBTg">
> <type xmi:type="uml:Class"
> href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
> </ownedAttribute>
> </packagedElement>
> <packagedElement xmi:type="uml:Extension"
> xmi:id="_NXaIMH8tEd6YbOsakxhBTg" name="Property_EAttribute"
> memberEnd="_NXaIMX8tEd6YbOsakxhBTg _NXaIMn8tEd6YbOsakxhBTg">
> <ownedEnd xmi:type="uml:ExtensionEnd"
> xmi:id="_NXaIMX8tEd6YbOsakxhBTg" name="extension_EAttribute"
> type="_HGeyIH8sEd6YbOsakxhBTg" aggregation="composite"
> association="_NXaIMH8tEd6YbOsakxhBTg"/>
> </packagedElement>
> <packagedElement xmi:type="uml:Extension"
> xmi:id="_QVkicH8tEd6YbOsakxhBTg" name="Property_EReference"
> memberEnd="_QVkicX8tEd6YbOsakxhBTg _QVkicn8tEd6YbOsakxhBTg">
> <ownedEnd xmi:type="uml:ExtensionEnd"
> xmi:id="_QVkicX8tEd6YbOsakxhBTg" name="extension_EReference"
> type="_Mk2fUH8sEd6YbOsakxhBTg" aggregation="composite"
> association="_QVkicH8tEd6YbOsakxhBTg"/>
> </packagedElement>
> </uml:Profile>
>
> Thanks again Tas!!
>
Re: Applying stereotypes [message #627848 is a reply to message #478665] Wed, 05 August 2009 10:05 Go to previous message
Tas Frangoullides is currently offline Tas FrangoullidesFriend
Messages: 195
Registered: July 2009
Senior Member
Hi Eban,

I think I see the problem. Your EAttribute and EReference stereotypes are
declared as abstract. You need to change isAbstract to false for both those
stereotypes. EStructuralFeature should remain abstract. I think you'll need
to define the profile again and reapply it.

Tas


"Eban Escott" <eban.escott@uqconnect.edu.au> wrote in message
news:9b04da2e9a22a36f8a66dba47d9ea645$1@www.eclipse.org...
> Hi Tas, fair question and the answer is yes, I can see the <Profile
> Application> with my profile name. Here is a snippet out of my model that
> I am trying to apply the profile to ...
>
> <uml:Package xmi:version="2.1"
> xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
> xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML"
> xmi:id="_0_66AHTmEd6IgYzPRYD2Nw" name="InputV">
>
> ..
>
> <profileApplication xmi:id="_itRSgH8tEd6YbOsakxhBTg">
> <eAnnotations xmi:id="_itRSgX8tEd6YbOsakxhBTg"
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <references xmi:type="ecore:EPackage"
> href="../../Profile/model/My.profile.uml#_UKhawX8tEd6YbOsakxhBTg "/>
> </eAnnotations>
> <appliedProfile
> href="../../Profile/model/My.profile.uml#_i9mfcH8rEd6YbOsakxhBTg "/>
> </profileApplication>
>
> So, does this look ok? Then I guess the other possible mistake I have made
> is in the profile itself. I don't normally like posting masses like this
> but here it is ...
>
> <?xml version="1.0" encoding="UTF-8"?>
> <uml:Profile xmi:version="2.1"
> xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
> xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML"
> xmi:id="_i9mfcH8rEd6YbOsakxhBTg" name="my"
> metaclassReference="_Fu--QH8tEd6YbOsakxhBTg">
> <eAnnotations xmi:id="_UKhawH8tEd6YbOsakxhBTg"
> source="http://www.eclipse.org/uml2/2.0.0/UML">
> <contents xmi:type="ecore:EPackage" xmi:id="_UKhawX8tEd6YbOsakxhBTg"
> name="my" nsURI="http:///schemas/my/_UKgzsH8tEd6YbOsakxhBTg/0"
> nsPrefix="my">
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_UKhawn8tEd6YbOsakxhBTg" name="EStructuralFeature"
> abstract="true">
> <eAnnotations xmi:id="_UKhaw38tEd6YbOsakxhBTg"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_BeCi8H8sEd6YbOsakxhBTg"/>
> <eStructuralFeatures xmi:type="ecore:EAttribute"
> xmi:id="_UKhaxH8tEd6YbOsakxhBTg" name="isTransient" ordered="false"
> defaultValueLiteral="true">
> <eType xmi:type="ecore:EDataType"
> href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_UKhaxn8tEd6YbOsakxhBTg" name="EAttribute" abstract="true"
> eSuperTypes="_UKhawn8tEd6YbOsakxhBTg">
> <eAnnotations xmi:id="_UKhax38tEd6YbOsakxhBTg"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_HGeyIH8sEd6YbOsakxhBTg"/>
> <eStructuralFeatures xmi:type="ecore:EReference"
> xmi:id="_UKhayH8tEd6YbOsakxhBTg" name="base_Property" ordered="false"
> lowerBound="1">
> <eType xmi:type="ecore:EClass"
> href="http://www.eclipse.org/uml2/3.0.0/UML#//Property"/>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xmi:type="ecore:EClass"
> xmi:id="_UKhay38tEd6YbOsakxhBTg" name="EReference" abstract="true"
> eSuperTypes="_UKhawn8tEd6YbOsakxhBTg">
> <eAnnotations xmi:id="_UKhazH8tEd6YbOsakxhBTg"
> source="http://www.eclipse.org/uml2/2.0.0/UML"
> references="_Mk2fUH8sEd6YbOsakxhBTg"/>
> <eStructuralFeatures xmi:type="ecore:EReference"
> xmi:id="_UKhazX8tEd6YbOsakxhBTg" name="base_Property" ordered="false"
> lowerBound="1">
> <eType xmi:type="ecore:EClass"
> href="http://www.eclipse.org/uml2/3.0.0/UML#//Property"/>
> </eStructuralFeatures>
> </eClassifiers>
> </contents>
> </eAnnotations>
> <elementImport xmi:id="_3qiBgH8rEd6YbOsakxhBTg">
> <importedElement xmi:type="uml:PrimitiveType"
> href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolea n"/>
> </elementImport>
> <elementImport xmi:id="_3qiBgX8rEd6YbOsakxhBTg">
> <importedElement xmi:type="uml:PrimitiveType"
> href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
> </elementImport>
> <elementImport xmi:id="_Fu--QH8tEd6YbOsakxhBTg">
> <importedElement xmi:type="uml:Class"
> href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
> </elementImport>
> <packagedElement xmi:type="uml:Stereotype"
> xmi:id="_BeCi8H8sEd6YbOsakxhBTg" name="EStructuralFeature"
> isAbstract="true">
> <ownedAttribute xmi:id="_gOf_cH8sEd6YbOsakxhBTg" name="isTransient">
> <type xmi:type="uml:PrimitiveType"
> href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolea n"/>
> <lowerValue xmi:type="uml:LiteralInteger"
> xmi:id="_n4PYAH8sEd6YbOsakxhBTg"/>
> <defaultValue xmi:type="uml:LiteralBoolean"
> xmi:id="_rdIbEH8sEd6YbOsakxhBTg" value="true"/>
> </ownedAttribute>
> </packagedElement>
> <packagedElement xmi:type="uml:Stereotype"
> xmi:id="_HGeyIH8sEd6YbOsakxhBTg" name="EAttribute" isAbstract="true">
> <generalization xmi:id="_SF7iQH8sEd6YbOsakxhBTg"
> general="_BeCi8H8sEd6YbOsakxhBTg"/>
> <ownedAttribute xmi:id="_NXaIMn8tEd6YbOsakxhBTg" name="base_Property"
> association="_NXaIMH8tEd6YbOsakxhBTg">
> <type xmi:type="uml:Class"
> href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
> </ownedAttribute>
> </packagedElement>
> <packagedElement xmi:type="uml:Stereotype"
> xmi:id="_Mk2fUH8sEd6YbOsakxhBTg" name="EReference" isAbstract="true">
> <generalization xmi:id="_Zz3eUH8sEd6YbOsakxhBTg"
> general="_BeCi8H8sEd6YbOsakxhBTg"/>
> <ownedAttribute xmi:id="_QVkicn8tEd6YbOsakxhBTg" name="base_Property"
> association="_QVkicH8tEd6YbOsakxhBTg">
> <type xmi:type="uml:Class"
> href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
> </ownedAttribute>
> </packagedElement>
> <packagedElement xmi:type="uml:Extension"
> xmi:id="_NXaIMH8tEd6YbOsakxhBTg" name="Property_EAttribute"
> memberEnd="_NXaIMX8tEd6YbOsakxhBTg _NXaIMn8tEd6YbOsakxhBTg">
> <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_NXaIMX8tEd6YbOsakxhBTg"
> name="extension_EAttribute" type="_HGeyIH8sEd6YbOsakxhBTg"
> aggregation="composite" association="_NXaIMH8tEd6YbOsakxhBTg"/>
> </packagedElement>
> <packagedElement xmi:type="uml:Extension"
> xmi:id="_QVkicH8tEd6YbOsakxhBTg" name="Property_EReference"
> memberEnd="_QVkicX8tEd6YbOsakxhBTg _QVkicn8tEd6YbOsakxhBTg">
> <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_QVkicX8tEd6YbOsakxhBTg"
> name="extension_EReference" type="_Mk2fUH8sEd6YbOsakxhBTg"
> aggregation="composite" association="_QVkicH8tEd6YbOsakxhBTg"/>
> </packagedElement>
> </uml:Profile>
>
> Thanks again Tas!!
>
Re: Applying stereotypes [message #627849 is a reply to message #478668] Wed, 05 August 2009 10:08 Go to previous message
Tas Frangoullides is currently offline Tas FrangoullidesFriend
Messages: 195
Registered: July 2009
Senior Member
Also, notice that in the UML editor abstract elements appear in italics.


"Tas Frangoullides" <tfrangoullides@model-driven.co.uk> wrote in message
news:h5blhe$29q$1@build.eclipse.org...
> Hi Eban,
>
> I think I see the problem. Your EAttribute and EReference stereotypes are
> declared as abstract. You need to change isAbstract to false for both
> those stereotypes. EStructuralFeature should remain abstract. I think
> you'll need to define the profile again and reapply it.
>
> Tas
>
>
> "Eban Escott" <eban.escott@uqconnect.edu.au> wrote in message
> news:9b04da2e9a22a36f8a66dba47d9ea645$1@www.eclipse.org...
>> Hi Tas, fair question and the answer is yes, I can see the <Profile
>> Application> with my profile name. Here is a snippet out of my model that
>> I am trying to apply the profile to ...
>>
>> <uml:Package xmi:version="2.1"
>> xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
>> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
>> xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML"
>> xmi:id="_0_66AHTmEd6IgYzPRYD2Nw" name="InputV">
>>
>> ..
>>
>> <profileApplication xmi:id="_itRSgH8tEd6YbOsakxhBTg">
>> <eAnnotations xmi:id="_itRSgX8tEd6YbOsakxhBTg"
>> source="http://www.eclipse.org/uml2/2.0.0/UML">
>> <references xmi:type="ecore:EPackage"
>> href="../../Profile/model/My.profile.uml#_UKhawX8tEd6YbOsakxhBTg "/>
>> </eAnnotations>
>> <appliedProfile
>> href="../../Profile/model/My.profile.uml#_i9mfcH8rEd6YbOsakxhBTg "/>
>> </profileApplication>
>>
>> So, does this look ok? Then I guess the other possible mistake I have
>> made is in the profile itself. I don't normally like posting masses like
>> this but here it is ...
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <uml:Profile xmi:version="2.1"
>> xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
>> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
>> xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML"
>> xmi:id="_i9mfcH8rEd6YbOsakxhBTg" name="my"
>> metaclassReference="_Fu--QH8tEd6YbOsakxhBTg">
>> <eAnnotations xmi:id="_UKhawH8tEd6YbOsakxhBTg"
>> source="http://www.eclipse.org/uml2/2.0.0/UML">
>> <contents xmi:type="ecore:EPackage" xmi:id="_UKhawX8tEd6YbOsakxhBTg"
>> name="my" nsURI="http:///schemas/my/_UKgzsH8tEd6YbOsakxhBTg/0"
>> nsPrefix="my">
>> <eClassifiers xmi:type="ecore:EClass"
>> xmi:id="_UKhawn8tEd6YbOsakxhBTg" name="EStructuralFeature"
>> abstract="true">
>> <eAnnotations xmi:id="_UKhaw38tEd6YbOsakxhBTg"
>> source="http://www.eclipse.org/uml2/2.0.0/UML"
>> references="_BeCi8H8sEd6YbOsakxhBTg"/>
>> <eStructuralFeatures xmi:type="ecore:EAttribute"
>> xmi:id="_UKhaxH8tEd6YbOsakxhBTg" name="isTransient" ordered="false"
>> defaultValueLiteral="true">
>> <eType xmi:type="ecore:EDataType"
>> href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
>> </eStructuralFeatures>
>> </eClassifiers>
>> <eClassifiers xmi:type="ecore:EClass"
>> xmi:id="_UKhaxn8tEd6YbOsakxhBTg" name="EAttribute" abstract="true"
>> eSuperTypes="_UKhawn8tEd6YbOsakxhBTg">
>> <eAnnotations xmi:id="_UKhax38tEd6YbOsakxhBTg"
>> source="http://www.eclipse.org/uml2/2.0.0/UML"
>> references="_HGeyIH8sEd6YbOsakxhBTg"/>
>> <eStructuralFeatures xmi:type="ecore:EReference"
>> xmi:id="_UKhayH8tEd6YbOsakxhBTg" name="base_Property" ordered="false"
>> lowerBound="1">
>> <eType xmi:type="ecore:EClass"
>> href="http://www.eclipse.org/uml2/3.0.0/UML#//Property"/>
>> </eStructuralFeatures>
>> </eClassifiers>
>> <eClassifiers xmi:type="ecore:EClass"
>> xmi:id="_UKhay38tEd6YbOsakxhBTg" name="EReference" abstract="true"
>> eSuperTypes="_UKhawn8tEd6YbOsakxhBTg">
>> <eAnnotations xmi:id="_UKhazH8tEd6YbOsakxhBTg"
>> source="http://www.eclipse.org/uml2/2.0.0/UML"
>> references="_Mk2fUH8sEd6YbOsakxhBTg"/>
>> <eStructuralFeatures xmi:type="ecore:EReference"
>> xmi:id="_UKhazX8tEd6YbOsakxhBTg" name="base_Property" ordered="false"
>> lowerBound="1">
>> <eType xmi:type="ecore:EClass"
>> href="http://www.eclipse.org/uml2/3.0.0/UML#//Property"/>
>> </eStructuralFeatures>
>> </eClassifiers>
>> </contents>
>> </eAnnotations>
>> <elementImport xmi:id="_3qiBgH8rEd6YbOsakxhBTg">
>> <importedElement xmi:type="uml:PrimitiveType"
>> href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolea n"/>
>> </elementImport>
>> <elementImport xmi:id="_3qiBgX8rEd6YbOsakxhBTg">
>> <importedElement xmi:type="uml:PrimitiveType"
>> href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
>> </elementImport>
>> <elementImport xmi:id="_Fu--QH8tEd6YbOsakxhBTg">
>> <importedElement xmi:type="uml:Class"
>> href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
>> </elementImport>
>> <packagedElement xmi:type="uml:Stereotype"
>> xmi:id="_BeCi8H8sEd6YbOsakxhBTg" name="EStructuralFeature"
>> isAbstract="true">
>> <ownedAttribute xmi:id="_gOf_cH8sEd6YbOsakxhBTg" name="isTransient">
>> <type xmi:type="uml:PrimitiveType"
>> href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolea n"/>
>> <lowerValue xmi:type="uml:LiteralInteger"
>> xmi:id="_n4PYAH8sEd6YbOsakxhBTg"/>
>> <defaultValue xmi:type="uml:LiteralBoolean"
>> xmi:id="_rdIbEH8sEd6YbOsakxhBTg" value="true"/>
>> </ownedAttribute>
>> </packagedElement>
>> <packagedElement xmi:type="uml:Stereotype"
>> xmi:id="_HGeyIH8sEd6YbOsakxhBTg" name="EAttribute" isAbstract="true">
>> <generalization xmi:id="_SF7iQH8sEd6YbOsakxhBTg"
>> general="_BeCi8H8sEd6YbOsakxhBTg"/>
>> <ownedAttribute xmi:id="_NXaIMn8tEd6YbOsakxhBTg" name="base_Property"
>> association="_NXaIMH8tEd6YbOsakxhBTg">
>> <type xmi:type="uml:Class"
>> href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
>> </ownedAttribute>
>> </packagedElement>
>> <packagedElement xmi:type="uml:Stereotype"
>> xmi:id="_Mk2fUH8sEd6YbOsakxhBTg" name="EReference" isAbstract="true">
>> <generalization xmi:id="_Zz3eUH8sEd6YbOsakxhBTg"
>> general="_BeCi8H8sEd6YbOsakxhBTg"/>
>> <ownedAttribute xmi:id="_QVkicn8tEd6YbOsakxhBTg" name="base_Property"
>> association="_QVkicH8tEd6YbOsakxhBTg">
>> <type xmi:type="uml:Class"
>> href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
>> </ownedAttribute>
>> </packagedElement>
>> <packagedElement xmi:type="uml:Extension"
>> xmi:id="_NXaIMH8tEd6YbOsakxhBTg" name="Property_EAttribute"
>> memberEnd="_NXaIMX8tEd6YbOsakxhBTg _NXaIMn8tEd6YbOsakxhBTg">
>> <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_NXaIMX8tEd6YbOsakxhBTg"
>> name="extension_EAttribute" type="_HGeyIH8sEd6YbOsakxhBTg"
>> aggregation="composite" association="_NXaIMH8tEd6YbOsakxhBTg"/>
>> </packagedElement>
>> <packagedElement xmi:type="uml:Extension"
>> xmi:id="_QVkicH8tEd6YbOsakxhBTg" name="Property_EReference"
>> memberEnd="_QVkicX8tEd6YbOsakxhBTg _QVkicn8tEd6YbOsakxhBTg">
>> <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_QVkicX8tEd6YbOsakxhBTg"
>> name="extension_EReference" type="_Mk2fUH8sEd6YbOsakxhBTg"
>> aggregation="composite" association="_QVkicH8tEd6YbOsakxhBTg"/>
>> </packagedElement>
>> </uml:Profile>
>>
>> Thanks again Tas!!
>>
>
Re: Applying stereotypes [message #627850 is a reply to message #478666] Wed, 05 August 2009 23:21 Go to previous message
Eban Escott is currently offline Eban EscottFriend
Messages: 61
Registered: July 2009
Member
Hey Kenn, I have not moved the profile after defining and saving it. I
have have 2 projects in my workspace, one with the .profile.uml and one
with the .uml.

Firstly, for the .profile.uml I do ...

1. Highlight the <profile> twirl-down
2. UML Editor -> Profile -> Define and it reports operation success
3. I then save it by File -> Save

From within the .uml I do ...

1. UML Editor -> Load Resource -> Choose Browse Workspace
2. Navigate to the other project and choose the .profile.uml (it appears
in the list below the package)
3. Highlight the <Package> twirl-down
4. UML Editor -> Package -> Apply Profile ... add the profile (<Profile
Application> appears)

Is this the correct procedure?

Thanks heaps Kenn for the help.
Eban
Re: Applying stereotypes [message #627851 is a reply to message #478669] Wed, 05 August 2009 23:30 Go to previous message
Eban Escott is currently offline Eban EscottFriend
Messages: 61
Registered: July 2009
Member
Hey Tas, I got excited as I thought this could be it ... but no :( I made
the changes and it is still the same. I also downloaded the source code
down the bottom of

http://www.eclipse.org/modeling/mdt/uml2/docs/articles/Getti ng_Started_with_UML2/article.html

Inside the zip file is a the profile example I am trying to create but
using a different profile name ... Ecore.profile.uml. I copied this into
my workspace, defined it, saved it, loaded it and still no luck.

I am starting to feel a little stupid as all the doco says applying
stereotypes is easy but I can't seem to get it. Could you maybe try with
the profile from the zip file?

Also, I am stretching here ... but are there any restrictions on what
packaged elements you can apply a stereotype? I am trying to apply a
stereotype to a class.

Thanks heaps!
Eban
Re: Applying stereotypes [message #627852 is a reply to message #478671] Wed, 05 August 2009 23:50 Go to previous message
Eban Escott is currently offline Eban EscottFriend
Messages: 61
Registered: July 2009
Member
Tas! I sort of worked it out from my last question to you? I quote from
the tutorial

"stereotypes defined in the profile can be applied to instances of the
appropriate metaclasses (as per the defined extensions)"

So, the stereotypes I created can only be applied to <Property> not
<Class> because of the extension points I use?

I don't fully understand it yet but I can now apply a stereotype from a
profile to a property!!! Sweet.

Thanks for your patience.
Eban
Re: Applying stereotypes [message #627857 is a reply to message #478672] Mon, 10 August 2009 08:44 Go to previous message
Tas Frangoullides is currently offline Tas FrangoullidesFriend
Messages: 195
Registered: July 2009
Senior Member
Hi Eban,

Sorry for the late reply. I was away on a short vacation.

I'm glad you have it working now. That's right, Profiles are considered a
"Lightweight" extension of the meta-model and you have to decide which parts
of the meta-model to extend. It is possible to have a stereotype extend more
than one metaclass so that the stereotype can be applied on multiple types.
Also, the stereotype can be applied to all sub-classes of the extended
metaclass.

Tas


"Eban Escott" <eban.escott@uqconnect.edu.au> wrote in message
news:18672070559dba8e9a6e94aa41e3e28a$1@www.eclipse.org...
> Tas! I sort of worked it out from my last question to you? I quote from
> the tutorial
>
> "stereotypes defined in the profile can be applied to instances of the
> appropriate metaclasses (as per the defined extensions)"
>
> So, the stereotypes I created can only be applied to <Property> not
> <Class> because of the extension points I use?
>
> I don't fully understand it yet but I can now apply a stereotype from a
> profile to a property!!! Sweet.
>
> Thanks for your patience.
> Eban
>
Previous Topic:RedefinableTemplateSignature on Operation does not validate
Next Topic:Problems with DerivedUnion during deserialization
Goto Forum:
  


Current Time: Tue Apr 23 15:21:40 GMT 2024

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

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

Back to the top