![]() |
![]() |
![]() |
![]() |
![]() |
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.
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.
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).
Edit > Insert After
Similar to Add but the new table (or object in a table) is inserted after a selected table (or selected object).
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:
- Test Suite Parameters, Test Suite Constants, Test Suite Variables and Test Case Variables may be pasted into each other.
- TTCN ASP, PDU, Structured Type and CM Definitions may be pasted into each other and into TTCN ASP, PDU, Structured Type and CM Constraints (and vice versa).
- ASN.1 ASP, PDU, Structured Type and CM Definitions may be pasted into each other and into ASN.1 ASP, PDU, Structured Type and CM Constraints (and vice versa).
- Test Case, Test Step and Default Behaviours may be pasted into each other.
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.
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.
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:
- <Down Arrow> moves the input focus to the next item. This movement is not sensitive to the structure of a Browser.
- <Shift+Down Arrow> moves the input focus to the next item at the same level of indentation.
- <Up Arrow> moves the input focus to the previous item. This movement is not sensitive to the structure of a Browser.
- <Shift+Up Arrow> moves the input focus to the previous item at the same level of indentation.
- <Left Arrow> moves the input focus to the previous level of indentation.
- <Shift+Left Arrow> moves the input focus to the previous level of indentation and collapses that branch in a Browser.
- <Right> moves the input focus to the first item at the next level of indentation. If the next level is collapsed then it is automatically expanded.
- <Shift+Right Arrow> moves the input focus to the last item at the next level of indentation. If the next level is collapsed then it is automatically expanded.
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.
- <Copy> or <L6> on a Sun keyboard copies selected text.
- <Cut> or <L10> on a Sun keyboard cuts selected text. <Ctrl+k> cuts text from the current position to the end of the line.
- <Paste> or <L8> on a Sun keyboard pastes text that is stored in the paste buffer. <Ctrl+y> pastes the most recently cut line at the current position.
- <Delete> or <Backspace> deletes one character to the left of the insertion point. <Ctrl+d> deletes one character to the right of the insertion point.
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 |
![]() |
![]() |
![]() |
![]() |