Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Can't apply stereotype either with UML Editor or with UMLTools diagram editor
Can't apply stereotype either with UML Editor or with UMLTools diagram editor [message #528036] Mon, 19 April 2010 01:12
tumer is currently offline tumerFriend
Messages: 6
Registered: April 2010
Junior Member
this might belong to the "UMLTools" forum, but since it's been not accessible for the last few days, I'll post my question here:

Following the tutorial (MDT-UML2Tools How To Use UML Profiles and Introduction to UML2 Profiles), I tried to apply some stereotypes to a simple model ("ExtendedPO" model). here's what I did:

1) create the model with UML2Tools, resulting in ExtendedPO2.uml and ExtendedPO2.umlclass.
2) create a testing profile "TestProfile" with the UML2Tools, resulting in TestProfile.umlprofile and TestProfile.profile.uml
3) define several stereotypes in the profile, such as "Table" whose Redefined Classifier is "<<metaclass>><class>Class"
this implies that this stereotype should be applicable to UML classes, right?

4) Define the test Profile

5) Now try to apply the profile to my ExtendedPO model

6) Now trying to apply the "Table" stereotype to some class in the model, but I couldn't accomplish this:
6.1) open the model with the UML2Tools diagram editor, when I click on a class in the diagram, I didn't see the "Apply Stereotype" option in the popup menu
6.2) open the model with the UML Editor, click on a class, and go to menu "UML Editor - Element - Apply Stereotyp...", in the coming "Apply Stereotype(s).." dialog, I could find any stereotype no matter what I type in the Filter.

These are the only two ways that I know to apply stereotypes, not sure what was wrong with my procedures.


My profile and model are rather simple, and I'm using Eclipse 3.5.2 with EMF 2.5.0, UML2 Tools 0.9.0
<?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="_ozBzcEbpEd-zcfmlzYrcTg" name="TestProfile" metamodelReference="_packageImport.0">
  <eAnnotations xmi:id="_5tABQUbpEd-zcfmlzYrcTg" source="http://www.eclipse.org/uml2/2.0.0/UML">
   ...
  </eAnnotations>
  <elementImport xmi:id="_o0hBMEbpEd-zcfmlzYrcTg">
    <importedElement xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
  </elementImport>
  <elementImport xmi:id="_o0hBMUbpEd-zcfmlzYrcTg">
    <importedElement xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
  </elementImport>
  <elementImport xmi:id="_o0hBMkbpEd-zcfmlzYrcTg">
    <importedElement xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#UnlimitedNatural"/>
  </elementImport>
  <elementImport xmi:id="_o0hBM0bpEd-zcfmlzYrcTg">
    <importedElement xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
  </elementImport>
  <packageImport xmi:id="_packageImport.0">
    <importedPackage xmi:type="uml:Model" href="pathmap://UML_METAMODELS/UML.metamodel.uml#_0"/>
  </packageImport>
  <packagedElement xmi:type="uml:Stereotype" xmi:id="_zQFoMEbpEd-zcfmlzYrcTg" name="Table" isActive="true">
    <redefinedClassifier xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
    <ownedAttribute xmi:id="_4AOWYEbpEd-zcfmlzYrcTg" name="name">
      <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
    </ownedAttribute>
  </packagedElement>
  <packagedElement xmi:type="uml:Stereotype" xmi:id="_FirHYEbtEd-zcfmlzYrcTg" name="Table2">
    <redefinedClassifier xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Classifier"/>
  </packagedElement>
  <packagedElement xmi:type="uml:Stereotype" xmi:id="_ojds8EgnEd-YsbBI23cu_A" name="Stereotype1"/>
</uml:Profile>



and my model does have the <profileApplication...> element in its definition.



<uml:Model 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="_DzZWoUPCEd-7DoTJZHzxNg" name="ExtendedPO2">
  <elementImport xmi:id="_D3kE8EPCEd-7DoTJZHzxNg">
    <importedElement xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
  </elementImport>
  <elementImport xmi:id="_D4Aw4EPCEd-7DoTJZHzxNg">
    <importedElement xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
  </elementImport>
  <elementImport xmi:id="_D4Aw4UPCEd-7DoTJZHzxNg">
    <importedElement xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#UnlimitedNatural"/>
  </elementImport>
  <elementImport xmi:id="_D4Aw4kPCEd-7DoTJZHzxNg">
    <importedElement xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
  </elementImport>
  <packagedElement xmi:type="uml:Class" xmi:id="_UcYiIEPCEd-MBduE5wCakg" name="Supplier">
    <ownedAttribute xmi:id="_scivgEPCEd-MBduE5wCakg" name="name" aggregation="composite">
      <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
    </ownedAttribute>
    <ownedAttribute xmi:id="_mlEX00RcEd-MBduE5wCakg" name="pendingOrders" type="_WY88gEPCEd-MBduE5wCakg" association="_mk6m0ERcEd-MBduE5wCakg">
      <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_mlEX1URcEd-MBduE5wCakg" value="*"/>
      <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_mlEX1ERcEd-MBduE5wCakg"/>
    </ownedAttribute>
    <ownedAttribute xmi:id="_wqJKZERcEd-MBduE5wCakg" name="shippedOrders" type="_WY88gEPCEd-MBduE5wCakg" association="_wqJKYERcEd-MBduE5wCakg">
      <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_wqJKZkRcEd-MBduE5wCakg" value="*"/>
      <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_wqJKZURcEd-MBduE5wCakg"/>
    </ownedAttribute>
    <ownedAttribute xmi:id="_n_qWgEYdEd-spJ8mKEemAQ" name="ID" type="_NBEKoEPDEd-MBduE5wCakg" aggregation="composite"/>
  </packagedElement>
  <packagedElement>
    .......
  </packagedElement>
  <profileApplication xmi:id="_3kkX0EgrEd-YsbBI23cu_A">
    <eAnnotations xmi:id="_3kkX0UgrEd-YsbBI23cu_A" source="http://www.eclipse.org/uml2/2.0.0/UML">
      <references xmi:type="ecore:EPackage" href="TestProfile.profile.uml#_9n-mUUtNEd-y7PM1-ksPMg"/>
    </eAnnotations>
    <appliedProfile href="TestProfile.profile.uml#_ozBzcEbpEd-zcfmlzYrcTg"/>
  </profileApplication>
</uml:Model>

Previous Topic:UML Profile
Next Topic:Can't apply stereotype either with UML Editor or with UMLTools diagram editor
Goto Forum:
  


Current Time: Fri Mar 29 01:18:09 GMT 2024

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

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

Back to the top