|
@@ -2018,6 +2018,27 @@ String function cmd_transformation_signature(transformation_name : String):
|
|
return "Model is not an operation: " + transformation_name!
|
|
return "Model is not an operation: " + transformation_name!
|
|
else:
|
|
else:
|
|
return "No such operation: " + transformation_name!
|
|
return "No such operation: " + transformation_name!
|
|
|
|
+
|
|
|
|
+String function cmd_model_types(model_name : String):
|
|
|
|
+ if (get_entry_id(model_name) != ""):
|
|
|
|
+ String model_id
|
|
|
|
+ model_id = get_entry_id(model_name)
|
|
|
|
+
|
|
|
|
+ Element types
|
|
|
|
+ String type
|
|
|
|
+ String result
|
|
|
|
+
|
|
|
|
+ result = "Success: "
|
|
|
|
+ types = allAssociationDestinations(core, model_id, "instanceOf")
|
|
|
|
+ while (set_len(types) > 0):
|
|
|
|
+ type = set_pop(types)
|
|
|
|
+ log("Checking type: " + cast_v2s(type))
|
|
|
|
+ log("Name attr: " + cast_v2s(read_attribute(core, type, "name")))
|
|
|
|
+ result = string_join(result, full_name(type) + "\n")
|
|
|
|
+
|
|
|
|
+ return result!
|
|
|
|
+ else:
|
|
|
|
+ return "No such model: " + model_name!
|
|
|
|
|
|
String function cmd_element_list_nice(model_name : String, metamodel_name : String):
|
|
String function cmd_element_list_nice(model_name : String, metamodel_name : String):
|
|
if (get_entry_id(model_name) != ""):
|
|
if (get_entry_id(model_name) != ""):
|
|
@@ -2165,6 +2186,8 @@ Void function user_function_skip_init(user_id : String):
|
|
elif (cmd == "service_poll"):
|
|
elif (cmd == "service_poll"):
|
|
// TODO
|
|
// TODO
|
|
cmd = "FAIL"
|
|
cmd = "FAIL"
|
|
|
|
+ elif (cmd == "model_types"):
|
|
|
|
+ output(cmd_model_types(single_input("Model name?")))
|
|
else:
|
|
else:
|
|
output("Unknown command: " + cmd)
|
|
output("Unknown command: " + cmd)
|
|
|
|
|