IBM
Contents Index Previous Next



Editing Tables


The Table Editor is used for editing various TTCN tables. It displays the tables in three different parts: the header, the body and the footer. Also, in the upper part, it displays the Search and Replace tool. Each part, as well as many fields, can be resized.The Table Editor is used for editing various TTCN tables. It displays the tables in three different parts: the header, the body and the footer. Each part, as well as many fields, can be resized.

Figure 218 : A Table Editor for a test case

Resizing Cells and Table Parts

The three parts of a table - header, body and footer - are separated by horizontal bars, which you can drag to change the relative size and to hide parts of the table from view.

You can change the individual height of rows by dragging the leftmost row separator. In the body part, you may also change the individual width of columns by dragging the separators of the header fields.

Note that changing the column width may have effect on the row height, as the row will change to display all information it contains.

When the Search and Replace tool is closed this affects all Table Editors opened in TTCN Suite. To restore the view of Search and Replace tool press the expand button that appear in upper-right part of Table Editor instead of the Close Window button.

Renaming a Table

To change the name of a table, you can either rename its node in the Browser or edit the table name in the table itself.

Setting the Input Focus

To set the input focus in another part of a table, either:

To set the input focus within a part, either point and click or use the arrow keys. There are also some shortcuts:

To Move to: Use This Key Combination

Next field in same row

<Tab>

Previous field in same row

<Shift+Tab>

Last field in same column

<Ctrl+Down arrow>

First field in same column

<Ctrl+Up arrow>

First field

<Ctrl+Home>

Last field

<Ctrl+End>

Editing Text in a Table

When you have used the keyboard to move the input focus to a field, the contents of the field will be replaced with the new text when you start typing. To edit the existing text, you have to press <Home> or <End> first.

If you use the mouse to explicitly set the input focus in a field, you can start editing the existing text directly with the keyboard.

The table fields will expand automatically to accommodate the text. You can also add a line break in the text by using <Return>.

To cut, copy and paste text in the fields, you use the corresponding commands in the popup menu, the Edit menu or the standard Windows shortcuts. However, note that it is only possible to paste text into a table field when the field contains a text pointer.

Note:

The paste buffer for text is not the same as the one used for entire rows in the body of a table.

Auto completion of identifiers

When editing tables, it is possible to auto-complete identifier table names while editing text in the Table Editor.

Start to type any identifier (a table with this name should already exist in the test suite). Type one or more letters, then press <CTRL-space>. TTCN Suite will find the tables that match the text typed. If one match is found, the typed name will be completed with the found one. If several matches are found, a pop-up window with a list of names will be displayed. It is possible to select one by using keyboard ("Up", "Down" arrows for navigate, "Enter" to select, "ESC" for cancel) or mouse (double-click to select, click outside the window for cancel).

Editing Rows in the Body of a Table

You can add, delete, cut and copy rows in the body of all TTCN tables that contain more than one column. This is not possible in the headers and footers, since the formats of these parts of a table are defined by the TTCN standard.

The ASN.1 tables only have a single column with a single row and therefore adding, deleting, cutting and copying rows is not applicable. However, the contents of ASN.1 tables can still be copied, pasted, etc, as text.

Selecting and Deselecting Rows

Note:

Setting the input focus will also deselect all selected rows.

Cutting, Copying and Pasting Rows

Rows in the body of a table may be cut, copied and pasted. Copy and Paste work across all the different tables although the Paste command is mainly intended for use among tables of the same or similar types.

To cut selected row or rows from the table:

  • Select Edit > Cut.
    • The shortcut is <Ctrl+X>.

To copy selected row or rows:

  • Select Edit > Copy.
    • The shortcut is <Ctrl+C>.

To paste a row or rows:

  • Select Edit > Paste.
    • The shortcut is <Ctrl+V>.

To paste a row or rows before the current row:

It is possible to paste a row when a body row or field is selected.

Note:

The paste buffer for entire rows in the body of a table, is not the same as the one used for text.

Deleting rows

To delete the selected row or rows, select Delete from the Edit menu.

Inserting Rows

To insert a new row before a selected row:

  • Select Insert New Row Before from the Edit menu.
    Only one row may be selected. If no row is selected, the new row will be created first in the table.
    • The shortcut is <Ctrl+Ins>.

To insert a new row after a selected row:

  • Select Insert New Row After from the Edit menu.
    Only one row may be selected. If no row is selected, the new row will be created last in the table.
    • The shortcut is <Ins>.

To insert a new tree header row before a selected row:

To insert a new tree header row after a selected row:

You may also use <Ins> to insert rows. Where the row will be inserted depends on the input focus:

Indenting Behaviour Lines

The indention of behaviour lines can be increased and decreased:

To increase the indentation of a row in focus, or selected rows, by one position:

  • Select Increase Indention Level from the Edit menu.

To decrease the indentation of row in focus, or the selected rows, by one position:

  • Select Decrease Indention Level from the Edit menu.

Browsing in the Table Editor

If you right-click a table field containing an identifier, you may open the table representing the identifier from the pop-up menu:

The Table Editor maintains a history of tables displayed with Open <Identifier> described above. This is similar to going back and forward in a web browser:

To go forward in the history of the Table Editor:

  • Select Go Forward from the popup menu or the View menu.

To go back in the history of the Table Editor:

  • Select Go Back from the popup menu or the View menu.

Editing Text with an External Editor

You may use any external text editor for editing text in TTCN Tables. The editor must have the possibility to read and save files in ASCII format (text only, without any formatting).

Specify the external editor executable in the TTCN Suite Options dialog (Menu > Settings > Options...). Right-click in any cell of TTCN Table, with no text selected in the cell, and point to the item External Editor in the shortcut menu. to start the editor which you specified. After you have edit the text, save and close the editor. This will import the modified text to the cell of TTCN Table. While the external editor is open no other operations in the TTCN Suite are available. The external editor must be closed before you continue.


http://www.ibm.com/rational
Contents Index Previous Next