Message expansion

Issue #482 resolved
Emmanuel Ng Cheng Hin created an issue

In the message view, the user should have an option to expand a message to see and edit its internal behavior.

For instance, if a user creates a message to a method foo in the message view of bar, he/she should be able to display the message view of foo and edit it directly from the message view of bar. Visually, the internal behavior will appear like nested behavior, except that all the changes will be directly reflected in the message view of foo.

Finally, the user will also be able to collapse a message if he/she does not want to see the internal behavior of a specific message.

Comments (169)

  1. Emmanuel Ng Cheng Hin reporter

    References #482: Adds a method to get the fragments on a lifeline for a given container. Fixes the viewIndex for updated fragments.

    → <<cset f95f8a409d9e>>

  2. Matthias Schoettle

    References #482: Ensures layouting is performed only after expand/collapse and removes special cases from LifelineView, which are not required anymore.

    → <<cset 6d85405cbbf0>>

  3. Matthias Schoettle

    References #482: Fixes issue when expanding more than one message going to the same lifeline.

    The detected lifeline in getVisualizedFragments needs to be from the same message view.

    → <<cset fb70a27f807a>>

  4. Matthias Schoettle

    References #482: Adds special case for operands where the last component is the event container of an expanded message.

    Uses the last spacer of that event container instead.

    → <<cset d600b7e08a2c>>

  5. Matthias Schoettle

    References #482: Moves auto-collapsing into removeMessageView method.

    This ensures auto-collapsing is performed in all cases where a message view might be removed (message deletion, operand/combined fragment deletion).

    Improves collapseMessage method by using findNodeWithMessage instead. When an expanded message is removed, it is not contained anymore, so the containing interaction cannot be found.

    → <<cset 01441dde43b8>>

  6. Emmanuel Ng Cheng Hin reporter

    References #482: Moves the call to removeMessageView to the collapse method

    This commit fixes the bugs in the 'delete keep content' and 'move'actions introduced in the two last commits.

    → <<cset c357810a46ce>>

  7. Emmanuel Ng Cheng Hin reporter

    References #482: Adds a layout element for expanded lifelines that do not belong to the initial interaction and are added through a notification

    → <<cset 89ca9de0b4df>>

  8. Emmanuel Ng Cheng Hin reporter

    References #482: Adds an "auto-collapse" feature that automatically collapses all the messages with the same signature when a message is expanded.

    → <<cset 23cdacdaa5cf>>

  9. Emmanuel Ng Cheng Hin reporter

    References #482: Simplifies the viewIndex calculation in order to support two event containers on the same life line.

    The previous commit was complicated and did not really fix the problem. This one provides a simpler solution.

    → <<cset d4e2589bbc4e>>

  10. Emmanuel Ng Cheng Hin reporter

    References #482: Removes the addEventContainer and removeEventContainer methods

    The expanded messages are not contained in EventContainers anymore. Instead, they are all added to the baseEventContainer of the lifeline view.

    → <<cset ec7aaddd3116>>

  11. Emmanuel Ng Cheng Hin reporter

    References #482: Simplifies the allow creation for interaction operands

    Modifies the isFirstCoveredLifeline method, removes the allowCreation parameter. Also fixes some warnings in MessageViewView.

    → <<cset 89b9acaffa88>>

  12. Emmanuel Ng Cheng Hin reporter

    References #482: Removes an unnecessary call to unregister

    Removes the call to unregister for the Aspect in MessageViewView.collapse()

    → <<cset e6e78f2a00de>>

  13. Emmanuel Ng Cheng Hin reporter

    References #482: Fixes the connected gates position

    Uses the getCenterPoint method to position the connected gates to the life line.

    → <<cset 30b89f295c5d>>

  14. Emmanuel Ng Cheng Hin reporter

    References #482: Removes the event containers for the expanded messages

    The expanded messages are not contained in their own event containers anymore. Instead, they are added to the base container.

    → <<cset 66762411bc78>>

  15. Emmanuel Ng Cheng Hin reporter

    References #482: Modifies the way lifeline views are mapped in MessageViewView

    Lifeline views are now mapped to the typed element they represent. There are still some issues with the view index in some cases. It seems to be an issue with the getVisualizedFragments method which does not includes the expanded fragments

    → <<cset 69840026fbc5>>

  16. Emmanuel Ng Cheng Hin reporter

    References #482: Modifies the getVisualizedFragments method

    This method now uses a list of represented life lines to find the list of represented fragments. This commit also adds the target lifeline to the represented lifelines in setupExpand and modifies the removeLifeline method.

    → <<cset 00cc0d433787>>

  17. Emmanuel Ng Cheng Hin reporter

    References #482: Removes life line mappings in composite interaction

    All the mappings are now handled directly by the life line view itself. This change also affect the life line view highlighting, which was changed accordingly.

    → <<cset 7ab13da5e037>>

  18. Emmanuel Ng Cheng Hin reporter

    References #482: Fixes collapse method

    In the previous commit the used key was not right. Also the mapping between the life line view and its typed element was not removed.

    → <<cset aa4e45f63ac1>>

  19. Emmanuel Ng Cheng Hin reporter

    References #482: Modifies the removeRepresenting lifeline method

    In the case where the life line is deleted, the life line container can be null. This commit allows to handle this case correctly

    → <<cset 523ec9323c90>>

  20. Emmanuel Ng Cheng Hin reporter

    References #482: Improves life line highlighting

    Now uses the getFragmentContainerAt method for the start position to check if message creation is allowed between two life line views. This results in a more robust life line highlighting.

    → <<cset fb46ea9537f2>>

  21. Emmanuel Ng Cheng Hin reporter

    References #482: Fixes a key error in notifyChanged

    In the previous commits I forgot to use the represents attribute of the lifeline for the layout notifications. This was causing a crash when a new life line was created.

    → <<cset b66c066ce426>>

  22. Emmanuel Ng Cheng Hin reporter

    References #482: Resizes the last spacer in layoutFragments

    When two messages were expanded on the same life line, and the lowest one was collapsed, the last spacer on the life line was over sized. This commit fixes this issue.

    → <<cset da862890526f>>

  23. Emmanuel Ng Cheng Hin reporter

    References #482: Fixes message expansion within an operand

    The error was simply that the found container was not correct in getNumberOfFragmentsBefore. If a message is expanded in an operand, this operand must be found instead of the outer interaction. This commit fixes this.

    → <<cset b302037abdfd>>

  24. Emmanuel Ng Cheng Hin reporter

    References #482: Fixes visualized fragments list in nested operands

    Adds a more general method called getActualRootContainer that returns the container in which the number of fragments before is computed. Also fixes a mistake in getVisualizedFragments(container)

    → <<cset b9433e48b5e6>>

  25. Emmanuel Ng Cheng Hin reporter

    References #482: Fixes the view index for create messages

    When a message was created within an expanded create message, the -2 was not applied, leading to a wrong view index. Also removes an unused part of the code in setOperandHeight.

    → <<cset 4d1010ddc85a>>

  26. Emmanuel Ng Cheng Hin reporter

    References #482: Fixes removeOperand

    Before this commit, the operand contents were not removed, since CompositeInteraction.findNodeWithContainer was returning null (the container of the operand was null), and therefore, CompositeInteraction.getVisualizedFragments was producing an empty list.

    → <<cset da8c460d57ba>>

  27. Emmanuel Ng Cheng Hin reporter

    References #482: Modifies the name field view of the life line views

    The life line views now use a RamRectangleComponent with on text view for the object name, one for the object type, and a RamTextComponent for the colon to represent their name fields.

    → <<cset 5ffbdf611bc3>>

  28. Emmanuel Ng Cheng Hin reporter

    References #482: Adds argument views

    Argument views are special text views that display the right placeholder and variable name in the current context.

    → <<cset b0e54b627720>>

  29. Emmanuel Ng Cheng Hin reporter

    References #482: Moves the call to refresh to a new updateTextView method

    This method is only called when the received notification actually modifies the TextView. It is overridden by the ArgumentView in oder to refresh the message only when it is needed.

    → <<cset 938f859bf784>>

  30. Emmanuel Ng Cheng Hin reporter

    References #482: Fixes the life line highlighting in operands

    There was a bug where some life lines were not highlighted although they were in theory accessible. This used to happen if a message was expanded in an operand. This was because the direct container was used instead of the actual one.

    → <<cset f1b98493ac2f>>

  31. Emmanuel Ng Cheng Hin reporter

    References #482: Fixes a mistake from previous commit

    Adds the case where the container is the parent container in isAccessibleFromContainer()

    → <<cset 4655f268b970>>

  32. Emmanuel Ng Cheng Hin reporter

    References #482: Adds handling for operand removal/addition

    Updates the expanded life line views when an operand is added or removed by the covering combined fragment.

    → <<cset 58c1bfbce667>>

  33. Emmanuel Ng Cheng Hin reporter

    References #482: Fixes an undo layout issue for combined fragments

    Before this commit deleting a combined fragment and clicking undo was causing some layout issues.

    → <<cset eba32dd73efc>>

  34. Emmanuel Ng Cheng Hin reporter

    References #482: Fixes the 'delete keep contents' functionality

    Messages are now automatically collapsed when this feature is used.

    → <<cset 8c638c2408cd>>

  35. Emmanuel Ng Cheng Hin reporter

    References #482: Puts back the condition in removeFragment.

    This is unfortunately needed, as it happens many times. The previous commit did not fix it for all cases.

    → <<cset 003afe926b26>>

  36. Matthias Schoettle

    References #482: Fixes small issues to prevent crashes.

    • fixes localSignature constraint to ensure the message signature (or its container) exists
    • prevents NPE when determining that a message can be expanded
    • fixes building of Lifeline name field

    → <<cset a6b1a51b2de0>>

  37. Log in to comment