ModelMaker Code Explorer 6.00
MMX 6 released
On March 26th 2008 ModelMaker Tools released ModelMaker Code Explorer 6. Check the upgrade policy to upgrade existing licenses.
Main new Features
- Entity Insight™ bar - quick access to attributes for selected entities.

- IDE editor tool bar - dockable, customizable tool bar with 80+ MMX editor commands.

- Interface Wizard - implement interfaces and correct declarations for existing members.

- Cursor Indicator and centered positioning improve navigating with explorer and source indexer.

- Dockable Event handler view - showing components, events and their event handlers.

- Auto Toggle Object Inpector/MMX on Toggle Form/Source (F12)

- Convert field to property - several improvements.

- Smarter Add Method, Field etc. - picks up parameter list and types.
- Presets in method and property dialogs.
Entity Insight™ bars
- The IDE editor and Explorer members view contain an Entity Insight™ bar that tracks the selected entities and allows modeless changing
of entity attributes like name, type and visibility. The editor bar tracks the (single) entity at cursor position, the Explorer EI-bar tracks the (multiple)
selected members in the explorer members view. Movie:

- If you hide the Explorer EI-bar (Properties|Display) (this is by default), the selected members in the Explorer window are linked to IDE editor Entity Insight-bar. An indicator in the Editor EI-bar shows the selection source (Explorer or Editor) to avoid confusion.
- Entity Declaration shows the full declaration for the selected entities. Click the button to scroll the editor to the declaration.
- Name - changes entity name. Single selected entity only.
- Visibility - changes entity visibility.
- (Return) type selector - changes method / delegate return type (+ procedure/function type) or field / property type name. To convert a function into a procedure, either type "" (empty string) or "void", or use the "Make void" command from type selector drop down style button (next to the type selector).
- Change parameters - invokes a parameter wizard and operates on multiple selected methods / procedures - includes IntelliReplacing renamed parameters in all selected methods.
- Method binding - changes method binding (non virtual, virtual, override, abstract etc..) for selected methods
- Method type - changes selected methods to instance method, class method or static class method
- Method overload - toggles overload directive for selected methods and procedures.
- Method call convention - changes call convention (default, stdcall, safecall, etc..) for selected methods and procedures
- Add code snippet: adds a method code snippet to the selected method(s). Note multiple selection is supported.
- Field type - changes selected fields to instance field or class var.
- Hint directives - changes compiler hint directives for selected entities.
IDE editor toolbar
- CodeGear IDEs: dockable, customizable IDE editor toolbar with all MMX IDE editor commands. More than 80 commands are available - by default only
some frequently used are displayed. Additionally, commands are available from drop down buttons - similar to the sub-menus in the main MMX menu.
Movie

- IDE toolbar contains alternative Member Search bar + search window.
- IDE Editor related Tools in the Explorer members Wizard popup menu were moved to the IDE main MMX menu and are available on the toolbar.
- The Toolbar shrink mode can be set to Chevron or Wrap with the toolbar customize popup menu.
Interface Wizard
- The Interface Wizard helps implementing interfaces by adding new members to a class or correcting the declaration for existing members.
Movie

- To invoke the Interface Wizard: drag/ drop an interface on a class implementing the interface or copy an interface or members of an interface and paste this the class that should support the interface.
- The wizard supports both implicit and explicit mapping modes.
Pascal: explicit mode uses method resolution clauses to map interface methods on implementing methods.
C#: the wizard dialog allows toggling the implicit/ explicit mode. - The Interface Wizard allows specifying the visibility for new members (default private) and the explicit or implicit mapping mode (C# only).
- The Interface Wizard dialog shows the mapping analysis plus the actions required to implement each interface member. Optionally this dialog can be suppressed or displayed only when existing members will be modified.
- Pascal: interface properties are implemented by methods only - the Wizard therefore only analyzes and updates methods for Pascal.
Smarter Add Method, Field, Local, Parameter etc.
- Pascal: "Add Method" picks up parameter list from editor code. For example:
procedure Sample.Something(const Value: string);Add Method invoked with the cursor somewhere in identifier AddThisMethod will suggest parameters I: Integer and Value: string for the new method. Picking up parameters works for types declared in the same module (unit), local variables and method parameters. Other types may not be recognized and are assumed "Integer". When used in an assignment statement, Add Method also tries to pick up the method return type. Note: Add procedure and Add Local procedure also try to pick up parameter lists.
var
I: Integer;
begin
for I := 1 to 10 do
AddThisMethod(I, Value);
end;
- Pascal: Add Field, Add Property, Add Local Var and Add Parameter try to pick up member type when invoked in an assignment statement.
Improved navigation
- CodeGear IDEs: Cursor Indicator - a > icon in editor gutter makes it easier to see the editor cursor position when the editor is not focused.
Movie
.
Indicator options such as left position are displayed by Ctrl+Double clicking on the indicator or on Properties|General|Cursor Indicator.
In Delphi 5, 6, and 7 IDEs this feature is enabled by default. In Delphi 2005, 2006 and 2007, this is disabled by default.
Enabling it in these newer IDEs has the advantage of being able to disable the IDE option "highlight selected line" which brings
syntax highlighting back to the selected line. Disadvantage is that feature (currently) does not work with collapsed code sections and
therefore only works if all code is expanded. - Pascal: Event Dispatch methods are (optionally) displayed grouped with events. Matching is based on event name and a method name with commonly used prefixes. Controlled with option on Properties | Display | Member Appearance.
- Go to previous History entry. Pushes current entity to history to stack and then navigates to the previous entry. This can for example be used to toggle between two methods. No default shortcut - Alt+` seems a logical choice
- CodeGear IDEs: option Scroll cursor centered in editor on Properties | General tab allows positioning the cursor in the center of the editor view rather than on the top when navigating with Code Explorer.
- CodeGear IDEs: Move Entity Down/Up and Next / Previous entity scroll the entity centered in the IDE editor after moving, regardless of the setting for Properties | General | "Scroll cursor centered in editor".
New Uses clauses operations
- Pascal: Move a unit from the interface uses clause to implementation uses clause and vice versa. Invoked with Move Up / Move Down commands in the IDE editor,
both commands move the unit name at cursor position to "the other" uses clause. Movie (toward the end)

- Pascal: Adding a unit to the interface uses clause optionally removes this unit from the implementation uses clause - if it was defined there too.
Improved Convert field to property
- Pascal: Convert Field to Property in Members view now supports converting multiple selected fields at once.
Movie:

- Convert Field to Property optionally creates a read-only property rather than read-write.
- Convert Field to Property optionally uses IntelliReplace when renaming the converted field. As a result, existing code will still refer to the (converted) field rather than to the new property.
Dockable Event handler analysis view
- The Event handler analysis view is now a modeless window that tracks the form designer designer linked to the top most editor.
Movie:

- Selecting an event handler in the window, navigates to the associated source.
- DblClick or Ctrl+Enter selects the component in the Object Inspector.
- Component, event and the linked event handler are displayed in three sortable columns.
- The Report command allows emitting analysis to printer, file, preview and clipboard.
- Codegear IDEs: Event handler analysis window is an IDE dockable window and can be saved to a IDE desktops.
Presets in Method and Property dialogs
- Method and Property editors have a Presets button that allows storing and applying combinations of frequently used attributes.
- For example: method preset TNotifyEvent handler, sets parameter list (Sender: TObject), method type (procedure) and return type (void).
- Property presets can for example be used to define both read/write code snippets in a single preset. For example, define a Boolean / string property that uses read and write methods to access a TCheckbox / TEdit named after the property. Check the examples on property access method code snippets.
- To create a new preset, enter the options in the dialog and use "Create preset" from the Preset drop down menu. The hint in this menu item shows the currently selected attributes that will be stored. Note: the "name" attribute is also available, but omitted when creating a new preset.
- Presets can be manually edited using the "Edit Presets File" item from the presets drop down menu. The presets file is a plain xml file.
Paste prototype extensions
- Pascal: Paste Prototype extended with option Make properties override. When enabled, this pastes the selected properties as overrides rather than as new properties.
- Pascal: Paste Prototype available as IDE editor command.
New Sorting features
- Sort unsorted classes - Sorts members for unsorted classes according to the default sorting scheme. Command is available when the sorting hints Metric node is selected in classes view. Similar to selecting all unsorted classes and then using sort. Available from classes view sorting menu (drop down) and pop up menu.
- Pascal: Order Implementations like Interface - rearranges the selected class method implementations according to their order in the class interface.
External code navigation interface
- MMX supports a basic interface to allow 3rd party tools to scroll the IDE code editor. Supported are:
- Scroll to filename, line number, column
- Scroll to file name (optional), class name, member name (optional). If the file name is omitted, MMX uses the navigation history to locate "class name". If member name is omitted, MMX scrolls to the class declaration.
- This interface can be used from external executables running on the same machine or from packages or dll's loaded into the IDE.
- First application is an extended DUnit GUITestRunner by Tiriss that uses this interface to navigate to test methods.
Other new features
- Auto Toggle Object Inspector / Code Explorer: the IDE command Toggle Form/Unit (F12) has been extended to additionally toggle
Object inspector and Code Explorer. Movie:
.
Available for Delphi 2005 and higher. Note for Delphi 2005: pressing F12 in the code editor will show
the form designer, but does not invoke this command. Using the same command from the IDE toolbar does. D2005 probably uses an internal hard
coded toggle rather than the IDE acion based command. - When used on a selection, Rename Local allows picking an identifier from the selected text in the Replace input combo box.
- New Live Metric: detect irregular line breaks. This will emit warning if a source file contains any other line breaks than the standard CR LF (0xD 0xA) sequences. In this case the Members view pop up menu shows the "Repair irregular line breaks" command which will normalize all breaks to CRLFs. This metric is always enabled.
- CodeGear IDEs - Delphi 7 and down: Close all other files command in IDE editor . Closes all source files except the top most. Does not close project source files. No default binding but could for example be bound to Ctrl+Shift+Alt+F4
- Pascal: Add operators lets you select multiple operators to add at once. Available from Members view Add sub menu and IDE Add sub menu.
- Pascal: Operator Preset in Method Editor dialog. Lets you pick an operator name from the drop down list and adjusts parameter lists and return type.
- Pascal: Result is no longer suggested as member name for add local var, add field etc.
- The Explorer Classes and Members views allow invoking the Source Indexer's "Search Identifier" and "Search Identifier in File" commands using the selected entity's name as input. Shortcuts default to Ctrl+Alt+Shift+S / F (identical to the defaults for the same commands in the IDE editor)
- Source Indexer search edit stores previously searched texts in its drop down list. Available only when option "Assign to combo drop down" is unchecked - which is the default.
- CodeGear IDEs: Method history sampler is decoupled from Explorer window and also works if Explorer is invisible.
- Creational wizard preselects the members selected in the explorer window or IDE editor - depending on how it was invoked.
- CodeGear IDEs: to avoid long captions in the docking tabs, dockable window captions (explorer, indexer and event handler view) are adjusted when docking and undocking the window.
- Keybindings and shortcuts are stored as integer rather than as current locale dependent string. New registry entities like KeybindingsEx contain data like AddToHistoryAction=#24648;Shift+Ctrl+H . The numeric value - in this case "#24648;" - is optional, to manually modify the binding, just enter the text value, for example "Ctrl+Alt+H"
Solved bugs
- CodeGear IDEs: IDE desktop problems with the Source Indexer window solved. (Indexer could not close or could not be displayed.)
- In certain cases changing visibility using the dialog for fields or methods that were followed by an empty line, would result in bad code. Solved.
- Several minor memory leaks fixed.
- Pascal: Convert method to property could cause uncompilable code if the method had no / default visibility. Solved
- Pascal: methods with local records (anonymous or named) could cause Add Local (and similar operations) var to fail. Solved - for most cases.
- Class structured constant declarations (like const Origin: TPoint = (X:0; Y:0); would cause parsing errors. Solved
- Delphi 2005/2006/2007: Source Indexer window would not set focus to the editor more than once per file. Solved.


