|
@@ -20,9 +20,9 @@ Element core = ?
|
|
|
Element caches
|
|
|
|
|
|
String function full_name(model_id : String):
|
|
|
- if (dict_in(caches["full_name"], model_id)):
|
|
|
- if (get_entry_id(caches["full_name"]) == model_id):
|
|
|
- return caches["full_name"]!
|
|
|
+ //if (dict_in(caches["full_name"], model_id)):
|
|
|
+ // if (get_entry_id(caches["full_name"][model_id]) == model_id):
|
|
|
+ // return caches["full_name"]!
|
|
|
|
|
|
// No cache, or out of date
|
|
|
Element incoming
|
|
@@ -33,7 +33,7 @@ String function full_name(model_id : String):
|
|
|
if (set_len(incoming) > 0):
|
|
|
parent = set_pop(incoming)
|
|
|
parent_name = full_name(parent)
|
|
|
- dict_add(caches["full_name"], parent, parent_name)
|
|
|
+ //dict_add(caches["full_name"], parent, parent_name)
|
|
|
return string_join(parent_name + "/", read_attribute(core, model_id, "name"))!
|
|
|
else:
|
|
|
return ""!
|
|
@@ -252,7 +252,7 @@ String function get_entry_id(name : String):
|
|
|
Boolean found
|
|
|
|
|
|
i = 0
|
|
|
- log("Searching for " + name)
|
|
|
+ //log("Searching for " + name)
|
|
|
hierarchy_split = string_split(name, "/")
|
|
|
current = caches["root"]
|
|
|
|
|
@@ -673,7 +673,7 @@ Boolean function enact_action(pm : Element, element : String, prefix : String, u
|
|
|
key = set_pop(keys)
|
|
|
if (get_entry_id(output_map[key]) == ""):
|
|
|
// New model
|
|
|
- model_create(result[key], output_map[key], user_id, get_entry_id(key), "Model")
|
|
|
+ model_create(result[key], output_map[key], user_id, get_entry_id(outputs[key]), "Model")
|
|
|
else:
|
|
|
model_overwrite(result[key], get_entry_id(output_map[key]), get_entry_id(outputs[key]))
|
|
|
return True!
|
|
@@ -1043,12 +1043,12 @@ String function cmd_transformation_execute(user_id : String, transformation_name
|
|
|
|
|
|
if (get_entry_id(target_model_name) == ""):
|
|
|
// Doesn't exist yet, so we can easily create
|
|
|
- dict_add(output_map, assoc_name, full_name(target))
|
|
|
+ dict_add(output_map, assoc_name, full_name(readAssociationDestination(core, target)))
|
|
|
dict_add(outputs, assoc_name, target_model_name)
|
|
|
else:
|
|
|
// Already exists, so we need to check for write access
|
|
|
if (allow_write(user_id, get_entry_id(target_model_name))):
|
|
|
- dict_add(output_map, assoc_name, full_name(target))
|
|
|
+ dict_add(output_map, assoc_name, full_name(readAssociationDestination(core, target)))
|
|
|
dict_add(outputs, assoc_name, target_model_name)
|
|
|
else:
|
|
|
return "Permission denied to model: " + target_model_name!
|
|
@@ -1073,7 +1073,9 @@ String function cmd_transformation_execute(user_id : String, transformation_name
|
|
|
|
|
|
if (get_entry_id(outputs[key]) == ""):
|
|
|
// New model
|
|
|
- model_create(result[key], outputs[key], user_id, get_entry_id(key), "Model")
|
|
|
+ log("Creating new model " + cast_v2s(outputs[key]))
|
|
|
+ log(" typed by " + cast_v2s(output_map[key]))
|
|
|
+ model_create(result[key], outputs[key], user_id, get_entry_id(output_map[key]), "Model")
|
|
|
else:
|
|
|
model_overwrite(result[key], get_entry_id(outputs[key]), get_entry_id(output_map[key]))
|
|
|
|
|
@@ -1442,7 +1444,7 @@ String function cmd_transformation_add_MT(user_id : String, source_models : Elem
|
|
|
|
|
|
ramified_metamodel = ramify(merged_formalism)
|
|
|
model_create(ramified_metamodel, "RAMified/" + operation_name, user_id, get_entry_id("formalisms/SimpleClassDiagrams"), "Model")
|
|
|
- ramified_metamodel_id = get_entry_id("RAMified" + operation_name)
|
|
|
+ ramified_metamodel_id = get_entry_id("RAMified/" + operation_name)
|
|
|
|
|
|
// Now use the RAMified model to create the instance
|
|
|
if (get_entry_id(operation_name) == ""):
|