Package org.eclipse.uml2.uml

Examples of org.eclipse.uml2.uml.Namespace


    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


  }
 
  public static Namespace getNamespaceForEvent(Vertex in_oVertex, Event in_oEvent)
  {
    org.eclipse.uml2.uml.Class oContextClass = Configuration.getContextClassForVertex(in_oVertex);
    Namespace oNamespace = oContextClass;
    if(in_oEvent != null)
    {
      if(in_oEvent instanceof CallEvent)
      {
        CallEvent oCallEvent = (CallEvent)in_oEvent;
View Full Code Here

         * split up the expression depending on the boolean operators
         * bring expression to normal form
         */
        //org.eclipse.uml2.uml.Class oContextClass = Configuration.getContextClass(in_oSMState.getSystemState().getContainer().getStateMachine());
        org.eclipse.uml2.uml.Class oContextClass = Configuration.getContextClassForVertex(oSMTransition.getSource());
        Namespace oNamespace = SystemModelHelper.getNamespaceForEvent(
            oSMTransition.getSource(), in_oEvent);

        OCLExpression oExpression = OCLParser.parseCondition(
            SystemModelHelper.getTransitionGuard(oSMTransition),
            oNamespace, Configuration.getOCLGuardId());
View Full Code Here

import org.xilaew.atg.model.activityTestCaseGraph.TCGVariableUsage;
import org.xilaew.atg.util.Logging;

class UMLHelper {
  public static Namespace getNamespace(NamedElement umlElement) {
    Namespace ns = umlElement.getNamespace();
    if (ns == null) {
      ns = getNamespace((NamedElement) umlElement.getOwner());
    }
    return ns;
  }
View Full Code Here

      Vertex in_oVertex,
      Event in_oEvent,
      Transition in_oTransition) {
   
    org.eclipse.uml2.uml.Class oContextClass = Configuration.getContextClassForVertex(in_oVertex);
    Namespace oNamespace = oContextClass;
    if(in_oEvent != null)
    {
      if(in_oEvent instanceof CallEvent)
      {
        CallEvent oCallEvent = (CallEvent)in_oEvent;
View Full Code Here

  public static String getFullEnumerationLiteralName(EnumerationLiteral in_oEnumerationLiteral)
  {
    StringBuffer oOutBuffer = new StringBuffer();
    // get type namespace
    Namespace oNamespace = in_oEnumerationLiteral.getEnumeration().getNamespace();
    while(oNamespace instanceof org.eclipse.uml2.uml.Class) {
      if(oOutBuffer.length() > 0)
        oOutBuffer.insert(0, ".");
      oOutBuffer.insert(0, oNamespace.getName());
      oNamespace = oNamespace.getNamespace();
    }
    if(oOutBuffer.length() > 0)
      oOutBuffer.append(".");

    // add enumeration and literal
View Full Code Here

    TCGEvent oEvent = null;
    if(!in_oActualTCGTransition.getEvents().isEmpty())
      oEvent = in_oActualTCGTransition.getEvents().get(0);
   
    // corresponding namespace (of corresponding operation)
    Namespace oNamespace = SystemModelHelper.getNamespaceForEvent(
        (in_oTransition.getSource().getContainer() != null ? in_oTransition.getSource() : in_oTransition.getTarget()),
        TCGEventHelperClass.getEventOfTCGEvent(oEvent),
        in_oTransition);
    org.eclipse.uml2.uml.Class oContextClass = Configuration.getContextClassForVertex(
        (in_oTransition.getSource().getContainer() != null ? in_oTransition.getSource() : in_oTransition.getTarget()));
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

   */
  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

TOP

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

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.