GExperts 1.3.27 released

I have just released GExperts 1.3.27. This is probably the biggest release in a long time, with several new experts, major improvements to existing ones, and lots of bug fixes. It supports Delphi 6 through RAD Studio 13.0 including the 64-bit IDE.

Head over to the GExperts download page to get it.

New Experts

The biggest additions are three new editor experts:

Declare Variable lets you place the cursor on an undeclared identifier and declare it as a local variable, class field, or property. It infers the type from context: literals, constructors, function return types, compiler intrinsics, and even functions from external units via the Uses Clause Manager. I wrote about this in more detail in a previous post.

Rename Identifier (Ctrl+Alt+R) renames identifiers within a single unit, understanding local, class, and unit-level scopes. It integrates with Rename Components so that Shift+F2 works in both the form designer and the code editor. More details in this post and this follow-up.

Duplicate Line duplicates the current line, inserting a copy immediately below. Simple but handy.

Reverse Statement Overhaul

The Reverse Statement expert has been completely reworked. Instead of simple function name pairs, it now uses configurable regex-based reversal rules. This means it can handle transformations like ReadString/WriteString correctly out of the box. A redesigned configuration dialog with a two-column grid and interactive test button makes it easy to add and verify custom rules.

Uses Clause Manager

The Uses Clause Manager now supports sorting and grouping uses clauses by namespace prefix (feature #181, feature #128). A Sort button and Auto Sort checkbox have been added to the dialog, and the prefix groups and separator style are configurable in the options. Line wrapping now respects the IDE’s Right Margin setting instead of using a hardcoded 80 columns.

Code Formatter

The formatter gained two new options:

  • Assignment alignment: Align := operators at a fixed column position
  • Enum indentation: Options for one member per line, leading/trailing commas, and break after the opening parenthesis (feature #198)

It also received several bug fixes: correct indentation of anonymous functions after :=, continuation lines in repeat-until conditions, missing space before at in raise statements, and wrong indentation for comments at the start of a unit, among others.

Class Browser

The Class Browser now has a toolbar toggle to show or hide implementation-section classes (hidden by default, shown with greyed icons). Nested type declarations like TOuterClass.TInnerClass now display correctly with fully qualified names (bug #248). Several stability fixes address potential crashes from dangling pointers, empty files, and circular inheritance in cache files.

Backup Project

The Backup Project expert now shows a proper file list with Path, File Name, Size, and Last Modified columns instead of raw wildcard patterns. New directives {#+BACKUP} for recursive folder search and {#-BACKUP} for exclude patterns give more control over which files are included.

Other Notable Fixes

  • DPI Scaling: Fixed bsDialog forms not scaling at non-100% DPI, and fixed font scaling when moving forms between monitors with different DPI settings
  • Procedure List: Fixed triple-quoted multi-line strings (Delphi 12+) containing (* causing methods below to disappear (bug #475)
  • Expert Manager: Fixed duplicate entries when the same expert exists in both enabled and disabled registries (bug #447)
  • ToDo List / Bookmarks: Fixed non-ASCII ANSI characters (Chinese, Polish, etc.) being corrupted in Delphi 6/7 (bug #176)
  • Source Export: Replaced the old 16-color grid with a full color dialog (bug #119)
  • Code Proofreader / Code Formatter: Can now use identifiers from the Uses Clause Manager for capitalization (feature #218)

Contributors

Thanks to Achim Kalwa and freeman35 for code contributions, and to everyone who reported bugs and submitted feature requests, especially those who included patches.

Discussion about this in the corresponding post in the international Delphi Praxis forum.