Delete message view when operation deleted

Issue #143 resolved
Matthias Schoettle created an issue

When an operation is deleted, corresponding message view (if it exists) should be deleted as well. Otherwise there will be dangling references.

Comments (7)

  1. Matthias Schoettle reporter

    References issue #143: Added deletion of message view (if it exists) to removal of operation.

    When removing the message view, the scene doesn't (try to) remove the view, because it might not have been opened yet.

    One issue remains. When undoing the removal and the message view is added again: The scene switches to the message view, even though this is probably not wanted by the user. We need to find a way to prevent doing this in this case.

    → <<cset a00236e46a4c>>

  2. Omar Alam

    The message view layout does not get deleted when deleting its operation. Therefore, the tool gives an exception when saving the model (it says: message view is not contained).

  3. Matthias Schoettle reporter

    One issue remains. When undoing the removal and the message view is added again: The scene switches to the message view, even though this is probably not wanted by the user. We need to find a way to prevent doing this in this case.

    I think there should be no regular reaction to adding a new message view. Instead, the handler (that requests the creation of a message view) listens to model changes and then acts to display it. This is also done, for example, in StructuralViewHandler.createNewClass(...).

  4. Matthias Schoettle reporter

    Resolved issue #143: The remaining problem is resolved by having the handler listen to model changes and once the message view was added it is displayed. That way, when the message view is deleted and undo is performed, the message view will not be automatically displayed.

    → <<cset 90399fe8c0a7>>

  5. Log in to comment