ModelMaker Code Explorer 9

MMX 9.1.0 General new features

  • Delphi XE2 supported
  • Add Explaining Variable optionally replaces all occurrences of the selected expression with a reference to the local variable. A few notes:
    • With this option disabled (default) behavior is identical to previous behaviour.
    • Expression detection is white space independent.
    • If the expression is also found before the line at which the local variable would be initialized, you'll get a warning with an option to cancel. "Cancel" positions the cursor at the first occurence.
    • If a plain assignment (Pascal := C# = ) to the expression is detected, it is skipped to avoid changing semantics. You'll get a warning and only the normal cases are replaced.
  • Pascal: Classes and Interfaces contained by loaded packages are available in type selectors if option MMX Proeprties | General | "Check Packages" is enabled.
  • Pascal: Package Class Report and type extraction based on loaded packages improved by filtering out IDE packages and design packages.
  • Pascal: the Tools | Package Class Report is now also available for Delphi 2010 and up.
  • Pascal: Extract Method inserts class type variables with "value" (none) parameter modifier, records with "var" modifier.

MMX 9.1.0 Solved bugs

  • MMX| Properties | Keybindings: Suggest All and Suggest Undefined would not take the sorting order into account - resulting in odd default shortcuts. Solved.
  • The "delayed" keyword on external procedures was incorrectly generated with a semicolon placed in front of it. The MMX parser would also expect the semicolon. Solved.

MMX 9.0.5 General new features

  • Confirmed Delphi 2010 IDE command "Format Source". MMX intercepts the IDE command "Format Source" and proceeds only after you confirm. This avoids unnoticed re-formatting the source by accidentally pressing the corresponding keyboard shortcut. (This is already an option in the Delphi XE formatter)
  • Pascal: Extract Method will add local vars that are referenced outside the extracted code to the extracted method's parameter list. These parameters are displayed in the Extract Method dialog's parameter wizard. If such a parameter is removed from the parameter list is it inserted as local var anyway. This solves problems (invisible to the compiler) when local vars in the original method are used to transfer to / from the extracted method. The parameters are either inserted as "var" (for known value types like Integer and Boolean and string) and as "const" for other (reference) types. The var/const modifier can be modified in the dialog.
  • Pascal: Generic type parameters lists and constraints are stripped from macros "classname" and "membername" as used in surround and documentation templates. For example, the macro value for "Handler<T: constructor>" is trimmed to "Handler"
  • Explorer Classes view now supports displaying seemingly recursive relations in hierarchy mode:
    class Sample: Samples.Sample {

    // Pascal
      TSample = class(UnitSamples.TSample)
  • Pascal: Convert Field to Property allows defining read access as [field, method] and write access as [none, field, method]. The existing "make default" check box allows changing the default setting.

C#5 support

  • MMX | Properties | C# | Parsing has a new C#5 language mode that enables the new async language feature.
  • The generation order of async keyword can be adjusted on tab MMX | Properties | C# | New Entities.
  • The async (context sensitive) modifier is supported by parser and editor. The await keyword can only appear in method implementations and is therefore uninterpreted.

MMX 9.0.5 Solved bugs

  • The "Use Unit" dialog would list the .dcu file rather than the .pas file depending on search path order. This made it impossible to use the "Use Unit" dialog to "Open" the source file in this case. Solved.
  • In very special cases - involving constructs like "TList = class (Classes.TList)" - an endless loop would occur when locating inherited classes. Solved.
  • In several dialogs the keyboard shortcuts have been revised and duplicates removed.
  • C#: the unsafe statement would result in parsing errors. Solved.
  • Pascal: The Module String Converter would show 0-based line numbers, rather than 1-based line numbers as the IDE does. Solved.
  • Pascal: The Module String Converter interaction with the IDE editor for multiple selection has been improved.

MMX 9.0.0 General new features

  • Delphi XE support.
  • Delphi Generics support: Refactoring Editor supports Generic types, all major operations work as you'd expect. Note: renaming a type identifier (the T in Sample<T>) is not Intelli-Replaced. Navigation History supports Generic types and methods. Documentation Pane supports editing generic types.
  • Delphi 2010 and XE: Enhance IDE Find. When enabled, it adds all identifiers from the current source file to the Find drop down list. Option set controlled on Properties | General | Delphi Editor.
  • Navigation History improvements: the history stores the relative position for methods. When navigating, this is restored rather than locating the method's first line. Also, the history picks up the current method when navigating using the history. Very similar to "back to previous item" works. Both changes help making the history more effective.

with statement converter

with statement converter

The with converter wizard helps a great deal converting with statements to normal, qualified calls. It offers to:

  • remove with statement,
  • remove the begin end block,
  • unindent the with statements,
  • add a local var. This functions very similar to explaining var - the with expression is replaced with a variable.
  • insert markers comments,

When applying the wizard, it converts the code according to the preview, optionally adds the local var declaration and puts the qualifying text on the clipboard.

Invoking the wizard
In the IDE editor position the cursor on the line containing the with keyword and use the MMX menu or default keyboard shortcut Shift+Alt+W.
From the Explorer Select the with statement via Live Metric Hints | with statements and use the Members view pop up menu "Convert with statement"

Note: MMX does not compile code and can therefore not automatically fully replace a with statement with qualified member access.

Entity Insight new features

Entity Insight name attribute

  • The Entity Insight Name attribute shows the class name for members as feedback. The edit allows resizing if necessary.
  • The Entity Insight Name attribute has a drop drown list that allows navigating within the selected container (either class or module). For a class all methods are displayed in code order. For all other cases the procedures and types contained by the module are displayed in code order.

Source Indexer new features

  • Find selected Component, uses Source Indexer to locate (local) references to the component selected in the Object Inspector. Default keyboard binding Shift+Alt+F
  • Matches are highlighted in the index viewer, making them easier to spot. Colors are adjustable via integer color values in HKEY_CURRENT_USER\Software\ModelMaker\MideX\8.0\SourceIndexer\BDS 7
  • Selecting an item through the Search Edit history drop down searches for the selected word.

C# v4 support

The C# v4 Language mode can be selected on Properties | C# | Parsing tab. New syntax features include: optional parameter support, dynamic type support, named argument support, indexed property support, generics co-variance and contra-variance support.

Minor new features

  • Edit Class dialog uses an auto complete style drop down list to select interface support.
  • Move Entity Up/Down maintains relative cursor position within the moved entity.
  • Pressing Escape in the Explorer Class Tree or Member List sets focus to the IDE Code Editor.
  • Custom Find Identifier (default binding Shift+Alt+Home) loads a (filtered) list of all available identifiers in the current source file, making it easier to enter identifiers to search for.
  • Convert Field to Property allows specifying the field and property visibilities. The default field visibility is "state field visibility" as defined on MMX | Properties | [Language] | New Entities. The default property visibility is public.
  • Macro TrimmedClassName is available in code snippets. It contains the class name stripped from class prefix and generic parameters. For example, for TList<int>, TrimmedClassName contains "List"

Solved bugs

  • The Show related classes pop up mouse over hint would not display a module name for ancestors and supported interfaces in the same module. Solved.
  • The Use/Open unit dialog would flicker when typing in the units list box. Solved.
  • Pascal: The parser did not recognize multiple compiler hint directives in methods. Solved.
  • Delphi 2005-2010: Several problems related to multi-byte characters in the IDE editor and the editor cursor position and selection. Solved.
  • Several sorting and rearranging problems solved related to method resolution clauses in combination with fields.
  • D2005-2010: Locate in Explorer would not set focus to either explorer classes or members view. Solved.
  • Several minor file text encoding related problems solved.
  • Several minor visual appearance related problems solved.
  • Delphi: class destructors would not be recognized / editable. Supported now.
  • Delphi: generics constructor constraint would not be recognized / editable. Supported now.
  • C#: Adding a new method "after current method" with Add Method or Extract Method would insert the new method inside the current method. Solved.
  • Pascal: the parser would not recognize anonymous records in an "array of record end;" construct. Solved.

ModelMaker Code Explorer 9.01 Service update

Solved bugs

  • The "Use Unit" dialog would list the .dcu file rather than the .pas file depending on search path order. This made it impossible to use the "Use Unit" dialog to "Open" the source file in this case. Solved.
  • In very special cases - involving constructs like "TList = class (Classes.TList)" - an endless loop would occur when locating inherited classes. Solved.
  • In several dialogs the keyboard shortcuts have been revised and duplicates removed.