Review Source Code

Top  Previous  Next

The Review Source Code feature allows you to review the source code to detect some unused declarations (constants, variables, parameters, procedures, etc.).

MZ-Tools offers the following ways to review the source code:

  • The Tools | MZ-Tools | Other Utilities | Review Source Code menu: with this menu you can review the source code of all the files of all the projects.
  • The Review Source Code context menu of a project in the Project Explorer of Visual Basic: with this menu you can review the source code of all the files of the selected project.
  • The Review Source Code context menu of a file in the Project Explorer of Visual Basic: with this menu you can review the source code of the selected file.
  • The Other Utilities | Review Source Code menu on the MZ-Tools toolbar: with this menu you can review the source code of all the files of all the projects.
  • The shortcut customized in the Options window, Shortcuts tab: with this shortcut you can review the source code of all the files of all the projects.

The results are shown in a Results Window.

The review of the source code can be launched automatically (or you can be asked) when you make the executable of a project, that is, clicking the File | Make Project... menu (this is customizable in the Options window, General tab). If an unused declaration is detected, the Results window keeps open (otherwise it is closed). You should remove the unused declarations before making the executable.

Remarks:

  • For performance reasons, the source code review checks only private declarations, that is, declarations that can be used only inside the module where they are declared.
  • Ensure that the source code can be compiled without errors before running this feature. If the source code has compilation errors, you can get false "procedure is not used" results for procedures that are events of controls.
  • The review is not launched when clicking the Make Project Group... menu (only when clicking the File | Make Project... menu) due to a problem with the Visual Basic IDE.

See Also:

Results Window

General Customization

Shortcuts Customization