Be sure to visit the Trace Modeler website for updates and UML sequence diagram resources!

Inline a message call

Inlining a message call is a refactoring that 'cuts out the middle man'.

To inline a message call

  1. Select the call you want to inline
  2. Open the message context menu
  3. Select the 'Inline call' menu item

When a message call X is inlined, any calls that were made by the receiver of X will now be made by X's sender and X itself will have been deleted. In effect, a responsibility is moved from receiver to sender.

For example, suppose we inline 'call to target 2' in the following diagram :

UML sequence diagram before the inline message call refactoring

The result is that 'call to target3' and 'call to target4' are now be made by target1 :

UML sequence diagram after the inline message call refactoring

Note that the inlined call itself is deleted from the diagram. You can always undo this change of course.

If you only want to inline a part of a message call, you'll have to split its activation first and then inline just the part you want.

Related topics