Tutorial

This is the tutorial for creating a sequence diagram. The video is a screen capture at the time of the operation. The input keys are displayed at the same time in the video. For understanding behavior easily, you might like to read the description with checking the video.

Creating a lifeline and a message

You will learn a basic of how to create a lifeline and message.

Creating a lifeline

  1. Press i at any empty cell

    The rectangle representing a class / object and the lifeline of the five lines beneath it are created.

  2. Press i at the same cell.

    The mode switches to the INSERT MODE. If you select the rectangle representing a class / object and press i, the mode switches to the {i%mode INSERT MODE %} for editing the text.

  3. Input the name of the class “ClassA”.

    “ClassA” is entered in the rectangle which was just added.

  4. Press <ESC>.

    When you are finished editing, switch the mode to the CELL MODE with pressing <ESC>.

  5. Press ll to move the active cell to right two cells.

    l is a key to move to the right. Gridraw is made in reference to the key bindings of vi / vim. Thus, it is possible to move the active cell and cursor with h, j, k and l, same as vi / vim. The arrow keys (, , and ) and a mouse click are also possible to do this operations.

  6. Press ii.

    This is done quickly the above steps of 1 and 2. In the other word, this is the creating a lifeline and the switching the mode to the INSERT MODE to input its class name.

  7. Input the name of the class “ClassB”.

    Input the name of the class.

  8. Press <ESC>.

    When you finished the editing, switch the mode to the CELL MODE with pressing <ESC>.

Creating a execution specification

  1. Press j to move the active cell to down one line.

  2. Press i to create an execution specification.

    Execution specification is sometimes referred to as an “activation line” or “execution occurrences”. In any case, it is the rectangle placed on the dotted line of the lifeline.

    Press i on the lifeline, you can start the creation of the execution specification. If you can not start the creation of the execution specification, make sure that the mode is Horizontal mode in the CELL MODE. When the horizontal lines of the grid are highlighted, it is the Horizontal mode.

    orig/cell-mode-horz.png

    The CELL MODE has Vertical mode and Horizontal mode and each behaviors are different. More information refer to here.

    The i key’s behavior will be changed depending on the object in the cell and the V / H mode. However, the key do the operation which is recalled the “insertion”

    Now, the mode switched to the RANGE MODE. This mode is used to specify a range. Move the active cell, and fix the range with press <Enter>.

    These operations are described in the next procedures.

  3. Press jjj to stretch the execution specification to down 3 lines.

  4. Press <Enter> to fix the execution specification.

    The mode returns to the CELL MODE after the fixing it.

  5. Create the execution specification for the ClassA same as the ClassB. (ijjj<Enter>)

Creating a message

  1. Press <Space> to switch to the Vertical mode.

    It starts the editing of the message. You might like to remember that to edit a lifeline is Horizontal mode and to edit a message is Vertical mode.

  2. Press i on the lifieline (or execution specification) of ClassA.

    It starts the creating a message. As described above, i act various operations depends on the cell position and now mode. In this case, i acted as the creating a message, because the cell position is on the lifeline and the mode is the Vertical mode.

    It is important so we describe again, you should remember that to edit a lifeline is Horizontal mode and to edit a message is Vertical mode.

    Now, the mode switches to the RANGE MODE.

    Please recall the procedure that created the lifeline.

    In the next procedures fix the range with moving the active cell like the procedures of the lifeline.

  3. Press ll to stretch the message to right two columns.

  4. Press <Enter> to fix the message.

    It was able to create a message. The mode returns to the CELL MODE after fixing it.

  5. Press i on the lifeline (or execution specification) of ClassB.

    Next, let’s create a response message from ClassB. It is similar to the creation of the message from ClassA basically.

  6. Press hh to stretch the message to left two columns.

  7. Press k to change the message type to the response message.

    Selecting the type of a message is realized with moving to up and down. Even if the cell range was expanded to up and down, the message does not move to up and down. The type of message will change instead. The change is rotated in the order of a response message, asynchronous message, and synchronous message.

  8. Press <Enter> to fix the message.

    The mode returns to CELL MODE after fixing it.

Creating a message label.

  1. Press i on the message line.

    It insert the label on the message line. This is also one of the various operations of i. You can edit the label with pressing i on the message line. (INSERT MODE)

  2. Input “function()” which is the label name of the message.

    The cell width is adjusted automatically.

  3. Press <ESC>.

    The mode switches to the CELL MODE.

  4. Press i on the response message line.

    The mode switches to the INSERT MODE to append the label to the response message line.

  5. Input “true” which is the label name of the response message.

  6. Press <ESC>.

    The mode switches to the CELL MODE.

At this point, you will be able to create a lifeline and a message. After this, let’s learn the cells operations to insert and remove a row / column, the copy and paste and convenient editing functions.