Package org.eclipse.uml2.uml

Examples of org.eclipse.uml2.uml.Behavior


    return new String("");   
  }
 
  public static String getMethodCondition(Transition in_oTransition, String in_sKindOfCondition)
  {
    Behavior oEffect = in_oTransition.getEffect();
    if(oEffect != null)
    {
      for(EAnnotation oEAnnotation : oEffect.getSpecification().getEAnnotations())
      {
        if(oEAnnotation.getSource().compareTo(Configuration.getOCLId()) == 0)
        {
          if(oEAnnotation.getDetails().containsKey(in_sKindOfCondition))
            return oEAnnotation.getDetails().get(in_sKindOfCondition);
View Full Code Here


//            throw new Exception("trigger " + oTrigger.getName() + " of transition " + oTransition.getName()
//                + " has no assigned event");
//        }
       
        // jeder Effect einer Transition referenziert in specification auch eine Operation
        Behavior oEffect = oTransition.getEffect();
        if(oEffect != null)
        {
          if(oEffect.getSpecification() == null)
          {
            throw new Exception("transition " + oTransition.getName() + " has an effect without an assigned operation");
          }
        }
      }
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

   * @param in_oTransition
   * @return
   */
  public static Operation getContextEffectSpecification(Transition in_oTransition)
  {
    Behavior oEffect = in_oTransition.getEffect();
    if(oEffect != null)
    {
      if(oEffect.getSpecification() instanceof Operation)
        return getContextEffectSpecificationHelper((Operation)oEffect.getSpecification(),
            Configuration.getContextClassForVertex(in_oTransition.getSource()));
    }
    return null;
  }
View Full Code Here

   * <!-- begin-user-doc --> <!-- end-user-doc -->
   *
   * @generated
   */
  public void setBase_Behavior(Behavior newBase_Behavior) {
    Behavior oldBase_Behavior = base_Behavior;
    base_Behavior = newBase_Behavior;
    if(eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, RequirementsPackage.TEST_CASE__BASE_BEHAVIOR, oldBase_Behavior, base_Behavior));
  }
View Full Code Here

    // The edgeview represents the new graphical edge
    // with testing of its source and target nodes we can
    // know if the user reconnected the source or the target of the edge
    reconnectService.setReconnectingSource(edgeView.getSourceNode().equals(targetView));
    Class requirement = (Class)((DNodeList)edgeView.getTargetNode()).getTarget();

    reconnectService.setSubRequirement(requirement);
    reconnectService.setOldPointedClass(source);
    reconnectService.setNewPointedClass(target);
    return reconnectService.doSwitch(context);
View Full Code Here

   */
  public void createAssociatedStereotype(Element e, String profileQualifiedName, String stereotypeName) {

    applySysMLProfile(e.getModel(), profileQualifiedName);

    final Element element = e;
    final String stereotypeQualifiedName = profileQualifiedName + "::" + stereotypeName;

    final Stereotype stereotype = element.getApplicableStereotype(stereotypeQualifiedName);
    final EList<Stereotype> appliedStereotypes = element.getAppliedStereotypes();

    if (stereotype == null) {
      final String message = "Can't apply the setereotype " + stereotypeQualifiedName + " on "
          + element.toString();
      Activator.log(Status.WARNING, message, null);
    } else if (appliedStereotypes != null && appliedStereotypes.contains(stereotype)) {
      final String message = "The stereotype " + stereotype.getQualifiedName()
          + " is already applied on " + element.toString();
      Activator.log(Status.INFO, message, null);
    } else {
      element.applyStereotype(stereotype);
    }
  }
View Full Code Here

   *            : the given element for which you want to delete the stereotype.
   * @param steQualified
   *            : the qualified name of the stereotype you want to delete (ex. : SysML::Blocks::Block).
   */
  public void deleteAssociatedStereotype(Element e, String steQualified) {
    final Element element = e;

    if (element != null && steQualified != null) {
      final Stereotype stereotype = element.getAppliedStereotype(steQualified);
      if (stereotype != null) {
        element.unapplyStereotype(stereotype);
      }
    } else {
      final String message = "Can't delete the stereotype application because the element or the stereotypeName keys are not correct";
      Activator.log(Status.INFO, message, null);
    }
View Full Code Here

    deleteAssociatedStereotype(e, SYSML_REQUIREMENT);
    final EObject root = getRootContainer(e);
    for (final Iterator<EObject> iterator = root.eAllContents(); iterator.hasNext();) {
      final EObject object = iterator.next();
      if (object instanceof Abstraction) {
        final Element supplier = ((Abstraction)object).getSupplier(e.getName());
        if (supplier != null) {
          Stereotype s = ((Abstraction)object).getAppliedStereotype("SysML::Requirements::Satisfy");
          if (s != null) {
            deleteAssociatedStereotype((Abstraction)object, "SysML::Requirements::Satisfy");
          } else {
View Full Code Here

      parentProfile = Activator.getSysMLProfile();
    } else if (profileQualifiedName.startsWith("Standard")) {
      parentProfile = Activator.getStandardProfile();
    }

    Package profilePackage = parentProfile;

    final String[] profiles = profileQualifiedName.split(":{2}");
    // search the profile in the package hierarchy
    for (int index = 1; index < profiles.length - 1; index++) {
      profilePackage = profilePackage.getNestedPackage(profiles[index]);
    }

    Profile profile = (Profile)profilePackage;

    if (profileQualifiedName.startsWith("SysML")) {
      profile = (Profile)profilePackage.getNestedPackage(profiles[profiles.length - 1]);
    }

    if (profile == null) {
      final String message = "Can't apply the profile " + profileQualifiedName + " on "
          + p.getQualifiedName();
View Full Code Here

TOP

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

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.