Improve TransitionView and handling of signature and guard
Issue #219
new
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 inTransitionView
, that needs to be removed) - then, the question is how to edit both in one view
- then, the item provider needs to use an additional
- or: use two
TextView
s, 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
- to get the textual representation of a transition
- 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)
-
reporter - Log in to comment
Actually, I am not sure why
Constraint
is a separate class that contains theValueSpecification
. I think it is easier to haveTransition
contain theValueSpecification
and name the referenceconstraint
(orguard
).