Changes between Initial Version and Version 1 of Documentation/T3Q/Code-Formatting


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/T3Q/Code-Formatting

    v1 v1  
     1== T3Q Code Formatting Feature == 
     2 
     3Starting with v0.1.1, the T3Q tool provides a feature for the automated formatting of TTCN-3 code. The feature is disabled by default and has to be manually enabled in the configuration file. This is due to the fact that the user also has to specify an output path where the formatted versions of the TTCN-3 files will be written. The output setting allows for relative paths (the directory structure will be recreated in the directory from which T3Q was called), or absolute paths (the directory structures will be recreated in a fixed destination path, independent from the location where T3Q was started). Both ways to specify the output path can be used to overwrite the original TTCN-3 resources. 
     4 
     5Below is an extract of the settings relevant to the code formatting feature from the configuration file: 
     6{{{ 
     7      <pathFormattedOutputPath>FORMATTED</pathFormattedOutputPath> 
     8      <formattingParameters> 
     9        <tabs>false</tabs> 
     10        <unixNewline>false</unixNewline> 
     11        <spacesBetweenAssignment>true</spacesBetweenAssignment> 
     12        <spaceAfterComma>true</spaceAfterComma> 
     13        <KRstyle>true</KRstyle> 
     14        <newlineBeforeRunsOn>true</newlineBeforeRunsOn> 
     15        <newlineBeforeSystem>true</newlineBeforeSystem> 
     16        <newlineBeforeReturn>true</newlineBeforeReturn> 
     17        <newlineBeforeExceptionSpec>true</newlineBeforeExceptionSpec> 
     18        <newlineBeforeFormalPar>true</newlineBeforeFormalPar> 
     19        <newlineAfterFormalParList>true</newlineAfterFormalParList> 
     20        <spacesAroundParentheses>true</spacesAroundParentheses> 
     21        <spacesCount>2</spacesCount> 
     22        <linesBetweenModules>2</linesBetweenModules> 
     23        <linesAfterControlPart>1</linesAfterControlPart> 
     24        <linesAfterModuleDefinition>1</linesAfterModuleDefinition> 
     25        <linesBetweenImportDefinitions>1</linesBetweenImportDefinitions> 
     26      </formattingParameters> 
     27}}} 
     28 
     29 * '''<pathFormattedOutputPath>FORMATTED</pathFormattedOutputPath>''' - Output path for the formatted TTCN-3 files, can be relative or absolute 
     30 * '''<formattingParameters''' - Subsection with the formatting parameters 
     31  * '''<tabs>false</tabs>''' - Use tabs or spaces for indentation, default set to spaces 
     32  * '''<unixNewline>false</unixNewline>''' - Use UNIX new line style, this may or may not have any visible effects on the output, depending on the editors and operating systems used 
     33  * '''<spacesBetweenAssignment>true</spacesBetweenAssignment>''' - Add a space around assignment operators 
     34  * '''<spaceAfterComma>true</spaceAfterComma>''' - Add a space after comma  
     35  * '''<KRstyle>true</KRstyle>''' - Use Kernighan and Ritchie formatting style 
     36  * '''<newlineBeforeRunsOn>true</newlineBeforeRunsOn>''' - Add a new line before runs on clauses 
     37  * '''<newlineBeforeSystem>true</newlineBeforeSystem>''' - Add a new line before system clauses 
     38  * '''<newlineBeforeReturn>true</newlineBeforeReturn>''' - Add a new line before return clauses 
     39  * '''<newlineBeforeExceptionSpec>true</newlineBeforeExceptionSpec>''' - Add a new line before exception clauses 
     40  * '''<newlineBeforeFormalPar>true</newlineBeforeFormalPar>''' - Add a new line before formal parameters, unless a single parameter is used 
     41  * '''<newlineAfterFormalParList>true</newlineAfterFormalParList>''' - Add a new line after formal parameter lists (of more than one parameter) 
     42  * '''<spacesAroundParentheses>true</spacesAroundParentheses>''' - Add a space around parentheses 
     43  * '''<spacesCount>2</spacesCount>''' - Indentation depth 
     44  * '''<linesBetweenModules>2</linesBetweenModules>''' - Number of lines between modules 
     45  * '''<linesAfterControlPart>1</linesAfterControlPart>''' - Number of lines after control parts 
     46  * '''<linesAfterModuleDefinition>1</linesAfterModuleDefinition>''' - Number of lines after module definitions 
     47  * '''<linesBetweenImportDefinitions>1</linesAfterModuleDefinition>''' - Number of lines between import definitions (affects only subsequent import definitions) 
     48 * '''</formattingParameters>''' 
     49 
     50Upon successfully saving a formatted file, an output message is generated providing the location of the file.