[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.mdt.uml2] Re: Applying stereotypes
|
Also, notice that in the UML editor abstract elements appear in italics.
"Tas Frangoullides" <tfrangoullides@xxxxxxxxxxxxxxxxxx> wrote in message
news:h5blhe$29q$1@xxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxx> wrote in message
news:9b04da2e9a22a36f8a66dba47d9ea645$1@xxxxxxxxxxxxxxxxxx
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#Boolean"/>
</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#Boolean"/>
<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!!