Reverse engineering code comments (IDL code)
The Reverser reverse engineers code comments from IDL files.
Typically, the Reverser reverse engineers comments that precede and are on the same line as code elements. The comments are reverse engineered to the Description property of the item created for the code element.
For example, the code element for Class1 is prefixed by two comment lines. The two comment lines are reverse engineered to the Description property of the Class that is created in the Model.
Code
Modeler
//Description of Class1 line 1
//Description of Class1 line 2
struct Class1
{
};
Note that the Reverser uses white space to delimit preceding comments. For example, if in the preceding example there was white space between the two comment lines, only the second comment would be reverse engineered.
Code
Modeler
//Description of Class1 line 1
//Description of Class1 line 2
struct Class1
{
};
In the following example, the comment follows the code element for Attribute1. The comment is reverse engineered to the Description property of the Attribute that is created in the Model.
Code
Modeler
struct Class1
{
char Attribute1; //Desc. of Attribute1
};
Reverse engineering code comments when there is white space between a code element and its associated comments
If the code you are reverse engineering contains white space between code elements and their preceding code comments and you want the Reverser to reverse engineer those code comments, you can make the Reverser do so through a change to the registry.
To reverse engineer code comments that do not immediately precede their associated code elements:
1. Open the Registry.
2. Select the following key:
HKEY_CURRENT_USER\Software\Artisan Software Tools\Synchronizer\CommentGaps
If the CommentGaps key is not present, create the CommentGaps key below the Synchronizer key.
3. Set the value of the IDL DWORD in the CommentGaps keyword to the required value.
If the IDL DWORD is not present, create a DWORD named IDL.
The default value of 0 means preceding comments are reverse engineered only if they appear on the first line preceding the code element, as described above.
A value of 1 means preceding comments are reverse engineered if they appear on the first or second line preceding the code element, and so on.
The following example demonstrates how the value of the IDL registry entry determines when comments are reverse engineered.
//Reverse engineered when the value is set to 0 or more.
struct Class1
{};
//Reverse engineered only when the next comment is reverse engineered.
//Reverse engineered only when the value is set to 1or more.
struct Class2
{};
//Never reverse engineered because of the white space that follows.
//Reverse engineered only when the next comment is reverse engineered.
//Reverse engineered only when the value is set to 2 or more.
struct Class3
{};
4. Close the Registry.
Was this helpful?