Package org.eclipse.uml2.uml

Examples of org.eclipse.uml2.uml.Operation


   * <!-- begin-user-doc --> <!-- end-user-doc -->
   *
   * @generated
   */
  public void setBase_Operation(Operation newBase_Operation) {
    Operation oldBase_Operation = base_Operation;
    base_Operation = newBase_Operation;
    if(eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, ActivitiesPackage.CONTROL_OPERATOR__BASE_OPERATION, oldBase_Operation, base_Operation));
  }
View Full Code Here


      Event oSMEvent = (Event)io_oTCGEvent.getEvent();
      // identify all parameters of the event
      if(oSMEvent instanceof CallEvent)
      {
        CallEvent oCallEvent = (CallEvent)oSMEvent;
        Operation oOperation = TestCaseGraphHelper.getContextEffectSpecificationHelper(oCallEvent.getOperation(),
            in_oContextClass);
        // default-trigger has no operation
        if(oOperation != null)
        {
          for(Parameter oParameter : oOperation.getOwnedParameters())
          {
            TCGParameter oTCGParameter = addTCGParameter(io_oTransition, oParameter);
            io_oTCGEvent.getParameters().add(oTCGParameter);
          }
        }
View Full Code Here

      Transition in_oTransition,
      TCGNode in_oTCGNode,
      org.eclipse.uml2.uml.Class in_oContextClass) throws Exception
  {
    // find operation corresponding to the current context
    Operation oOperation = TestCaseGraphHelper.getContextEffectSpecification(in_oTransition);
   
    if(oOperation != null)
    {
      // handle preconditions
      convertOperationPrePostcondition(in_oTCGNode, oOperation,
View Full Code Here

  static Operation getContextOperation(Constraint localPostcondition) {
    // XXX you could perform a proper search in all places where an
    // Operation specifiing some activity could hide
    Action action = (Action) localPostcondition.getOwner();
    Activity activity = action.getActivity();
    Operation contextOp = null;
    if (activity.getSpecification() instanceof Operation) {
      contextOp = (Operation) activity.getSpecification();
    } else if (activity.getOwner() instanceof Class) {
      Class oClass = (Class) activity.getOwner();
      contextOp = oClass.getOperation(activity.getName(), null, null);
View Full Code Here

  static Operation getContextOperation(ActivityEdge guardedEdge) {
    // XXX you could perform a proper search in all places where an
    // Operation specifiing some activity could hide
    Activity activity = guardedEdge.getActivity();
    Logging.debug(""+activity, guardedEdge);
    Operation contextOp = null;
    if (activity.getSpecification() instanceof Operation) {
      contextOp = (Operation) activity.getSpecification();
    } else if (activity.getOwner() instanceof Class) {
      Class oClass = (Class) activity.getOwner();
      contextOp = oClass.getOperation(activity.getName(), null, null);
View Full Code Here

    }
    return oNamespace;
  }
 
  public static Operation getEffectOperationForTransition(Transition in_oTransition) {
    Operation oRetValue = null;
    Behavior oBehavior = in_oTransition.getEffect();
    if(oBehavior instanceof FunctionBehavior) {
      BehavioralFeature oFeature = ((FunctionBehavior)oBehavior).getSpecification();
      if(oFeature instanceof Operation) {
        oRetValue = (Operation)oFeature;
View Full Code Here

      Transition in_oTransition,
      TCGTransition in_oActualTCGTransition,
      List<Event> in_colEvents)
  {
    // determine the effect of the transition - select their parameters for event
    Operation oTransitionEffect = null;
    if(in_oTransition.getEffect() != null &&
        in_oTransition.getEffect() instanceof FunctionBehavior) {
      BehavioralFeature oFeature = ((FunctionBehavior)in_oTransition.getEffect()).getSpecification();
      if(oFeature instanceof Operation) {
        oTransitionEffect = (Operation)oFeature;
View Full Code Here

      Transition in_oTransition,
      TCGTransition in_oActualTCGTransition,
      boolean in_bSplitInequationsBeforeTestGoalDefinition)
  throws Exception
  {
    Operation oBehavior = TestCaseGraphHelper.getContextEffectSpecification(in_oTransition);
    org.eclipse.uml2.uml.Class oContextClass = Configuration.getContextClassForVertex(
        (in_oTransition.getSource().getContainer() != null ? in_oTransition.getSource() : in_oTransition.getTarget()));

    if(oBehavior != null)
    {
      // actual TCGTransition was already used for event or guard?
      // -> create new transition!
      if(!in_oActualTCGTransition.getEvents().isEmpty() ||
          (in_oActualTCGTransition.getPrecondition() != null))
      {
        in_oActualTCGTransition =
          m_oTCGHelper.insertTransitionBetweenTransitionAndTargetNode(
              in_oActualTCGTransition);
        in_oActualTCGTransition.getSourceNode().setName(getTemporaryNodeName());
      }
     
      // add the precondition of the referenced operation
      if(oBehavior.getPreconditions() != null)
      {
        // TODO alle angegebenen preconditions �bernehmen
        //for(Constraint oPreConstraint : oBehavior.getPreconditions())
        if(!oBehavior.getPreconditions().isEmpty())
        {
          for (Constraint oPreConstraint : oBehavior.getPreconditions()) {
            String sPreExpression =
                SystemModelHelper.getConstraintSpecification(oPreConstraint);
            in_oActualTCGTransition.addPrecondition(TCGDisjunctiveNormalFormHelperClass.getDNFForCondition(
                  sPreExpression, oBehavior, oContextClass,
                  Configuration.getOCLPreId(),
                  in_bSplitInequationsBeforeTestGoalDefinition));           
          }
          Constraint oPreConstraint = oBehavior.getPreconditions().get(0);
          String sPreExpression =
            SystemModelHelper.getConstraintSpecification(oPreConstraint);
          in_oActualTCGTransition.setPrecondition(
              TCGDisjunctiveNormalFormHelperClass.getDNFForCondition(
                  sPreExpression, oBehavior, oContextClass,
                  Configuration.getOCLPreId(),
                  in_bSplitInequationsBeforeTestGoalDefinition));
        }
      }

      // add the postcondition of the referenced operation
      if(oBehavior.getPostconditions() != null)
      {
        if(!oBehavior.getPostconditions().isEmpty())
        {
          for (Constraint oPostConstraint : oBehavior.getPostconditions()) {
            String sPostExpression =
                SystemModelHelper.getConstraintSpecification(oPostConstraint);
            in_oActualTCGTransition.addPostcondition(TCGDisjunctiveNormalFormHelperClass.getDNFForCondition(
                  sPostExpression, oBehavior, oContextClass,
                  Configuration.getOCLPreId(),
                  in_bSplitInequationsBeforeTestGoalDefinition));           
          }
          Constraint oPostConstraint = oBehavior.getPostconditions().get(0);
          String sPostExpression =
            SystemModelHelper.getConstraintSpecification(oPostConstraint);
          in_oActualTCGTransition.setPostcondition(
              TCGDisjunctiveNormalFormHelperClass.getDNFForCondition(
                  sPostExpression, oBehavior, oContextClass,
View Full Code Here

      else
      {
        // TODO unvollst�ndige Ausgabebehandlung -> inwiefern?
        // get getter operation
        String sPropName = oPropReference.getName();
        Operation oOp = oAttrOpRef.get(oPropReference);
        if(oOp != null) {
          sPropName = oOp.getName() + "()";
        }
        in_oFormattedOutput.append(m_sObjectName + "." + sPropName);
        in_oFormattedOutput.append(getTypeNameAccessFunction(oPropReference.getType().getName()));
      }
    }   
View Full Code Here

   * @return Handler corresponding to the given edit part
   */
  public IElementHandling findHandler(EditPart p) {
    Class classSel = null;
    Property propSel = null;
    Operation opSel = null;
    Package packSel = null;
    String name = new String();
    // We get the underlying UML element in its specialized form
    if(p.getModel() instanceof Node) {
      Node model = (Node)p.getModel();
      if(
          model.getElement()
          instanceof Class
      ) {
        classSel = (Class)model.getElement();
        name = ClassHandler.buildFullyQualifiedName(classSel);
      }
      else if(model.getElement() instanceof Operation) {
        opSel = (Operation)model.getElement();
        classSel = opSel.getClass_();
        name = OperationHandler.buildFullyQualifiedName(opSel);
      }
      else if(model.getElement() instanceof Property) {
        propSel = (Property)model.getElement();
        name = PropertyHandler.buildFullyQualifiedName(propSel);
View Full Code Here

TOP

Related Classes of org.eclipse.uml2.uml.Operation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.