|
@@ -381,6 +381,8 @@ String function export_typing(model : Element, name : String, user_id : String):
|
|
|
instance_of = instantiate_link(core, "instanceOf", "", result, get_entry_id("formalisms/TypeMapping"))
|
|
|
instantiate_link(core, "semantics", "", instance_of, get_entry_id("models/conformance_mv"))
|
|
|
|
|
|
+ log("Stored new typing: " + result)
|
|
|
+
|
|
|
return result!
|
|
|
|
|
|
Void function model_create(model : Element, name : String, user_id : String, type_id : String, kind : String):
|
|
@@ -424,6 +426,14 @@ Void function model_overwrite(model : Element, model_id : String, metamodel_id :
|
|
|
choice = get_instanceOf_link(model_id, metamodel_id)
|
|
|
if (element_neq(choice, read_root())):
|
|
|
// There was a link, so we remove it
|
|
|
+
|
|
|
+ // First remove the type mapping it referred to
|
|
|
+ Element tl
|
|
|
+ tl = allAssociationDestinations(core, choice, "typing")
|
|
|
+ while (set_len(tl) > 0):
|
|
|
+ model_delete_element(core, set_pop(tl))
|
|
|
+
|
|
|
+ // Now delete the element itself
|
|
|
model_delete_element(core, choice)
|
|
|
|
|
|
// Create a new instanceOf relation now
|