Package org.eclipse.papyrus.sysml.blocks

Examples of org.eclipse.papyrus.sysml.blocks.Unit


      if (stereotype instanceof ValueType) {
        ValueType valueType = (ValueType)stereotype;
        if (instanceSpecification.getStereotypeApplications() != null) {
          stereotype = instanceSpecification.getStereotypeApplications().get(0);
          if (stereotype instanceof Unit) {
            Unit unit = (Unit)stereotype;
            valueType.setUnit(unit);
          }
        }
      }
    }
View Full Code Here


   *            : the new Unit (an InstanceSpecification stereotyped with a Unit).
   */
  public void setUnitForPrimitiveType(Element pt, InstanceSpecification is) {
    if (is != null && pt != null) {
      final Stereotype valueType = pt.getAppliedStereotype("SysML::Blocks::ValueType");
      final Unit newUnit = (Unit)is.getStereotypeApplication(is
          .getAppliedStereotype("SysML::Blocks::Unit"));
      pt.setValue(valueType, "unit", newUnit);
    }
  }
View Full Code Here

        result = defaultCase(theEObject);
      return result;
    }
    case BlocksPackage.UNIT:
    {
      Unit unit = (Unit)theEObject;
      T result = caseUnit(unit);
      if(result == null)
        result = defaultCase(theEObject);
      return result;
    }
View Full Code Here

   * <!-- begin-user-doc --> <!-- end-user-doc -->
   *
   * @generated
   */
  public void setUnit(Unit newUnit) {
    Unit oldUnit = unit;
    unit = newUnit;
    if(eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, BlocksPackage.VALUE_TYPE__UNIT, oldUnit, unit));
  }
View Full Code Here

TOP

Related Classes of org.eclipse.papyrus.sysml.blocks.Unit

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.