Improve TransitionView and handling of signature and guard

Issue #219 new
Matthias Schoettle created an issue

Currently, the TransitionView contains a name field, which displays the name of a transition (from the model). However, the name is basically a concatenation of signature and guard. I.e., it is possible to tap-and-hold on the name and write text (<operation name>/<guard>), which even allows to change the signature. There are more problems related to the handling.

I propose the following (including fixes of current problems):

  • Transition.name should be removed from the metamodel
  • either
    • to get the textual representation of a transition TransitionItemProvider.getText(...) should be defined to concatenate the operation signature and guard
      • then, the item provider needs to use an additional ChangeNotifier to listen to the signature to get updates when the operation changes (instead of doing this manually in TransitionView, that needs to be removed)
      • then, the question is how to edit both in one view
    • or: use two TextViews, one for the signature and one for the guard (which is optional)
      • then, probably the view for the signature will automatically register on the signature to get updates for that as well
  • use of commands when the guard is modified (currently, the signature and guard can be changed at the same time but it is not done using commands)
  • currently, the guard's specification is created every time the guard is modified

Comments (1)

  1. Matthias Schoettle reporter

    Actually, I am not sure why Constraint is a separate class that contains the ValueSpecification. I think it is easier to have Transition contain the ValueSpecification and name the reference constraint (or guard).

  2. Log in to comment