|
|
@@ -21,6 +21,11 @@ Boolean function main(model : Element):
|
|
|
while (set_len(elements) > 0):
|
|
|
class = set_pop(elements)
|
|
|
|
|
|
+ Integer x
|
|
|
+ Integer y
|
|
|
+ x = loc
|
|
|
+ y = 10
|
|
|
+
|
|
|
// Check if there is already an associated element
|
|
|
if (set_len(allOutgoingAssociationInstances(model, class, "TracabilityClass")) > 0):
|
|
|
// Yes, but is it still clean?
|
|
|
@@ -48,6 +53,8 @@ Boolean function main(model : Element):
|
|
|
while (set_len(related_groups) > 0):
|
|
|
group = set_pop(related_groups)
|
|
|
to_remove = allAssociationDestinations(model, group, "rendered/contains")
|
|
|
+ x = read_attribute(model, group, "x")
|
|
|
+ y = read_attribute(model, group, "y")
|
|
|
while (set_len(to_remove) > 0):
|
|
|
elem_to_remove = set_pop(to_remove)
|
|
|
if (read_type(model, elem_to_remove) == "rendered/Group"):
|
|
|
@@ -59,8 +66,8 @@ Boolean function main(model : Element):
|
|
|
text_loc = 5
|
|
|
|
|
|
group = instantiate_node(model, "rendered/Group", "")
|
|
|
- instantiate_attribute(model, group, "x", loc)
|
|
|
- instantiate_attribute(model, group, "y", 10)
|
|
|
+ instantiate_attribute(model, group, "x", x)
|
|
|
+ instantiate_attribute(model, group, "y", y)
|
|
|
instantiate_attribute(model, group, "__asid", list_read(string_split(class, "/"), 1))
|
|
|
dict_add(groups, class, group)
|
|
|
loc = loc + 200
|
|
|
@@ -121,12 +128,16 @@ Boolean function main(model : Element):
|
|
|
|
|
|
instantiate_link(model, "TracabilityClass", "", class, group)
|
|
|
|
|
|
- elements = allInstances(model, "abstract/Association")
|
|
|
+ // Flush all associations
|
|
|
+ elements = allInstances(model, "rendered/ConnectingLine")
|
|
|
while (set_len(elements) > 0):
|
|
|
class = set_pop(elements)
|
|
|
+ model_delete_element(model, class)
|
|
|
|
|
|
- if (set_len(allOutgoingAssociationInstances(model, class, "TracabilityAssociation")) > 0):
|
|
|
- continue!
|
|
|
+ // Rerender associations
|
|
|
+ elements = allInstances(model, "abstract/Association")
|
|
|
+ while (set_len(elements) > 0):
|
|
|
+ class = set_pop(elements)
|
|
|
|
|
|
attr_keys = dict_keys(getAttributeList(model, class))
|
|
|
|
|
|
@@ -141,6 +152,4 @@ Boolean function main(model : Element):
|
|
|
instantiate_attribute(model, elem, "__asid", list_read(string_split(class, "/"), 1))
|
|
|
instantiate_link(model, "rendered/contains", "", group, elem)
|
|
|
|
|
|
- instantiate_link(model, "TracabilityAssociation", "", class, elem)
|
|
|
-
|
|
|
return True!
|