Package org.eclipse.uml2.uml

Examples of org.eclipse.uml2.uml.Pseudostate


      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


   */
  private static Boolean isProfileApplied(Package currentPackage, String profileQualifiedName) {
    final EList<Profile> allProfiles = currentPackage.getAllAppliedProfiles();
    final Iterator<Profile> it = allProfiles.iterator();
    while (it.hasNext()) {
      Profile cur = it.next();
      if (profileQualifiedName.equalsIgnoreCase(cur.getQualifiedName()))
        return true;
    }
    return false;
  }
View Full Code Here

   *            : the profile qualified name you want to apply.
   */
  private void applySysMLProfile(Package p, String profileQualifiedName) {
    if (isProfileApplied(p, profileQualifiedName))
      return;
    Profile parentProfile = null;
    if (profileQualifiedName.startsWith("SysML")) {
      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]);
    }

View Full Code Here

   * <!-- begin-user-doc --> <!-- end-user-doc -->
   *
   * @generated
   */
  public void setBase_Property(Property newBase_Property) {
    Property oldBase_Property = base_Property;
    base_Property = newBase_Property;
    if(eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, ConstraintsPackage.CONSTRAINT_PROPERTY__BASE_PROPERTY, oldBase_Property, base_Property));
  }
View Full Code Here

      {
        for(Vertex oRunVertex : oRegion.getSubvertices())
        {
          if(oRunVertex instanceof Pseudostate)
          {
            Pseudostate oPseudostate = (Pseudostate)oRunVertex;
            if(oPseudostate.getKind().equals(PseudostateKind.SHALLOW_HISTORY_LITERAL) ||
              oPseudostate.getKind().equals(PseudostateKind.DEEP_HISTORY_LITERAL))
            {
              Vertex oFirstVertex = m_oHistory.findTheLastUsedOf(oRegion.getSubvertices());
              if((oFirstVertex == null) || (oPseudostate.equals(oFirstVertex)))
              {
                oFirstVertex = oPseudostate.getOutgoings().get(0).getTarget();
              }
              // recursive search for sub regions
              colVertices.addAll(getAtomicSubVertices(oFirstVertex));
             
            }
            else if(oPseudostate.getKind().equals(PseudostateKind.INITIAL_LITERAL))
            {
              Vertex oFirstVertex = oPseudostate.getOutgoings().get(0).getTarget();
              // recursive search for sub regions
              colVertices.addAll(getAtomicSubVertices(oFirstVertex));
            }
          }
        }
View Full Code Here

    {
      for(Vertex oVertex : oRegion.getSubvertices())
      {
        if(oVertex instanceof Pseudostate)
        {
          Pseudostate oPS = (Pseudostate)oVertex;
          if(oPS.getKind().getValue() == PseudostateKind.INITIAL)
            colVertices.add((Pseudostate)oVertex);
        }
      }
    }
    return colVertices;
View Full Code Here

      // jeder init pseudo state hat genau eine ausgehende Transition
      for(Vertex oVertex : oRegion.getSubvertices())
      {
        if(oVertex instanceof Pseudostate)
        {
          Pseudostate oPS = (Pseudostate)oVertex;
          if(oPS.getKind().getValue() == PseudostateKind.INITIAL)
          {
            if(oPS.getOutgoings().size() != 1)
              throw new Exception("init state " + oPS.getName() + " has not exactly one outgoing transition");
          }
           
        }
      }
    }
View Full Code Here

      {
        for(Vertex oRunVertex : oRegion.getSubvertices())
        {
          if(oRunVertex instanceof Pseudostate)
          {
            Pseudostate oPseudostate = (Pseudostate)oRunVertex;
            if(oPseudostate.getKind().equals(PseudostateKind.SHALLOW_HISTORY_LITERAL) ||
              oPseudostate.getKind().equals(PseudostateKind.DEEP_HISTORY_LITERAL))
            {
              Vertex oFirstVertex = m_oHistory.findTheLastUsedOf(oRegion.getSubvertices());
              if((oFirstVertex == null) || (oPseudostate.equals(oFirstVertex)))
              {
                oFirstVertex = oPseudostate.getOutgoings().get(0).getTarget();
              }
              // recursive search for sub regions
              colVertices.addAll(getAtomicSubVertices(oFirstVertex));
             
            }
            else if(oPseudostate.getKind().equals(PseudostateKind.INITIAL_LITERAL))
            {
              Vertex oFirstVertex = oPseudostate.getOutgoings().get(0).getTarget();
              // recursive search for sub regions
              colVertices.addAll(getAtomicSubVertices(oFirstVertex));
            }
          }
        }
View Full Code Here

    // remember visited states
    m_oTestCaseGraphHelper.getHistory().addVisitedState(in_oSMState);
   
    // check if one of the state of the current system model state is a pseudo state -> handle this first!
    // TODO k�nnen durch ein Event mehrere pseudo states erreicht werden
    Pseudostate oPseudostate = in_oSMState.returnContainedPseudoState();
    if(oPseudostate != null) {
      convertPseudoState(in_oSMState, oPseudostate, in_oTCGNode);
    } else {
      convertState(in_oSMState, in_oTCGNode);
    }
View Full Code Here

    {
      for(Vertex oVertex : oRegion.getSubvertices())
      {
        if(oVertex instanceof Pseudostate)
        {
          Pseudostate oPS = (Pseudostate)oVertex;
          if(oPS.getKind().getValue() == PseudostateKind.INITIAL)
            colVertices.add((Pseudostate)oVertex);
        }
      }
    }
    return colVertices;
View Full Code Here

TOP

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

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.