New Features in ModelMaker Code Explorer 3.15

Generic new features

  • Property Completion Edit entity detects a property without access specifiers and applies the defaults for new properties (read/write method, read/write code, state field etc) before showing the Edit Property dialog. Property Completion is automatically enabled/disabled with a "don't ask me again" style confirmation dialog.
    // C#
    int Test {} // Ctrl+E to Edit Entity and suggest accessor defaults.
    int this[int index] {} // similar

    // Pascal
    property Test: Integer; // Ctrl+E to Edit Entity and suggest accessor defaults.
    property Test[Index: Integer]: Integer; // similar
  • Multiple Inheritance for interfaces: in both C# and Delphi.NET interfaces can have multiple ancestors. ModelMaker Code Explorer allows adding additional ancestors in a comma separated list in the Edit interface dialog. To display hierarchy (for example in classes view), only the first ancestors is used.
  • Comment Selected Members (Members view) and Comment Entity at Cursor(IDE Editor), comments out selected entities. For properties, accessors and state fields are auto included. Operation is designer safe: components, (wired) event handlers and designer classes are auto removed from the selection.
  • Extract Method works on pascal module procedures.
  • Win32 form designer eventhandlers for OnCreate and OnDestroy events are (optionally) placed front of all other event handlers. This mimics constructor and destructor handling. Controlled on display options tab.
  • The Explorer accepts file drag drop. Dropped files are opened in the IDE editor.
  • In rearrange mode the explorer locates the declaration for a pascal method or procedure instead of the declaration.
  • To avoid invisible menu items on smaller screens, the MMX IDE main menu and Editor Pop up menu have been reorganized to make them more compact.
  • Hotkeys for Module String Conversion Wizard have been changed to R | C | U , no Ctrl or Alt modifiers - which mimic the icons on the toolbar.
  • Declaration Hints can be displayed in Classes view for entity (methods etc) declarations that span multiple lines. Enabled/ disabled on Properties|General|Display tab.
  • Members View | Wizards | Format Reserved Words, allows formatting pascal keywords. Select lower case , upper case or first letter upper case.
  • C# modifiers order is adjustable on the Properties "New entities" tab.
  • Parameter Wizard improvements:
    • Keyboard shortcut Ctrl+H has been assigned to "Suggest type based on history" button to the right of the parameter name edit.
    • Typing a : (colon) in the name removes this character and also invokes the Suggest type wizard plus sets focus to the type name combo.
    • The type name combo allows selecting the drop down style similar to the normal type selector drop down style: select from history, classes, interfaces or presets.
    • The "Suggest type" wizard has been now auto-selects the const modifier for string (Pascal only).
  • Explorer window shortcuts are customizable on the Properties | Keybindings | Explorer Shortcuts tab.
  • Copy Full Name in the Members view copies the qualified member name(s) to the clipboard.
  • The pascal automated visibility may be displayed in the Members view visibility filter for classes. After shutdown, go to registry key HKEY_CURRENT_USER\Software\ModelMaker\MideX\3.0\Explorer and set value ShowAutomatedFilter = "True" (omit quotes).
  • Pascal Class insertion position (add class, paste class) takes inheritance into account. A class declaration is inserted before any descendants in the module.
  • If a Pascal class ancestor is declared after a descendent, an error is displayed in the Errors node.
  • Option "Empty lines unassociate comments" on [Language]|Parsing tab allows unassociating comments like in the example below. The introductionary comment { TSample } won't be associated with the constructor method and therefore not moved or copied with it either.
    { TSample }

    constructor TSample.Create;
    begin
      inherited;
    end;
  • If customized type presets use different spelling for internal defined pascal types such as STRING, integer or boolean, this customized spelling is used whenever creating new entities. Existing type names for existing entities are unchanged. As a result setting for lower case string has been removed from Pascal | Editing options. The spelling for string (String, STRING) is now taken from the type presets.
  • All refactoring operations that modify the IDE edit buffers (optionally) drop bookmark #7 at the current cursor position. Similar to how Extract Method drops bookmarks #8 at the original code and #9 at the extracted method. The bookmark numbers can be customized on the History Tab which also allows disabling dropping specific bookmarks.
  • Usage report tab shows how often you've used the explorer commands. The "Send..." function on this tab sends the data by email to ModelMaker Tools after your confirmation.

Customizable Property Access Code

  • Property access code as inserted with the Pascal and C# Edit Property dialogs is customizable. Previously the (hard coded) getter and setter code would be selected through check box options ("Read Code" "Write Code" etc.). This is now done with combo boxes that allow adding new code snippets. Macros can be used to make snippets more flexible. Here are a few examples for new pascal accessor code snippets:
    // new setter example
    if (<!FieldName!> <> <!WriteParam!>) then
    begin
      <!FieldName!> := <!WriteParam!>;
      Changed;
    end;
    or for reading an enumerated value from a combo box:
    // new getter example
    Result := <!PropertyType!>(<!PropertyName!>Combo.ItemIndex);
  • The code snippets are maintained on Properties | [Language] | Code Snippets tabs. These allow adding new snippets and changing predefined snippets.

Pascal String Conversion Wizard

  • String Scanner Options are now in separate tab in options dialog
  • Default conversion type may be selected (resourcestring, const, unlocalized etc).
  • In addition to marking a line as unlocalized, a line may be "custom marked" with a user definable comment. This comment defaults to "// TODO: check string"
  • The Module String Conversion Wizard dialog allows scrolling the IDE editor up and down - Hotkeys are Ctrl+Alt+Up/Down. This allows inspecting the string context.
  • The default scroll offset when navigating through extracted strings is adjustable: string is positioned 0..20 lines from the top.
  • If an external file is defined to define extracted strings, this file is auto created if it does not exist (after confirmation).

Solved bugs Pascal and Generic

  • Running the Multi File string conversion Wizard from the IDE main menu with an invisible Code Explorer window would cause an AV. Solved
  • String conversion wizard toolbars did not show Hints. Solved.
  • Sorting and rearranging would include procedure forward declarations resulting in uncompilable code. Forward declarations are now skipped during rearrange and sorting. If necessary procedure forward declarations are moved in front of rearranged (sorted) module procedure implementations.
  • In rare cases (such MMX docked in the Object Inspector and some other less common settings) renaming parameters using the parameter wizard as invoked from the Edit Method dialog could cause a series of AV's. Solved.
  • Invoking Edit Property and then Cancel the dialog, could in certain cases cause an access violation. Solved.
  • Adding a new entity would not always pick up the identifier at cursor position when using tabs. Solved.

Solved bugs C#

  • Convert to Const would replace the constant with the suggested identifier rather than the identifier name after editing. Solved.
  • The parser recovers better from too many { tokens in a method body, thus allowing some operations to work normally.
  • When adding a new method, the cursor would be positioned on the method declaration rather than inside the method block. Solved