IBM
Contents Index Previous Next



Editing the TTCN Document Structure


The TTCN Suite displays all the components of a TTCN document in the structured format of the Browser. Part of this structure is static and common to every TTCN document. This static structure is automatically generated when the TTCN document is first created.

To build an individual TTCN document, named tables (such as PDUs, Constraints and Behaviours) and named objects to the multi-object tables (such as Test Case Variables, PCOs and Timers) must be added to this static structure.

The Edit menu is used to add, delete, copy, cut, paste etc. editable items (i.e. groups, tables or objects in a multiple object table) in a Browser.

Adding and Inserting Items

Edit > Add

Adds a new table to the Browser or adds an object to a table in the Browser.

In the case of single-object tables, select the Browser item that "holds" the table. Choosing Add will add a new table to the end of the list of tables. The new table will be unnamed. Use the Rename command to give the table its correct name, or open the table and edit the name there.

Example 189

To add a new TTCN PDU to a Browser, select the item TTCN PDU Type Definitions and apply Add.

In the case of multiple-object tables, select the item that is the name of the table. Choosing Add will add a new object to the end of the list of objects in this table. The new object will be unnamed. Use the Rename command to give the table its correct name, or open the table and edit the name there.

Example 190

To add a new Test Case Variable to a Browser, select the item Test Case Variables item and apply Add.

Edit > Insert Before

Similar to Add but the new table (or object in a table) is inserted before a selected table (or selected object).

Note:

Only a single item should be selected.

Edit > Insert After

Similar to Add but the new table (or object in a table) is inserted after a selected table (or selected object).

Note:

Only a single item should be selected.

Adding and Inserting Groups

The following commands are used to add/insert new groups to the Test Case, Test Step and Default libraries.

Edit > Add Group

Adds a new Test (Case) Group, a new Test Step Group, a new Default Group in the Dynamic Part, or a new Group in Constraints Part. The new group is added at the next level after the selected group.

Use the Rename command to edit the temporary name NoName. Note that the trailing slash (/) is automatically added.

To add a table to a group, select the group and use the Add command.

Edit > Insert Group Before

Inserts a new group before a selected item.

Edit > Insert Group After

Inserts a new group after a selected item.

Adding and Inserting Compact Tables

It is possible to specify that all the Test Cases in a given group are displayed in the compact format (see Annex C, clause C.3 of ISO/IEC 9646-3). The following commands allow the insertion of compact groups in the test suite hierarchy:

Edit > Add Compact Group

Adds a compact group at the next level after the selected group.

Edit > Insert Compact Group Before

Inserts a compact group before a selected item.

Edit > Insert Compact Group After

Inserts a compact group after a selected item.

Sorting Items

The Sort command is applicable for any node that has dynamic subnodes.

Edit > Sort

The command sorts the sub-nodes in alphabetical order.

Cutting, Copying and Pasting Items

Editable items may be cut or copied to the clipboard. The contents of the clipboard may be pasted according to compatible classes, for example:

However, it is not possible to paste a Constraint for example as a Test Case Behaviour.

The Paste command is not available if the clipboard contains an object of an incompatible type to the selected object.

Note:

On the table row and text levels, no paste restrictions apply.

Edit > Cut

Deletes the selected items from the Browser and stores them in the clipboard.

Edit > Copy

Copies selected items from the Browser to the clipboard.

Edit > Paste Before

Pastes the contents of the clipboard before a selected item.

Edit > Paste After

Pastes the contents of the clipboard after a selected item.

Edit > Paste In

Pastes the contents of the clipboard to the end of a list of tables (or list of objects in a multi-object table).

Deleting Items

Editable items may be removed from the Browser.

Edit > Delete

Deletes selected items from the Browser.

Caution!

The TTCN Suite has no undo so this command is irreversible.

Browser Shortcut Keys for Navigation

The cursor and mouse may be used to set the input focus on an item in a Browser. However, you may find the following shortcut keys more useful:

Renaming Dynamic Items

The Rename command is used to give names to newly created Browser items that have the temporary name NoName or to rename existing Browser items. It is available in the popup menu for the item.

Rename

Renames the dynamic item. A text box with a cursor appears for the item. Type the new name and then press <Return>. It is also possible to copy, cut, paste and delete text.

Note:

The TTCN Suite has no undo function. This means that <Undo> has no effect.

A shortcut for Rename is to type <r> without invoking the pop-up menu. The item with the input focus will then be renamed.


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