Message View: create method

Issue #192 resolved
Omar Alam created an issue

When introducing a new message inside a create method, it shows up after the return of the create method.

Comments (7)

  1. Matthias Schoettle
    • changed status to open

    This only happens when creating a message view for a constructor/create method, because the assumption is that there is always one event, which is not the case for create messages (at least in the view).

  2. Matthias Schoettle

    It actually also happens when creating a create message above existing messages, because the check in LifelineView additionally checks whether the index (where to add the event) is greater than the current child count.

  3. Matthias Schoettle

    References issue #192: When finding the initial message and the previous fragment is the receive event of a create message, no initial message is found. In case no initial message is found, fall back to the message of the previous fragment.

    refs #148

    → <<cset 5cf9e5167ccc>>

  4. Matthias Schoettle

    Resolved issue #192: Revert change from commit 000c1c7 (refs #131): Always decrease the view index by 2 if the lifeline starts with a create message. Otherwise wrong behaviour is observed whenever additional messages are added between existing messages (then the view index will not exceed the child count). Also, when the behaviour of a create message (constructor) is defined and the user tries to create the first message in the behaviour, this won't happen (since there is a reply message).

    → <<cset a0afe24af810>>

  5. Matthias Schoettle

    References #148: Fixes finding the previous fragment. In certain cases the wrong initial message is found, because the previous fragment is a receive event. Therefore, a previous fragment on the same lifeline is searched, which will lead to the correct initial message.

    This allows the fix from commit 5cf9e51 to be reverted (refs #192).

    → <<cset 5b8079e9fc30>>

  6. Log in to comment