New Features in ModelMaker Code Explorer 3.00

Delphi 2005 support

  • Delphi 2005 IDE integration
  • Most Delphi for .NET and Delphi for win32 syntax supported.

New Generic Features

  • Move Entity Up/Down refactoring available. Default keyboard shortcut Shift+Ctrl+Alt+Up/Down.
  • Rearrange Mode in Members view. When in rearrange mode, (Toggle Ctrl+Alt+R) use drag and drop to rearrange members. As visual feedback, the member view background color is changed. Also, in rearrange mode the members sorting scheme is suppressed and member are displayed in code order. For pascal: for classes this rearranges the class interface - use the similar "Rearrange Implementation Mode" Ctrl+Alt+I to rearrange method implementations. Additionally in Rearrange Implementation mode the filters are suppressed.
  • Move member Up/Down in Members view - available in rearrange mode. Keyboard shortcut Shift+Ctrl+Alt+Up/Down. For pascal: see comment in Rearrange Mode.
  • The Key bindings options page can report the current key bindings to various formats (file, printer, clipboard preview).
  • The MMX editor actions toolbar can be customized (pop up menu). The Auto Hide option is available as tool button and is stored
  • The property accessor filter mode can be defined as either "Exclusive" or "Filter Override" (Properties|Display tab). In "exclusive" mode, the filter state fully controls whether property access methods and state fields are displayed or not, regardless of the setting of the visibility and field and method filters. In "filter override" mode, the filter is superimposed on the field, method and visibility filters. Filter override mode is default.
  • The Surround Templates can use the macro <!clipboard!> to insert the contents of the clipboard on applying a template.
  • Surround with Template Improved: (previously know as Embrace With Template)
    Surround with Template supports unindenting the two templates rather than the existing code. This is useful for adding begin end pairs around existing statements. For example:
      if Condition then
        DoSomething; // place cursor on this line

    Applying a begin / end template with option unindent snippets enabled, results in:
      if Condition then
      begin
        DoSomething;
      end;

    Note that begin and end have one indention level less than the existing code.
  • Tabs support: Editing takes leading tabs into account. If Editing options | Use Tabs is enabled, all editing operations create optimal tab filled code rather than space filled code.
  • Editing options allow using IDE settings for "use tabs" and "block indention".
  • The MMX Actions menu is now inserted in the Main menu as MMX. Use the Properties|General tab to make it a Views sub menu as previously or to adjust the main menu Caption.

New Pascal Features

  • The Delphi 2005 inline procedure / method directive is supported. Enabled in parser and generator when Delphi.NET syntax is enabled. Method and Procedure dialogs adjusted.
  • The Convert to const refactoring can now be used to convert numbers and string to a constant. This refactoring can now also be used in module interfaces. In this case the const will be added before the first type or procedure declaration immediately following the interface or interface uses clause.
  • Add Parameter refactoring, takes the word at cursor position and adds a parameter to the current method after using a dialog similar as used in Add Local Var. Default keyboard shortcut Ctrl+Alt+P
  • Add Local Var improved:
    Add Local Var detects VarIdent := Initializer constructs on a single line and picks up the variable name as the identifier before the assignment. For example, if you type any of the following:
    List
    List :=
    List := TList
    List := TList.Create;

    and invoke the Add Local Var refactoring, the identifier "List" is suggested as local variable to add, rather than the word at the cursor. This saves moving the cursor back to the variable before invoking Add Local Var. Only if there's a single identifier before the := (assignment) this is assumed the variable. In all other cases the word at cursor position is used as variable name.

    In addition, the for loop is also recognized:
    for I := 0 to Items.Count - 1 do
    Pressing Ctrl+Alt+V anywhere in this line suggests loop control variable "I" as suggested variable to add.

    In situations like this
    IsFound := FindItem(Key, Index);
    "IsFound" will be suggested as local variable, regardless of the cursor position because it's left of the assignment := . This makes it impossible to add a local "Index" To avoid this, there's an escape: if the selection is non-empty, the selection is used as variable name rather than the identifier before the assignment.

    To improve suggested variable types, Add Local Var recognizes string literals and True|False. For example:
    "IsValid := False;" // suggests "IsValid: Boolean".
    "AName := 'some text';" // suggests "AName: string".
  • Extract Method improved:
    Extract Method picks up referenced local vars and copies these to the new method. Currently only vars defined immediately after the method implementation header are recognized.
    Extract Method has a new mode: comment with a TODO style comment. This surrounds the extracted code with (* TODO: extracted code *) rather than (* *)
  • Rename Local improved:
    Rename Local (renames an identifier in a procedure or method) allows selecting the scope for renaming: method (default), class or module. This allows for example renaming field and properties within a class from within the editor.
  • Sorting Hints: are (optionally) displayed node in the classes view. The node is visible when a class interface or implementation is not sorted according to the user defined sorting scheme. This gives quick insight in sorting status. Great for example if you want to make sure your code is sorted before checking in.
  • Check sorting status: allows to manually check the sorting status for classes. Available from the classes view sort drop down menu.
  • Use unit improved: if option "Single Click select" is set (default) clicking a unit in the list automatically selects and adds that unit.
  • MMX recognizes a VCL form or datamodule designer (resource) class even if the .dfm/.nfm is not opened. If the .dfm file is not opened (fro example because a component was missing when opening the module), MMX enters a safe mode and all event handlers are assumed to be wired and special restrictions on editing event handlers are applied.

C# support

  • Next/Previous Entity: Scrolls through the code by moving to next / previous sibling. Default key binding Ctrl+Alt+Up/Down
  • Select Token + Cut/Copy/Paste: similar to Pascal. Default immediately Ctrl+X / Ctrl+C, Shift+Ctrl+V
  • (Multiple) Delete: Delete entities at editor position or the selected entity / entities in classes or members view. Default immediately: Ctrl+Shift+Del
  • Convert To Const: converts numbers or strings to a const in the same class. A dialog lets you edit the const visibility, name etc.
  • Rename Local: renames the identifier at cursor position within an entity. Scope defaults to the entity at cursor position, but may be increased to enclosing entities (module > namespace > class > method. Case sensitive for C#.
  • Change Visibility: allows changing the visibility for multiple members at once. Does not move or resort members.
  • Change Modifiers: C# specific, allows you to change modifiers for multiple members at once.
  • Modifiers order as used in editing functions is definable with string value CSharpLanguage.ModifiersOrder in HKCU\Software\ModelMaker\Midex\3.0\C#\Language
  • Add Parameter implemented
  • Add/Edit/Rename Field implemented
  • Add/Edit/Rename Method implemented
  • Add/Edit/Rename Property implemented
  • Add/Edit/Rename Event implemented, including Create Dispatch Method.
  • Add/Edit/Rename Class, Interface, Struct implemented.
  • Add/Edit/Rename Delegate implemented. Add Delegate from Method implemented. Add Delegate from Method at current line implemented.
  • Simple, preliminary Use namespace implemented.
  • Classes view: Drag/Drop Change ancestor implemented. Drag drop Add Interface support implemented.
  • Rename and IntelliReplace implemented, applicable to all relevant entities. IntelliReplace options allow defining replace scope per entity type.
  • Extract Method implemented.
  • Drag/Drop or Copy/Paste a single Delegate into a class/interface/struct to add an event or event handler based on the delegate signature.
  • Operations related to copying and pasting entities including drag drop move/copy and Extract Class/Interface and Code Template support.
  • Add Local var implemented
  • Rename Parameter implemented
  • Add Factory Method implemented
  • Drag drop rearrange support in classes and members view implemented. Available in "Order by code" for classes views and Rearrange Mode (members view)
  • All operations related to Sortingentities. C# kind and visibility orders can be customized (Check Properties | C# Sorting)

C# unsupported features

The following features are not available for yet for C# and still on the TODO list. Listed in order of planned availability.

  • Convert member to different member type (field to method/property/event etc)
  • Introduce parameter object
  • Module string wizard: extract all hard coded strings and convert to constants

Solved bugs (pascal)

  • Calling conversions in anonymous procedural types would cause problems. For example: "FProcField: procedure; stdcall;" or "FProcField: procedure of object; stdcall;" Solved.
  • Adding the declaration for a private module procedure using the procedure edit dialog would cause an (harmless) AV. Solved.
  • In some cases cancelling an event type dropped (delegate) on a class would cause an (harmless) AV. Solved.
  • in some cases the name edit in dialogs for new entities would initially not have all text selected. Solved.