Package org.eclipse.uml2.uml

Examples of org.eclipse.uml2.uml.State


      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

  private void addAllSubNodes(Vertex in_oVertex)
  {
    boolean bHasSubRegions = false;
    if(in_oVertex instanceof State)
    {
      State oState = (State)in_oVertex;
      if(!oState.getRegions().isEmpty())
        bHasSubRegions = true;
     
      if(bHasSubRegions == true)
        m_colVertices.addAll(getAtomicSubVertices(oState));
    }
View Full Code Here

  private ArrayList<Vertex> getAtomicSubVertices(Vertex in_oVertex)
  {
    ArrayList<Vertex> colVertices = new ArrayList<Vertex>();
    if(in_oVertex instanceof State)
    {
      State oState = (State)in_oVertex;
      if(oState.getRegions().isEmpty())
        colVertices.add(in_oVertex);
     
      // find the target states of the outgoing transitions of all initial states of the subregions
      for(Region oRegion : oState.getRegions())
      {
        for(Vertex oRunVertex : oRegion.getSubvertices())
        {
          if(oRunVertex instanceof Pseudostate)
          {
View Full Code Here

  private void addAllSubNodes(Vertex in_oVertex)
  {
    boolean bHasSubRegions = false;
    if(in_oVertex instanceof State)
    {
      State oState = (State)in_oVertex;
      if(!oState.getRegions().isEmpty())
        bHasSubRegions = true;
     
      if(bHasSubRegions == true)
        m_colVertices.addAll(getAtomicSubVertices(oState));
    }
View Full Code Here

  private ArrayList<Vertex> getAtomicSubVertices(Vertex in_oVertex)
  {
    ArrayList<Vertex> colVertices = new ArrayList<Vertex>();
    if(in_oVertex instanceof State)
    {
      State oState = (State)in_oVertex;
      if(oState.getRegions().isEmpty())
        colVertices.add(in_oVertex);
     
      // find the target states of the outgoing transitions of all initial states of the subregions
      for(Region oRegion : oState.getRegions())
      {
        for(Vertex oRunVertex : oRegion.getSubvertices())
        {
          if(oRunVertex instanceof Pseudostate)
          {
View Full Code Here

 
  private static List<Transition> getOutgoingTransitionsOfSuperNodesTriggeredByEvent(
      State in_oState, List<Trigger> in_colTriggers)
  {
    List<Transition> colTransitions = new ArrayList<Transition>();
    State oTmpState = in_oState.getContainer().getState();
    while(oTmpState != null) {
      for(Transition oTransition : oTmpState.getOutgoings()) {
        for(Trigger oOriginalTrigger : in_colTriggers) {
          for(Trigger oTrigger : oTransition.getTriggers()) {
            if(oTrigger.getEvent().equals(oOriginalTrigger.getEvent())) {
              colTransitions.add(oTransition);
            }
          }
        }
      }
      oTmpState = oTmpState.getContainer().getState();
    }
    return colTransitions;
  }
View Full Code Here

  {
    List<Transition> colTransitions = new ArrayList<Transition>();
    List<State> colTmpStates = new ArrayList<State>();
    colTmpStates.add(in_oState);
    while(!colTmpStates.isEmpty()) {
      State oTmpState = colTmpStates.get(0);
      colTmpStates.remove(oTmpState);
     
      if(oTmpState.isComposite()) {
        for(Region oRegion : oTmpState.getRegions())
          for(Vertex oVertex: oRegion.getSubvertices())
            if(oVertex instanceof State)
              colTmpStates.add((State)oVertex);
      }
      if(oTmpState.isSubmachineState()) {
        for(Region oRegion : oTmpState.getSubmachine().getRegions())
          for(Vertex oVertex: oRegion.getSubvertices())
            if(oVertex instanceof State)
              colTmpStates.add((State)oVertex);       
      }
     
      if(!oTmpState.equals(in_oState)) {
        for(Transition oTransition : oTmpState.getOutgoings()) {
          for(Trigger oOriginalTrigger : in_colTriggers) {
            for(Trigger oTrigger : oTransition.getTriggers()) {
              if(oTrigger.getEvent().equals(oOriginalTrigger.getEvent())) {
                colTransitions.add(oTransition);
              }
View Full Code Here

TOP

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

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.