Today a new build 184.108.40.206 of MZ-Tools has been released with some bug fixes and several important enhancements thanks to your feedback, including a feature of MZ-Tools 3.0 that was not available yet on MZ-Tools 8.0: the ability to save files at debug-time (with a keyboard shortcut). New File/Method properties such as CodeLineCount, CommentLineCount, BlankLineCount, etc. (and the equivalent ones as percentages) have been added to the programming rules review, so that you now can create rules of the type “If you create spaghetti code, at least comment it profusely” :-). If you are a VBA user, toolwindows such as the Code Explorer now refresh automatically when the active window changes. The Insert Header is now more usable: there is a new menu entry on the context menu of the code window, and to insert a header to a file you can now put the cursor at any column of line 1 (not at column 1 as before). Also, the headers can use now two new predefined variables to define a section for the return value of a method or property. The whole section is deleted if the method doesn’t return a value, so you can define a unified header for Sub and Function methods. Finally, this build introduces a more streamlined experience in the Check for Updates feature requiring fewer clicks to update (you will notice this in the next monthly build).
The complete changelog is the following:
- New (VB6/VB5): Keyboard shortcut to save file at debug-time (this feature was in MZ-Tools 3.0).
- Enhanced [#11944] (All): Added the following properties to the Programming Rules Review: LineCount (formerly CodeLineCount, which changes the meaning), CommentLineCount, BlankLineCount, CodeLinePercentage, CommentLinePercentage, BlankLinePercentage.
- Enhanced [#11910] (All): The check for updates process requires now fewer clicks to install the latest version.
- Enhanced [#11924] (All): The context menu of the code window now provides the “Insert Header” meny entry.
- Enhanced [#11857] (VBA): Toolwindows (Code Explorer, TabIndex Assistant, etc.) are now refreshed automatically when the active window changes.
- Enhanced [#11924] (VB/VBA): The Insert Header feature now allows the cursor on any column of line 1 when inserting a class or module header.
- Enhanced [#11946] (All): Added predefines variables “Method Return Section Begin” and “Method Return Section End” to exclude information about the return type in headers for methods that don’t return a value (“void” in C#, “Sub” in VB, etc.).
- Enhanced [Internal] (VBA): The portable edition provides the option to isolate or not MZ-Tools, and the Com Shim provides better diagnostics.
- Fixed [#11957] (VBA): The scope “Open files” didn’t work if the filename contained the “-” character.
- Fixed [#11902] (All): In the dialog to enter the values of user-defined variables, if the value of a user variable was long enough to show the horizontal scrollbar in the preview richtextbox, the textbox with the value lost the focus.
- Fixed [#11920] (All): NullReferenceException could happen in some circumstances.
- Fixed [#11899] (VB/VBA): The Initialize and Terminate methods of classes were not shown in Code Explorer, and no icon was shown for them in the results window. This bug was introduced in build 220.127.116.11.
- Fixed [#11903] (VB/VBA): Some features such as the Line Indenter caused error with comments that included again the comment character. This bug was introduced in build 18.104.22.168.
- Fixed [#11958] (VB/VBA): The Insert Error Handler and other features don’t work correctly if the method declaration contains optional parameters initialized with dates or quotes that include the ‘:’ character.
- Fixed [#11901] (VS): The Results window didn’t locate correctly variables declared with the same name in different blocks of the same method.
- Fixed [Internal] (VB5/VB6): The main toolbar didn’t show all the buttons when using a resolution of 1280 horizontal pixels due to the new Code Explorer button. Now the Collapse Projects button has been moved to the Other Utilities toolbar. This bug was introduced in build 22.214.171.124.
- Fixed [#11947, #11954] (VB/VBA): The Code Explorer could cause System.Runtime.InteropServices.COMException (0x80020010): Invalid callee. (Exception from HRESULT: 0x80020010 (DISP_E_BADCALLEE)).