Пример #1
0
 /**
  *
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  *
  * @generated NOT
  */
 public boolean createProperty(String propertyName, String initialValue) {
   if (!hasProperty(propertyName)) {
     PropertyValue value = NotationFactory.eINSTANCE.createPropertyValue();
     value.setRawValue(initialValue);
     return getPropertiesMap().put(propertyName, value) == null;
   }
   return false;
 }
Пример #2
0
 /**
  *
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  *
  * @generated NOT
  */
 public boolean createProperty(String propertyName, EDataType instanceType, Object initialValue) {
   if (propertyName != null && !hasProperty(propertyName)) {
     PropertyValue value = NotationFactory.eINSTANCE.createPropertyValue();
     if (instanceType == null) {
       if (initialValue instanceof String) value.setRawValue((String) initialValue);
       else return false;
     } else {
       value.setInstanceType(instanceType);
       value.setValue(initialValue);
     }
     return getPropertiesMap().put(propertyName, value) == null;
   }
   return false;
 }