When defining static method, reference of initial lifeline must be static

Issue #422 resolved
Matthias Schoettle created an issue

When defining the message view of a static method, the Reference that is created as the represents for the initial/target lifeline is not static.

This leads to the ability of calling non-static methods. For the definition of constructors this is fine, however.

Comments (5)

  1. Matthias Schoettle reporter

    If this is fixed, I believe the visualization of the initial arrow is screwed up. Probably, because the height (y position) is different. When dragging the lifeline it shows up properly.

  2. Matthias Schoettle reporter

    References #422: Fixes the creation of the initial interaction.

    Sets the target lifeline as static if the operation that is defined is static in order to be able to properly call operations (that are static) on that lifeline.

    → <<cset cc3e3cdbe6fc>>

  3. Matthias Schoettle reporter

    References #422: Fixes the positioning of the lifelines.

    Due to the updating of lines, for some reason the receive event of the initial message (for a static operation) on the metaclass lifeline is "positioned" (internally) wrong.

    Therefore, setting the y position several times is avoided. Also makes sure that x and y are treated separatly in case only one of them is unset.

    → <<cset 329056ad5151>>

  4. Matthias Schoettle reporter

    References #422: Adds check to allow constructor calls only on empty lifelines.

    For metaclass lifelines (represented by a static reference), constructors need to be filtered out. In general, constructors should only be allowed if there is no other fragment on the lifeline. I.e., it can only be the first message on a lifeline.

    → <<cset 101958b22101>>

  5. Log in to comment