ModelMaker Code Explorer 7
MMX 7 released
On September 18 th 2008 ModelMaker Tools released ModelMaker Code Explorer 7. Check the upgrade policy to upgrade existing licenses.
Main new Features
- Delphi 2009 IDE and syntax support.
- Dock Live Documentation view independently from Explorer window.
- Normalize local variables - split, combine, sort and columnize vars.
- Multi-line surround templates and wizard - insert text before and after each selected line.
and lots more...
Delphi 2009 support
- Delphi 2009 IDE integration
- New Delphi 2009 syntax supported:
- Generic types: for example in classes, interfaces, records and delegates.
- Anonymous methods: the "reference to procedure" construct is emitted as a special delegate type. Anonymous method implementations are emitted as Live Metric hints with navigation support.
- Support for the deprecated hint directive with string comment. Note: editing the hint using MMX is not supported yet.
- Other parser improvements to make the above possible: improved asm handling, improved operator keyword handling,
- To enable Delphi 2009 syntax, make sure the pascal language mode on Properties | Pascal |Parsing is set to D2009 win32.
Dockable Live Documentation view
- The Dockable Live Documentation view is similar to the documentation pane integrated in the Explorer window, but it is a separate dockable window, allowing to make it wider than the explorer.
- Use the MMX main menu or toolbar to show the dockable Live Doc view.
- Both doc views (integrated and dockable) can be used at the same time. However, do not modify text through both views at the same time. The views are not linked in edit-mode: when entering text in one view, the other view will not be updated until the documentation is committed and source is reparsed.
- Both views share the same toolbar customization. Customizing one will affect the other (after restart).
Normalize and Sort local vars (Pascal)
- Add Local Var and Add Explaining Var insert new variables sorted according to the variable sorting scheme (see below: sorted on name or type name). Setting the sorting scheme to unsorted, appends new variables like in previous versions.
- "Normalize Local vars" - optionally normalizes (splits or combines) and / or sorts local variables for selected method(s) or for the method at editor cursor position. Options for this feature are found on Properties | Pascal | Sorting.
- Normalize operates on methods, procedures and nested procedures. Normalizing a method or procedure will not automatically normalize nested procedures - these must be included in the selection or normalized separately.
- Variable normalization is set to "unchanged", "split combined variables" or "combine variables with the same type name"
- Split combined vars breaks up combined var declarations like so:
var
I, J, K: Integer;
// becomes:
var
I: Integer;
J: Integer;
K: Integer;
- Combine vars with the same type name normalization mode does the reverse and combines vars with the type name into a single declaration.
var
I: Integer;
J: Integer;
K: Integer;
// becomes:
var
I, J, K: Integer;
- Sorting is optionally disabled, on var name or on var type name + var name
- Optionally vars are aligned in columns like so:
var
A : Integer;
Delta : Integer;
ExtraLong: Integer;
- Command "Normalize Local vars in Module, normalizes local vars in all (nested) procedures and methods in the entire unit.
- When normalizing vars, comments placed on the lines before the var are maintained and moved with the var. Other comments are removed.
- Compiler directives inside a var section are removed when normalizing. To avoid this, you'll get a warning that allows skipping this section - showing a preview of the "normalized" var section.
- Example:
varbecomes in split combined vars mode:
J: Integer; // J- comment
// I - comment
I: Integer;
{$IFDEF SOMETHING}
K: Integer;
{$ENDIF}
varand becomes in combine vars mode:
// I - comment
I: Integer;
J: Integer;
K: Integer;
var
// I - comment
I, J, K: Integer;
Other New Features
- Search bars on IDE editor toolbar and in Explorer window will now show all classes and their members if the search text is empty. This allows using it to look up a member if you do not know its name. Activate (focus) the drop down window by pressing the Up or Down in the search edit.
- Search bar Options include: "sub string search" and "case sensitive search". Check popup menu and Environment Options | General | Searching.
- Options Show procedure nesting level - if enabled, nested procedures are displayed indented according to their nesting level. If disabled, nested procedures are indented by one irrespective of their nesting level. Check tab Properties | General | Display, Default = enabled.
- Pascal: Property dialog Presets support applying read/write method binding and visibility. This allows you to create a preset for a property with virtual protected methods. When applied the preset will change access to method(s), change method binding and method visibility - all in a single click.
- Pascal: uses clauses are added with uses keyword on a separate line, like so:
uses
FirstModule, SecondModule; - Uncommenting using Toggle comment, removes the auto-inserted comment test if this is unchanged.
- Pascal: Several (most) operations on methods automatically insert missing method declarations. (a la Class Completion). For example: Edit Method, Change visibility, Change method signature (binding etc) through Entity Insight.
- Pascal: Making methods abstract, offers to remove non-empty implementations. If the implementation is left, it is commented.
- Pascal: Adding an Implicit or Explicit conversion operator mark this as overload and additionally mark any existing conversion operators overload.
- Pascal: Adding an event with event dispatch method offers to mark existing methods with the same name as the dispatch method, as overload.
- Add (explaining) var: name is now a combo box with listing previously used var names. Particularly useful for Add Explaining Variable.
- Several plain text commands available for non-source files such as .dfm's: Find next/previous identifier, duplicate selection, move selection up/down, sort text and Undo last MMX operation.
- New "Multi line" style added to Surround templates. In this style the template prefix and suffix are inserted at the beginning and end of each selected line.
Optionally existing code is converted to a string. This style is very useful when working with SQL or XML formatted text or any other text that is not Delphi or C# code.
For example - assume a template with prefix Sql.Add(' and postfix ');
select * from Customers
where Name = 'Abc'
// after applying the template:
Sql.Add('select * from Customers');
Sql.Add('where Name = ''Abc''');
- Multi Line surround wizard: based on Multi Line style surround templates. Lets you enter prefix and postfix texts and inserts these before and after each selected line. Saves you creating a template for less common cases. Available from the "Surround" sub menu.
C# version 3 support
- Auto implemented properties supported.
- The partial method modifier is supported.
- The extension method this parameter modifier is supported.
Source Indexer
- Excluded paths may be defined in the Indexer Options dialog. This allows skipping paths including their sub directories.
- Close all tabs added.
- Pressing Escape sets focus to the IDE editor.
- Ctrl+Q clears all tabs
- If errors occur when building the index, an errors icon will be available in status bar and toolbar. Its hint shows the first 10 errors, clicking it, allows viewing (printing etc) all errors.
Solved bugs
- In some cases Apply Class Template would insert properties in the wrong place (outside the class). Solved.
- CodeGear IDEs: History navigation would only work if the explorer was visible. Solved.
- Compound names space names as "namespace Root.Test.This { } " would make it impossible to save documentation in the documentation window. Also history based navigation would fail. Solved.
- Pascal: operations like add local var could cause an access violation when invoked on deep nested (module) procedures. Solved
- CodeGear IDEs: auto Hide IDE editor toolbars could cause bad aligned IDE views such as CPU view and Welcome Page. Solved
- Pascal: Convert method to property would wrongly offer to invoke IntelliReplace for the renamed method. Solved.
- Pascal: Rename in Scope for nested procedures would fail without a message if the scope was different than the original procedure. Solved: command now works as expected when selecting containing procedures / methods.
- Pascal: In some cases "Default sort all classes and module" would show an error "nothing to rearrange", even though members where rearranged OK. Solved.
- Pascal: The Delphi parser could enter an endless loop under some rare conditions. Solved.
- Pascal: The Delphi parser would not accept reserved words in qualified names in type aliases such as A = System.Object; Solved.
- CodeGear IDEs: Select Token + Copy/Cut with default keybindings Ctrl+C / Ctrl+X would not work in non-source files. Fixed.
- Add local var, field, method, property etc. would in some cases fail, silently or with an error message - due to uncaught exceptions when trying to detect type and or name for the new entity. Solved.
- The type name wizard in Type selectors did not suggest a type name at all - introduced in MMX6. Solved.
- Settings defined on Properties | Excluded modules were not saved between sessions. Solved.
- Properties|[Language]|Editing "Use IDE settings" would not always copy settings from IDE. Solved.
- In some cases Entity Insight combos would be bad aligned. Solved.
- Several minor fixes, such as text and alignment changes.


Entity Insight