#29 [Transformation Rule Language] Groups of elements fail to have their attributes updated when dropped into RHS

Offen
vor 8 Jahren geöffnet von claudio · 1 Kommentare
claudio kommentierte vor 8 Jahren

While editing a transformation rule, if a single node is moved into the LHS or RHS, its attributes are updated to contain the default text (result=True, or result=getAttr()), respectively.

This behavior is nice. But it is not consistently implemented.

For example, if I drag two connected nodes to the RHS, the attributes are not updated.

To see why failing to updated the attributes of groups of elements is a terrible thing, consider that the experienced user in creating model transformations (such as myself :p) will first create the match pattern, then duplicate it, drag it to the RHS, and add the remaining changes.

Furthermore, if I create a single link that has attributes, the attributes of the link are not updated at all.

This behavior results in very hard to debug transformations, because the matching rules will fail if the attributes of the elements do not have the code result=True.

If this is hard to implement, then it is better that attributes are not updated at all, since at least the behavior is consistent, and the user can get used to checking that attributes are set correctly. That is basically what I am doing anyway.

Another possible way of mitigating this is to make debugging easier, by issuing a warning whenever motif processes an element which has the default attributes. This should indicate that the user forgot to update those attributes to the correct value.

While editing a transformation rule, if a single node is moved into the LHS or RHS, its attributes are updated to contain the default text (`result=True`, or `result=getAttr()`), respectively. This behavior is nice. But it is not consistently implemented. For example, if I drag two connected nodes to the RHS, the attributes are not updated. To see why failing to updated the attributes of groups of elements is a terrible thing, consider that the experienced user in creating model transformations (such as myself :p) will first create the match pattern, then duplicate it, drag it to the RHS, and add the remaining changes. Furthermore, if I create a single link that has attributes, the attributes of the link are not updated at all. This behavior results in very hard to debug transformations, because the matching rules will fail if the attributes of the elements do not have the code `result=True`. If this is hard to implement, then it is better that attributes are not updated at all, since at least the behavior is consistent, and the user can get used to checking that attributes are set correctly. That is basically what I am doing anyway. Another possible way of mitigating this is to make debugging easier, by issuing a warning whenever motif processes an element which has the default attributes. This should indicate that the user forgot to update those attributes to the correct value.
simon kommentierte vor 8 Jahren
Besitzer

You have write access.

You have write access.
simon hat dieses Issue vor 6 Jahren aus einem Commit referenziert
Anmelden, um an der Diskussion teilzunehmen.
Kein Meilenstein
Niemand zuständig
2 Beteiligte
Laden…
Abbrechen
Speichern
Hier gibt es bis jetzt noch keinen Inhalt.