Package org.eclipse.uml2.uml

Examples of org.eclipse.uml2.uml.Type


        // TODO: Be sure it works with RSM / MD11.5
        Collection templateParameters = new ArrayList();
        if (this.metaObject instanceof TemplateableElement)
        {
            TemplateableElement templateableElement = (TemplateableElement)this.metaObject;
            TemplateSignature templateSignature = templateableElement.getOwnedTemplateSignature();
            if (templateSignature != null)
            {
                templateParameters.addAll(templateSignature.getParameters());
            }
        }
        return templateParameters;
    }
View Full Code Here


    {
        // TODO: Be sure it works with RSM / MD11.5
        Collection templateParameters = new ArrayList();
        if (this.metaObject instanceof TemplateableElement)
        {
            TemplateableElement templateableElement = (TemplateableElement)this.metaObject;
            TemplateSignature templateSignature = templateableElement.getOwnedTemplateSignature();
            if (templateSignature != null)
            {
                templateParameters.addAll(templateSignature.getParameters());
            }
        }
View Full Code Here

                    type,
                    MetafacadeConstants.NAMESPACE_SCOPE_OPERATOR,
                    true);
            if (modelElement instanceof Type)
            {
                Type element = (Type)modelElement;
                final Property property = umlClass.createOwnedAttribute(
                        name,
                        element,
                        1,
                        1);
View Full Code Here

        if (tagValue != null)
        {
            valueAsString = tagValue.toString();
            if (tagValue instanceof ValueSpecification)
            {
                ValueSpecification literal = (ValueSpecification)tagValue;
                valueAsString = literal.stringValue();
            }
            else if (tagValue instanceof InstanceSpecification)
            {
                InstanceSpecification instance = (InstanceSpecification)tagValue;
                valueAsString = instance.getName();
View Full Code Here

                final Property property = umlClass.createOwnedAttribute(
                        name,
                        element,
                        1,
                        1);
                VisibilityKind kind = VisibilityKind.PUBLIC_LITERAL;
                if (visibility.equalsIgnoreCase("package"))
                {
                    kind = VisibilityKind.PACKAGE_LITERAL;
                }
                if (visibility.equalsIgnoreCase("private"))
View Full Code Here

    protected java.lang.String handleGetVisibility()
    {
        if (this.metaObject instanceof NamedElement)
        {
            final NamedElement element = (NamedElement)this.metaObject;
            final VisibilityKind kind = element.getVisibility();
            String visibility = null;
            if (kind.equals(VisibilityKind.PACKAGE_LITERAL))
            {
                visibility = "package";
            }
            if (kind.equals(VisibilityKind.PRIVATE_LITERAL))
            {
                visibility = "private";
            }
            if (kind.equals(VisibilityKind.PROTECTED_LITERAL))
            {
                visibility = "protected";
            }
            if (kind.equals(VisibilityKind.PUBLIC_LITERAL))
            {
                visibility = "public";
            }
            final TypeMappings languageMappings = this.getLanguageMappings();
            if (languageMappings != null)
View Full Code Here

   *            the given Element.
   * @return th element updated.
   */
  public Element updateStereotype(Element element) {
    if (element instanceof Property) {
      final Type type = ((Property)element).getType();
      if (type != null) {
        final Collection<EObject> elementStereotypes = element.getStereotypeApplications();
        final Collection<EObject> typeStereotypes = type.getStereotypeApplications();
        for (EObject typeStereotype : typeStereotypes) {
          if (typeStereotype instanceof ConstraintBlock) {
            if (elementStereotypes == null || elementStereotypes.isEmpty()) {
              createAssociatedStereotype(element, "SysML::Constraints", "ConstraintProperty");
              break;
View Full Code Here

  protected AbstractTCGElement handleParameter(Parameter umlParameter) {
    // XXX maybe one could make a difference between Variables and
    // Parameters, since OCL semantic says Parameters are Immutable within
    // an activity.
    Type umlType = umlParameter.getType();
    TCGVariable tcgVar = null;
    TCGBasicVariableType tcgType = null;
    tcgType = TCGBasicVariableType.getByName(umlType.getName());
    if (tcgType != null) {
      tcgVar = factory.createTCGBasicVariable();
      ((TCGBasicVariable) tcgVar).setVariableType(tcgType);
    } else {
      tcgVar = factory.createTCGVariable();
View Full Code Here

    tcgActivity.getVariables().add(tcgVar);
    return tcgVar;
  }

  protected AbstractTCGElement handleProperty(Property umlProperty) {
    Type umlType = umlProperty.getType();
    TCGVariable tcgVar = null;
    TCGBasicVariableType tcgType = null;
    tcgType = TCGBasicVariableType.getByName(umlType.getName());
    if (tcgType != null) {
      tcgVar = factory.createTCGBasicVariable();
      ((TCGBasicVariable) tcgVar).setVariableType(tcgType);
    } else {
      tcgVar = factory.createTCGVariable();
View Full Code Here

    {
      TCGOCLAtom oAtom = (TCGOCLAtom)in_oExpression;
      // adding the reference from the atom to the containing transition
      if(oAtom.getElement() instanceof TypedElement) {
        TypedElement oTypedElement = (TypedElement)oAtom.getElement();
        Type oType = oTypedElement.getType();
        List<String> colBasicUnorderedTypeNames = new ArrayList<String>();
        colBasicUnorderedTypeNames.add("int");
        colBasicUnorderedTypeNames.add("integer");
        colBasicUnorderedTypeNames.add("double");
        for(String sTypeName : colBasicUnorderedTypeNames) {
          if(oType.getName().compareToIgnoreCase(sTypeName) == 0)
            return true;
        }
      }
    }
    else if(in_oExpression instanceof TCGOCLOperation)
View Full Code Here

TOP

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

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.