You are here: AxTools > CodeSMART 2007 for VB6 > Documentation > User's Guide > Code Formatter > Format Member Definitions
While browsing this page, why not start downloading the evaluation setup kit (direct download, no questions asked).

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:

  1. 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).
  2. Specify the operation scope. Depending on the current position in code and the active code or designer window, only valid options are listed.
  3. Click the Definition Lines tab.
    Code Formatter - Format Definition Lines
  4. 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):
      Code Formatter - Format member definitions
    • 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:
      Code Formatter - Format API declarations
    • Check the corresponding check box if you want to wrap member definitions only if the line length exceeds a specified number of characters.


  5. Specify if you want to format variable and constant declarations by checking the corresponding option.
    Code Formatter - Format variable and constant declarations
  6. 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
Code Formatter Overview
Rebuilding Code Indentation
Managing Blank Lines
Wrapping/Compacting Code Lines

Back to top

Copyright © 2008 AxTools - CodeSMART 2007 for VB6 - Code Formatter