ModelMaker Code Explorer 5

MMX 5 released

On 20 March 2007 ModelMaker Tools released ModelMaker Code Explorer 5. This major update is available for Delphi 5 - Delphi 2007.

Later this year free updates in the MMX 5.x series will integrate with the planned CodeGear Highlander IDE.

New MMX 5 Source Indexer features

  • Tabbed searching in Source Indexer window. Tabs can be added with New Tab and closed with Close Tab and Close other Tabs commands. DblClick on a tab also closes the tab. The Tab position is adjustable (Top, Bottom Left, Right) via the pop up menu. Note that Left and Right tabs do not appear themed.
  • This has the advantage of seeing up to date search results, but the disadvantage of processing time. When expanding a single node, you usually don't notice this in-place reparsing, but you might see a delay for an "expand all" for many files.
  • Find in Module: (IDE editor command) builds an index for the top most module and displays the matches for the word at cursor in a new tab. Does not require an existing index. Default shortcut Shift+Ctrl+Alt+F
  • Search Mode "Exact | Starts with | Contains | Ends with" allows specifying how the search text is located in the index.
  • CodeGear IDEs: scan project files for active project or project group in addition to scanning directories when building index.
  • Report allows emitting the search results to file, printer, clipboard or preview.
  • Expand all (Ctrl+Right) available. Note: expanding a node for the first time causes the file to be re-parsed.
  • Source Indexer toolbar is customizable. Additional commands are available that are hidden by default.
  • Source Indexer toolbar shrink mode is customizable. Use the customize pop up menu to choose between Wrap and Chevron style.
  • Source Indexer auto hide status bar (check pop up menus). When auto-hide status bar is enabled, the status bar is only visible when (re-)building the index and automatically hidden as soon as the index is built or aborted. Default enabled.
  • Assign index to Search drop down list is now optional. If enabled (default), the index word list is assigned to the search edit drop down list after rebuilding the index. For large word lists this can take considerable time during which the IDE appears locked. Disabling this option improves responsiveness after rebuilding the index at the cost of not being able to view the scanned word list in the drop down. Note: the auto complete feature work in both cases.
  • Source Indexer shortcuts are customizable in Properties | Keybindings | Indexer Shortcuts tab. Note: Indexer window must be / have been visible.

Pascal: extended parser and type operations.

  • The pascal parser supports nested types in Delphi 9 win32 mode. Also all non-class types (such as sets, aliases, meta class pointers etc) are now picked up and optionally displayed in the explorer.
  • The explorer members view displays contained (nested) types controlled by 3 filters: container types (classes, interfaces etc.), delegates and plain function pointer types, and other (unhandled) types.
  • Unhandled types are not edited in detail, but can be renamed (invoking IntelliReplace) and cut/copy/pasted, moved up /down in rearrange modes etc. Much as you'd expect.
  • Members view allows multiple selecting types such as classes. For example: select "module" node in classes view and use members view to multiple select classes to cut/copy/delete etc.
  • Most operations on module members allow a mixture of types, procedures and uses clauses. This allows you to copy / paste classes, procedures and uses clauses at once.
  • Nested classes cannot be copied. Nested non-container types can be copied, but not when mixed with class members (methods, properties).
  • Create a function from a function pointer type (delegate without the "of object" keywords) by drag/drop / copy paste the function pointer on the module node. This creates a new procedure (function) based on the function pointer signature. Similar to the existing "create event/eventhandler from delegate" when dragging/copying a delegate type on a class.

Live Metrics

  • New live metric Check Long Lines. Emits hints for lines longer than a user definable number of columns. Long Lines can be a sign of code duplication or complex expressions. Usually long lines can be refactored using Extract Method or Add Explaining Variable.

Other new features

  • Move Selection Up / Down. Moves the IDE Editor selection up / down by one line. If nothing is selected, the current line is moved up / down.
  • Find next / previous occurrenceFind identifier demo movie of an identifier: scrolls the editor to the next occurence of the word at cursor position. Searches full text including comments and strings. A hint window pops up showing the number of occurences and the current occurence number (after jumping). If the cursor is not on or immediately after an identifier the previously searched identifier is used. Default keybindings: Shift+Alt+Right/Left.
  • Convert member at cursor positionConvert Field to Property demo movie to Field / Method /Property available in MMX IDE (editor) menu. Convert field to property etc.
  • CodeGear IDEs: Alternative Win32 Object Inspector method property allows excluding certain classes. Typically used to avoid problems with certain components such as TWebBrowser without disabling the entire feature.
  • Select default class on Properties | General tab. If enabled, the cursor is positioned on the first class in a module after opening a source file. Default enabled. Now also available in CodeGear IDEs. For Visual Studio the feature has been redesigned to avoid interfering with VS navigation commands.
  • CodeGear IDEs: Open Unit. This is similar to "Use unit" (that also can open a unit), but dedicated to just opening source files rather than adding them to the uses clause. The options tab now allows adding primary files from the active project or all projects in the project group. You may assign a shortcut to this command - such as Ctrl+F12 - to re-define the IDE open unit command.
  • Edit known modules: Code Explorer maintains a list of previously parsed modules and their contained types. Several features such as "Auto complete uses clause" and navigation use this information. To exclude a module, use the Edit modules command as found on Properties | Pascal | Editing (CodeGear IDEs) or Properties | General (VS IDEs). This opens up a list with modules. Unchecking a module clears the module type information and marks the module as disabled for future sessions.
  • IDE editor: Sort text, sorts selected lines.
  • Files with non-supported encodings are displayed as an empty module with a single parsing error message rather than a messy interpretation of the input stream. Also all editing operations are blocked.

Solved bugs

  • Pascal: Rename Local would cause an AV when invoked on an entity that is not recognized by MMX (consts etc). Solved.
  • C#: Destructor attributes and comments would not be associated with the destructor method. As a result sorting or moving the destructor could result in loss of attributes or documentation. Solved.
  • C#: Live Documentation would not save destructor comments. Solved
  • Visual Studio IDEs: Select default class would interfere with VS navigation commands -such as navigating from the class browser. Solved.
  • CodeGear IDEs: Select Token and Paste did not erase the token at cursor position if IDE editor block overwrite mode was disabled. Solved.
  • C#: constructor base / this calls would not accept array initializers as in base(new int[]{1,2,3}) . Solved
  • C#: implicit/ explicit operators would not accept array types. Solved.
  • Pascal: a comment immediately following a class declaration would be erased when editing the class declaration. Solved.
  • Pascal: an unterminated string in a region name would cause an unhandled exception, leaving the explorer window empty. Solved.
  • Pascal: matching Implicit and Explicit operator implementations with declarations could cause problems if operator parameter lists were identical. Solved.