IBM
Contents Index Previous Next



Finding and Sorting Tables


As an alternative to the Browser, you can use the Finder for displaying TTCN tables in a list, without the ordering restrictions imposed by the TTCN tree structure.

You can search for and display tables in the Finder. The search may for example be based on name, type and content. You can use the entire TTCN document, entire TTCN Suite system, tables selected in TTCN Browser or the Finder Results List as search source, and extend, replace or restrict the number of tables displayed in Finder Results List in any number of steps.

Another way of searching is relationally. This means that you search for tables that reference or are referenced by tables selected in the Finder Results List or in TTCN Browser. The relational search cannot be combined with the ordinary.

The tables that will be displayed in Finder Results List after a search, can be sorted by a number of criteria:

Reversed sorting is also possible.

In addition, it is possible to for example open, analyze, copy, rename, export to MP file and delete tables from the Finder Results List, but not cut, paste and insert since that require a tree context.

Searching and Replacing

The Search and Replace tool exists in the upper part of the Table Editor, see "Editing Tables" on page 1266 in chapter 30, Editing TTCN Documents (in Windows). Its settings and functionality is absolutely the same as on UNIX, see "Searching and Replacing" on page 1180 in chapter 25, The TTCN Table Editor (on UNIX) for information on the TTCN Table Editor on UNIX. The difference is only that there are buttons instead of Search Menu items.

Opening the Finder

To open the Finder:

  • Select Open Finder from the View menu.
    • The shortcut is <Ctrl+F>

Figure 226 : The Finder

The Finder consists of four areas:

About Search Criteria

Search criteria are used for restricting a search. This means that if you do not specify any search criteria - all fields are empty and no buttons are clicked - before you click the Find button, all dynamic TTCN tables of the test system component will be displayed.

Consequently, if you specify one or more search criteria, TTCN tables that match at least one of the criteria, will be displayed in the Finder. Additionally, this means that specifying all possible search criteria has the same effect as specifying none. This is merely as a convenience for quickly adding all tables of the test system component, as the closed search criteria is not meaningful.

Note:

The search criteria are used for an OR-style search.

Finding Tables

Figure 227 : The Find tab in the Finder

To search for tables:

  1. Select the Find tab.
  2. Select Document, System, Results List or Browser Selection in the Search in area to search for tables in:
    • If you select Document, the search area will be the entire TTCN document.
    • If you select System, the search area will be the entire TTCN system.
    • If you select Results List, the search criteria will be used to restrict the set of TTCN tables already present in the Results List.
    • If you select Browser Selection, the search area will be the tables selected in the TTCN Browser.
  3. Select Extend or Replace in the Find mode area to choose should Results List keep previously found tables or not.
  4. Optionally, select one or several table types in the Of type list. No table types selected means that any table type appropriate.
    This list contains all existing TTCN and ASN.1 table types supported.
  5. Click a Search mode radio button.
    This selection affects the text you type in the Name and Contains fields. If you are not going to use those fields in the search, the search mode does not affect the search at all.
    • Wildcard
      The Name and Contains fields can contain wildcards. This means that "a*body" will match "anybody" and "antibody", while "a??body" only will match "anybody".
    • Regular expression
      The Name and Contains fields contain regular expression, with its more advanced syntax and matching possibilities. This means that "any[bt]" will match "anybody" and "anything" but not "anyone".
    • Literal
      The Name and Contains fields contain the exact text. This means that "any?" only will match "any?".
  6. Optionally, type some text in the Name field.
    The tables with names that match will be found.
  7. Optionally, type some text in the Contains field.
    The tables with contents that match will be found.
  8. Optionally, click one or several Status buttons to sort out tables of a different parse status.
    For example, if you select the error button, only tables with erroneous parse status will be found.
  9. Click Find.
    Tables that match at least one of the search criteria you have specified will be displayed in the Results List.

Finding Tables Relationally

Figure 228 : The Relational Find tab in the Finder

You can search for tables that are referenced by, and that reference tables, that are displayed and selected in the Results list or selected in TTCN Browser. It is required that the TTCN document is analyzed before start Relational Find. To do this:

  1. Select the Relational Find tab.
  2. Select one or several tables in the Results List.or in TTCN Browser and select one of the following radio buttons:
    • Results list
    • TTCN Browser
  3. Select one of the following radio buttons:
    • All nodes directly referenced by the selected node(s)
      Replaces the contents of the Results List with all nodes that are directly referenced by the tables currently selected in the list.
    • All nodes directly and indirectly referenced by the selected node(s)
      Same as above, but expands the search to include tables that are referenced by the referenced tables, and so forth.
    • All nodes that reference the selected node(s)
      Replaces the contents of the Results List with all nodes that reference the tables selected in the list.
  4. Select Document, System, Results List or Browser Selection in the Search in area to search for tables in:
    • If you select Document, the search area will be the entire TTCN document.
    • If you select System, the search area will be the entire TTCN system.
    • If you select Results List, the search criteria will be used to restrict the set of TTCN tables already present in the Results List.
    • If you select Browser Selection, the search area will be the tables selected in TTCN Browser.
  5. Select Extend or Replace in the Find mode area to choose should Results List keep previously found tables or not.
  6. Click Find.
    The Results List will be updated in accordance with your settings.

Results List operations

The Results List contains a subset of all dynamic TTCN tables in the TTCN system. You can perform most standard operation (copy, delete, rename, open in Table Editor, export to MP, Analyze, etc) on the tables. However, it is not possible to cut, paste or insert tables, since this requires the structural context of the Browser.

Caution!

Even if the elements of the Results List are presented without structural ordering, they still follow the TTCN hierarchy. This means that if you delete a group node, the group and its entire sub tree will be removed.

Sorting the Results List

The contents of the Results List can be sorted if you click on the header of the information column. The available information is:

Click a second time on the header to sort the list in reverse order.

Clearing the Results List

Click Clear to clear the contents of the Results List.

When it is necessary to remove some individual tables from Results List, select them, right-click and choose Remove from Results List menu item.

Export to MP file

Tables from Results List may be exported to an MP file. To do this select Tables, right-click and choose Export.

How to isolate a single Test Case

A single Test Case may be isolated from a Test Suite together with all its dependent tables using the Finder.

To do this do the following:

In the case where you have a Modular Test Suite, the tables that belong to different modules will be exported to different files. Therefore the prompt to give new filenames will appear for each one of the exported tables. As a result the exported Test Suite will also be Modular and the original structure will be kept. If it is necessary to convert it into a non-modular Test Suite, use the Generate Flat View option from the Analyze TTCN dialog, see "Analyze TTCN" on page 118 in chapter 2, The Organizer.


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