Changes between Initial Version and Version 1 of Documentation/T3D/Views


Ignore:
Timestamp:
06/03/10 15:59:46 (14 years ago)
Author:
zeiss
Comment:

Importing pages from "/var/lib/svn/trac/etsicheck2" using WikiImport plugin.

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/T3D/Views

    v1 v1  
     1== HTML Views == 
     2 
     3The generated HTML documentation currently includes three views: 
     4 * Main View 
     5 * Module Parameter/Testcase View 
     6 * Import View 
     7 
     8In addition, an XML file with an intermediate representation for low-level dependencies is generated, but no HTML view is available for it due to the fact that it represents more or less an abstracted and summarized version of the main view for special purposes. Some form of HTML presentation may become available in future releases. The low-level dependency representation will be discussed briefly in the respective section and in more detail in the technical documentation.  
     9 
     10=== Main View === 
     11 
     12The purpose of the main view is to provide a browseable representation of the source code, with a separate page for every every module and every construct defined within the processed files. Additionally, tagged paragraphs used for documentation are extracted and presented in a separate field. Whether the bodies of the separate constructs are included in the documentation and if so whether it is displayed by default is controlled by the configuration options in the profile. With the help of the presentation options in this view, functionalities to expand and collapse the bodies of constructs can be enabled and used. The source code presentation is formatted using the default settings of the code formatter. The settings may be made available in the configuration profile for better customization in future releases. For convenience, TTCN-3 keywords are highlighted. 
     13 
     14'''Example:''' 
     15 
     16''Source code:'' 
     17{{{ 
     18/* 
     19 * @desc this is an example module 
     20 * @version 0.1 
     21*/ 
     22module ExampleModule{ 
     23        function examplefunction() runs on exampleComponent{p1.send(integer:1);examplefunction2()} 
     24        function examplefunction2() runs on exampleComponent{} 
     25} 
     26}}} 
     27''HTML:'' 
     28{{{ 
     29#!html 
     30<div style="padding-left:20px;"> 
     31<img src="http://www.trex.informatik.uni-goettingen.de/etsicheck2/raw-attachment/wiki/Documentation/T3D/T3D_HTML_Ex1.png"/> 
     32</div> 
     33}}} 
     34 
     35Hiding the construct bodies from the presentation options or excluding them during the documentation generation will result in: 
     36 
     37{{{ 
     38#!html 
     39<div style="padding-left:20px;"> 
     40<img src="http://www.trex.informatik.uni-goettingen.de/etsicheck2/raw-attachment/wiki/Documentation/T3D/T3D_HTML_Ex2.png"/> 
     41</div> 
     42}}} 
     43 
     44In addition, controls for hiding individual construct bodies can be shown via the presentation options, so that only particular construct bodies are shown / hidden: 
     45 
     46{{{ 
     47#!html 
     48<div style="padding-left:20px;"> 
     49<img src="http://www.trex.informatik.uni-goettingen.de/etsicheck2/raw-attachment/wiki/Documentation/T3D/T3D_HTML_Ex8.png"/> 
     50</div> 
     51}}} 
     52 
     53=== Module Parameter / Testcase View === 
     54 
     55The module parameter / testcase view serves a summary of the module parameters related to a particular test case. This works both ways in that it can serve as a summary of the test cases influenced by a particular module parameter. At the index level it lists all the test cases and all the module parameters with their respective relations in a tabular format. Both the list of test cases and the list of module parameters can be shown or hidden using the toggle controls. Also, by clicking on the respective ''Testcases'' or ''Module Parameters'' headlines, the user can quickly jump to the respective section, given that it is present and shown. With the help of the presentation controls, the paths to the actual reference to the module parameter can be shown or hidden for more compact presentation. The paths can be useful when indirect references to the module parameters are used (e.g. references within functions or altsteps referenced in the test case). The construct index in this view shows only the relevant types of constructs - test cases, module parameters and groups. Upon selecting a module, only the test cases and module parameters defined within the selected module will be displayed, both in the module parameter view and in the construct index. Another thing worth mentioning is that upon selecting a test case or a module parameter, the entries in the construct view are also filtered to include only the constructs defined within the module in which the selected construct is defined. Upon selecting a group, aditional filtering is applied, limiting the constructs shown in the construct index to the constructs defined within the selected group. 
     56 
     57In the tabular representation, selecting an item in the left column will show the corresponding page for the selected item in the module parameter / testcase view, whereas selecting an item in the right colum (the path to the reference) will show its page in the main view.  
     58 
     59'''Example''' 
     60{{{ 
     61// ... 
     62modulepar integer par1 := 1; 
     63 
     64function function1() runs on sampleComponent1 { 
     65    //...  
     66        p1.send ( par1 ); 
     67    p2.receive ( charstring:"a" ); 
     68        //... 
     69} 
     70testcase testcasef1() runs on sampleComponent1 system sampleComponent3 { 
     71    // ... 
     72    function1(); 
     73    // ... 
     74} 
     75// ... 
     76}}} 
     77whould be shown as: 
     78{{{ 
     79#!html 
     80<div style="padding-left:20px;"> 
     81<img src="http://www.trex.informatik.uni-goettingen.de/etsicheck/raw-attachment/wiki/Documentation/T3D/views/mp-view-example-annotated.png"/> 
     82</div> 
     83}}} 
     84 
     85(where the relevant relation from the example above is highlighted in green) and  
     86 
     87{{{ 
     88#!html 
     89<div style="padding-left:20px;"> 
     90<img src="http://www.trex.informatik.uni-goettingen.de/etsicheck2/raw-attachment/wiki/Documentation/T3D/views/tc-view-example.png"/> 
     91</div> 
     92}}} 
     93 
     94 
     95in the module parameter and test case views respectively (with paths enabled from the presentation controls). 
     96 
     97Note that these two parts of the module parameter / testcase view may be separated further conceptually in future releases. 
     98 
     99=== Import View === 
     100 
     101The import view presents an overview of the dependency relations between modules. Put simply, a module A is said to depend on module B if module A imports definitions from module B. That is, to utilize module A, a user will also need to have module B available. On the other hand, when modifying module B, a test developer will have to take into account its uses in module A (and eventually other modules as well) in order to avoid breaking the functionality of module A, by either taking precautions to avoid any (negative) impact on module A, or by adapting module A accordingly to handle the changes in module B. This is referred to as ''direct dependency'', i.e. module A directly depends on module B. On the other hand, even though import statements in TTCN-3 are not transitive, indirect dependencies often have to be taken into account as well, due to the fact that changes in one module may have far reaching implications due to a chain reaction effect. An ''indirect dependency'' is when a module A imports module B, which in turn imports module C. In this context module A is said to depend indirectly on module C (since changes in module C breaking the functionality in module B may have an impact on the functionality of module A). 
     102 
     103The import view tries to capture these relations and present them in a usable manner, since relations between a large number of modules may be particularly difficult to represent visually. The current approach consists of a tabular presentation format with three columns. The middle column contains a list of all processed modules. Upon selecting any of the modules in the list, the left column is populated by all the modules that are imported by the selected module (i.e. the selected module directly depends on them), followed by all the modules that are imported by the modules imported by the currently selected module (i.e. the currently selected module indirectly depends on them). Note that the list of indirect dependencies contains only such indirect dependencies which are not already listed as direct dependencies. Additionally, in the middle column, all the modules listed as direct and indirect dependencies are also colored accordingly, based on the color scheme as shown in the legend (where otherwise the construct index is located in the other views). The color scheme can be configured to the particular preferences of the user via the CSS file. The right column on the other hand illustrates the opposite relations - it lists all the modules that import the currently selected module, followed by all the modules that import the modules that import the currently selected module. The latter then filtered in a similar fashion to show modules only once. The modules depending on the currently selected module (directly and indirectly) are also colored accordingly in the middle column in a similar fashion to the modules on which the currently selected module depends. 
     104 
     105To summarize, this layout can be perceived as a flow of imported definitions from left to right (definitions from modules in the left column are imported in modules in the middle column, whose definitions are in turn imported into modules in the right column), or as a flow dependencies from right to left, where modules in the right column depend on modules in the middle column, which in turn depend on modules in the left column.  
     106  
     107The import details (the bodies of the import statements) can be shown or hidden with the help of the presentation controls.  
     108 
     109'''Examples''' 
     110{{{ 
     111#!html 
     112<div> 
     113<img style="border:1px solid gray;" src="http://www.trex.informatik.uni-goettingen.de/etsicheck2/raw-attachment/wiki/Documentation/T3D/T3D_HTML_Ex4.png"/> 
     114<br> 
     115<div style="padding-left:10px"><b>T3D Import View Content Section</b></div> 
     116</div> 
     117}}} 
     118[[BR]] 
     119{{{ 
     120#!html 
     121<div> 
     122<img style="border:1px solid gray;" src="http://www.trex.informatik.uni-goettingen.de/etsicheck2/raw-attachment/wiki/Documentation/T3D/T3D_HTML_Ex9.png"/> 
     123<br> 
     124<div style="padding-left:10px"><b>T3D Import View Legend</b></div> 
     125</div> 
     126}}} 
     127[[BR]] 
     128{{{ 
     129#!html 
     130<div> 
     131<img style="border:1px solid gray;" width=100% src="http://www.trex.informatik.uni-goettingen.de/etsicheck2/raw-attachment/wiki/Documentation/T3D/Views/import-view.png"/> 
     132<br> 
     133<div style="padding-left:10px"><b>T3D Import Full Picture</b></div> 
     134</div> 
     135}}} 
     136[[BR]] 
     137In addition, worth noting is that import statement bodies are grouped by modules. For example, the following TTCN-3 code: 
     138{{{ 
     139import from module1 {group functions}; 
     140import from module2 all; 
     141import from module1 {testcase tc_1, tc_2}; 
     142}}} 
     143would be shown as 
     144{{{ 
     145module1 
     146   group functions; 
     147   testcase tc_1, tc_2; 
     148module2 
     149   all; 
     150}}} 
     151 
     152to avoid redundant entries and keep the presentation compact. 
     153 
     154The information about the dependency relations is stored in an intermediate XML representation, which can also be utilized by third party tools to create different visualizations of the relations or for other purposes. Also the XSLT file defining the transformations into HTML can be customized as well to accommodate particular needs. More information on this can be found in the T3D technical documentation.  
     155 
     156Note also that this view is currently based on the import statements only and does not take into account whether imported definitions are actually used in the importing module. 
     157 
     158=== Print View === 
     159 
     160The print view is available on all pages as a simplified printer-friendly version of their content. It discards all unnecessary elements, such as navigation entities within the page, which are of no use on printable media. This is achieved through a section in the CSS file and can thus be further customized to accommodate the user's needs.   
     161 
     162The print view is not an "official" view (yet), in that it cannot be directly selected from within the layout. However, most modern internet browsers do support print preview functionalities that allow the user to see whether the web page can be printed properly. With or without print preview, browsers will automatically select the printable presentation format when printing a page so that the output will always be the simplified printer-friendly version of the contents (unless configured otherwise in the browser's configuration). 
     163 
     164Below are a few screen shots illustrating the print views in the main, module parameters/testcase, and import views. 
     165 
     166'''Examples'''  
     167{{{ 
     168#!html 
     169<div> 
     170<img style="border:1px solid gray;" src="http://www.trex.informatik.uni-goettingen.de/etsicheck2/raw-attachment/wiki/Documentation/T3D/Views/print-view-main.png"/> 
     171<br> 
     172<div style="padding-left:10px"><b>T3D Print View - Main View</b></div> 
     173</div> 
     174}}} 
     175[[BR]] 
     176{{{ 
     177#!html 
     178<div> 
     179<img style="border:1px solid gray;" src="http://www.trex.informatik.uni-goettingen.de/etsicheck2/raw-attachment/wiki/Documentation/T3D/Views/print-view-mp.png"/> 
     180<br> 
     181<div style="padding-left:10px"><b>T3D Print View - Module Parameters / Testcase View</b></div> 
     182</div> 
     183}}} 
     184[[BR]] 
     185{{{ 
     186#!html 
     187<div> 
     188<img style="border:1px solid gray;" src="http://www.trex.informatik.uni-goettingen.de/etsicheck2/raw-attachment/wiki/Documentation/T3D/Views/print-view-import.png"/> 
     189<br> 
     190<div style="padding-left:10px"><b>T3D Print View - Import View</b></div> 
     191</div> 
     192}}} 
     193[[BR]] 
     194 
     195