MZ-Tools 8.0.0.135 released introducing enhanced programming rules reviews, enhancements and bug fixes

Today a new build 8.0.0.135 of MZ-Tools has been released with some bug fixes and interesting enhancements:

The Programming Rules Review now shows all violations of rules that use the “Not Containing” and “Not Matching” operators. So, for example, if you don’t want to use the Static modifier in procedure variables, now you get all the occurrences, not only the first one:

More importantly, the Programming Rules Review now allows to define a programming rule that is quite requested: if the code of a method (or module) contains some expression, then the code of that method (or module) must contain also some other expression. For example, if a method opens a recordset, it must close that recordset (or set a variable to Nothing). How this is done will be the subject of a separate post.

For VB/VBA, the Code Explorer and other features now distinguish between procedures that are subroutines (Sub) and procedures that are functions (Function). Notice the new icons and the separate filters:

The Options dialog now uses a more modern dialog to select a folder, that allows you to type (or paste) the full path to the folder:

The complete changelog is the following:

  • Enhanced [#11869] (All): The Programming Rules Review now allows regular expressions backreferences in the Value field of a condition for captures in the value field of a When condition.
  • Enhanced [Internal] (All): The Programming Rules Review now shows all violations using the “Not Containing” and “Not Matching” operators.
  • Enhanced [#11837] (All): On Windows Vista or higher you can now type the location of the options files, with a new folder browser dialog.
  • Enhanced [#11874] (VB/VBA): Features that deal with procedures now distinguish between Subs and Functions.
  • Fixed [#11886] (All): The Private Clipboards dialog now allows to click the OK button by keyboard using Alt+O.
  • Fixed [#11863] (All): The Find Text feature didn’t allow regular expressions when using Multiline.
  • Fixed [#11883] (VB/VBA): The Statistics feature now includes only text files that are recognized text files or parents of code files.
  • Fixed [#11880] (VB/VBA): Event handlers were considered dead code if used all lower case.
  • Fixed [#11866] (VBA): The Insert Header feature can cause NullReferenceException when used with CSS files (which are unsupported).
  • Fixed [#11845] (VBA): The Line Indenter didn’t parse correctly lines with the space + comment character sequence inside a string.
  • Fixed [#11825] (VBA): After inserting a code template, the code window didn’t get the focus.
  • Fixed [#11837] (VBA): On Windows Vista or higher you can now type the location of the options files, with a new folder browser dialog.
  • Fixed [#11858] (VBA): The Database Connection Assistant didn’t show the connection string with the MySQL ODBC driver.
  • Fixed [#11894] (VBA): The scope “Open files” didn’t work in Microsoft Access.
  • Fixed [Internal] (All): The Programming Rules Review caused exceptions if invalid regular expressions were used.

MZ-Tools 8.0.0.130 released introducing a Code Explorer and drag & drop in TabIndex Assistant

Last January 1 another monthly build was released, 8.0.0.130. This time, apart from some bug fixes, it introduces a new feature: a file code explorer:

You can read more about the Code Explorer on this post: Moving from MZ-Tools 3.0 to 8.0 Part 32: A Code Explorer.

Also, support for drag & drop in the TabIndex Assistant is reintroduced (this was supported in MZ-Tools 3.0, but not in MZ-Tools 8.0 until now).

The complete changelog is the following:

MZ-Tools 8.0.0.130 released (January 1, 2017)

  • New (VB/VBA): Code Explorer.
  • Enhanced [#11723] (All): Added support for drag & drop in TabIndex Assistant, Switch Assistant and other listviews.
  • Fixed [#11779] (All): The Programming Rules Review didn’t locate results using regular expressions when the found text ended with carriage return without line feed.
  • Fixed [#11775] (All): The Code Element Headers Review caused “Unterminated [] set” with headers that included parameters of array types.
  • Fixed [#11750] (All): The Generate HTML documentation could cause System.Xml.XmlException: hexadecimal value is an invalid character.
  • Fixed [#11739, #11749, #11757] (VB/VBA): The language of the user interface was always English on Windows 7. This bug was introduced in build 8.0.0.120.
  • Fixed [#11766] (VS): The New Method/Property Assistant added quotes to the initial value String.Empty.
  • Fixed [#11804] (VBA): The Find feature could cause System.ArgumentOutOfRangeException when using the VBA editor with double-byte encondings.
  • Fixed [Internal] (VB): The Generate Documentation (XML/HTML) could cause System.NullReferenceException (“System Error &H80004003. Invalid pointer”) if the operation was executed twice.
  • Fixed [Internal] (VBA): The width of buttons on toolbars was not correct when using high-DPI displays.

Moving from MZ-Tools 3.0 to 8.0 Part 32: A Code Explorer

The build 8.0.0.130 released on January 1, 2017, introduces another very requested feature: a Code Explorer. This feature provides you a list with all the code elements of the active code window:

The Code Explorer shows the code elements of the following kinds:

  • Constants
  • Fields
  • Enums
  • Events
  • User-Defined Types
  • Properties
  • Methods

On the toolbar there are seven toggle buttons to show/hide the code elements of a particular kind. Here you can see the Code Explorer showing only fields:

Furthermore, to the right of the toolbar you have a textbox to enter any text, so that only the code elements containing that text are shown:

And selecting any code element in the list shows it in the code window. I hope that you find this tool productive to locate your code faster!