|
@@ -193,19 +193,16 @@ String function cmd_attr_type(write : Boolean, model : Element, element_name : S
|
|
|
if (dict_in(model["metamodel"]["model"], "AttributeLink")):
|
|
|
attrs = getInstantiatableAttributes(model, element_name, "AttributeLink")
|
|
|
if (set_in(dict_keys(attrs), attr_name)):
|
|
|
- if (set_in(dict_keys(attrs), attr_name)):
|
|
|
- if (dict_in(model["model"][element_name], attr_name)):
|
|
|
- Boolean optional
|
|
|
- String attr_edge
|
|
|
- attr_edge = reverseKeyLookup(model["model"], dict_read_edge(model["model"][element_name], attr_name))
|
|
|
- optional = read_attribute(model, attr_edge, "optional")
|
|
|
- model_undefine_attribute(model, element_name, attr_name)
|
|
|
- model_define_attribute_ID(model, element_name, attr_name, optional, new_attr_type, attr_edge)
|
|
|
- return "Success"!
|
|
|
- else:
|
|
|
- return "Attribute not defined here: " + attr_name!
|
|
|
+ if (dict_in(model["model"][element_name], attr_name)):
|
|
|
+ Boolean optional
|
|
|
+ String attr_edge
|
|
|
+ attr_edge = reverseKeyLookup(model["model"], dict_read_edge(model["model"][element_name], attr_name))
|
|
|
+ optional = read_attribute(model, attr_edge, "optional")
|
|
|
+ model_undefine_attribute(model, element_name, attr_name)
|
|
|
+ model_define_attribute_ID(model, element_name, attr_name, optional, new_attr_type, attr_edge)
|
|
|
+ return "Success"!
|
|
|
else:
|
|
|
- return "Attribute not defined: " + attr_name!
|
|
|
+ return "Attribute not defined here: " + attr_name!
|
|
|
else:
|
|
|
return "Attribute not found: " + attr_name!
|
|
|
else:
|