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

Atvērta
claudio atvēra 8 gadi atpakaļ · 1 komentāri

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 komentēja 8 gadi atpakaļ
Īpašnieks

You have write access.

You have write access.
Pierakstieties, lai pievienotos šai sarunai.
Nav atskaites punktu
Nav atbildīgā
2 dalībnieki
Notiek ielāde...
Atcelt
Saglabāt
Vēl nav satura.