Formatting Definition Lines
With the CodeSMART Code Formatter you can format and/or wrap a definition line across multiple physical lines in benefit of code readability. This is especially useful for method definition lines that contain many arguments and for large variable declaration blocks.
To Format Definition Lines:
-
In the CodeSMART main menu, select the Code Formatter entry, or click the same button from the Code Edit Tools toolbar to display the Code Formatter dialog-box (quick toolbar and menu references are available).
-
Specify the operation scope. Depending on the current position in code and the active code or designer window, only valid options are listed.
-
Click the Definition Lines tab.
-
Check the Format member definitions option in order to format member definition lines and to access subsequent options.
-
Wrap and indent parameters: check this option to split the method definition line at each parameter (argument):
-
Wrap and indent the 'Lib' clause in API declarations: check this if you want to place the Lib keyword on a separate line (only applies to API declarations).
-
Wrap and indent the 'Alias' clauses in API declarations: check this if you want to place the Alias keyword on a separate line (only applies to API declarations).
Here is an example of how an API declaration will look like after formatting with the above two options checked:
-
Check the corresponding check box if you want to wrap member definitions only if the line length exceeds a specified number of characters.
-
Specify if you want to format variable and constant declarations by checking the corresponding option.
-
Press Begin in order to start formatting. Depending on the situation, a progress bar may appear to illustrate the operation progress.
Notes
-
The Code Formatter will first perform indentation then blank lines management and only at last code wrapping/compacting. If you want the formatter to only perform certain tasks then click on the corresponding tabs and disable unwanted features.
-
The Code Formatter can be invoked for the currently open document by using the corresponding CodeSMART code window context menu.
See Also
Back to top
|