|
@@ -91,7 +91,7 @@ String function instantiate_node(model : Element, type_name : String, instance_n
|
|
|
return actual_name
|
|
|
|
|
|
String function find_attribute_type(model : Element, elem : String, name : String):
|
|
|
- Element mm_elem
|
|
|
+ String mm_elem
|
|
|
String direct_type
|
|
|
|
|
|
direct_type = getName(model["metamodel"], dict_read_node(model["type_mapping"], model["model"][elem]))
|
|
@@ -101,7 +101,7 @@ String function find_attribute_type(model : Element, elem : String, name : Strin
|
|
|
// Couldn't find element, so is not allowed!
|
|
|
return ""
|
|
|
else:
|
|
|
- return getName(model["metamodel"], dict_read_edge(model["metamodel"][mm_elem], name))
|
|
|
+ return getName(model["metamodel"], dict_read_edge(model["metamodel"]["model"][mm_elem], name))
|
|
|
|
|
|
Element function get_superclasses(model : Element, name : String):
|
|
|
Element result
|
|
@@ -154,6 +154,11 @@ Void function instantiate_attribute(model : Element, element : String, attribute
|
|
|
String attr_name
|
|
|
|
|
|
attr_type = find_attribute_type(model, element, attribute_name)
|
|
|
+
|
|
|
+ if (attr_type == ""):
|
|
|
+ log("Could not find attribute!")
|
|
|
+ return
|
|
|
+
|
|
|
attr_name = model_add_value(model, "", value)
|
|
|
retype(model, attr_name, getName(model["metamodel"], read_edge_dst(model["metamodel"]["model"][attr_type])))
|
|
|
instantiate_link(model, attr_type, "", element, attr_name)
|