Ignore:
Timestamp:
09/22/14 15:25:22 (10 years ago)
Author:
sherbold
Message:
  • added new third-party repo for FF tooling
  • now using UML modeling tools from FF
  • generated sequence diagrams are now the implementation of an operation with the TestCase? stereotype. In case the loaded model knows UTP, the UTP TestCase? stereotype is set.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-plugin-uml/src/main/java/de/ugoe/cs/autoquest/plugin/uml/UMLUtils.java

    r1753 r1759  
    3939import org.eclipse.uml2.uml.Operation; 
    4040import org.eclipse.uml2.uml.Port; 
     41import org.eclipse.uml2.uml.Profile; 
    4142import org.eclipse.uml2.uml.Region; 
    4243import org.eclipse.uml2.uml.StateMachine; 
     44import org.eclipse.uml2.uml.Stereotype; 
    4345import org.eclipse.uml2.uml.Transition; 
    4446import org.eclipse.uml2.uml.UMLPackage; 
     
    272274        } 
    273275 
    274         Interaction interaction = 
    275             (Interaction) model.createPackagedElement(interactionName, 
    276                                                       UMLPackage.Literals.INTERACTION); 
    277  
    278         Lifeline userLifeline = interaction.createLifeline("user"); 
    279  
    280276        Component testContext = 
    281277            (Component) model.getPackagedElement("TestContext", true, 
    282278                                                 UMLPackage.Literals.COMPONENT, true); 
     279 
     280        final Profile utpProfile = model.getAppliedProfile("utp"); 
     281        final Stereotype utpTestCase = (Stereotype) utpProfile.getOwnedMember("TestCase"); 
     282        Operation operation = testContext.createOwnedOperation(interactionName, null, null); 
     283        operation.applyStereotype(utpTestCase); 
     284 
     285        Interaction interaction = 
     286            (Interaction) testContext.createPackagedElement(interactionName + "_Impl", 
     287                                                            UMLPackage.Literals.INTERACTION); 
     288 
     289        Lifeline userLifeline = interaction.createLifeline("user"); 
     290 
    283291        userLifeline.setRepresents(testContext.getAttribute("user", null)); 
    284292 
Note: See TracChangeset for help on using the changeset viewer.