New Features in ModelMaker Code Explorer for VS 1.05
Generic new features
- Documentation Pane shows documentation for entity at cursor position. Controlled by Properties | Documentation tab.
- Collapsible Type Selector in all dialogs that use a type selector. Expansion/Collapsing to a to simple combo box is controlled with button to the right of the type name edit. The user definable type presets can be assigned to the type drop down list.
- Parameter Wizard: a structured editor to add, edit, delete and rearrange (move) parameters. Invoked in several places. Keyboard shortcut Ctrl+P and button next to the parameters edit on the delegate dialog invokes this wizard.
- Add Parameter refactoring invokes the Parameter wizard and allows adding / rearranging multiple parameters. The token at editor cursor is used as default parameter name.
- Rename Parameter refactoring invokes the Parameter wizard and allows renaming multiple parameters at once. Renamed Parameters are optionally propagated in method code.
- Method (and Pascal Procedure) dialogs have an Integrated Parameter wizard:
- A button to the left of the Parameters edit shows / hides the integrated wizard.
- While the wizard is enabled, the parameters edit is disabled.
- Parameters renamed with the integrated wizard are propagated in method code for "Edit Method" - obviously not for "Add Method".
- Renaming Parameters uses a "Don't ask me again" style dialog for confirmation. Renaming and Confirmation style is controlled on the Properties|{Pascal|C#}|IntelliReplace tab.
- In several Dialogs seldom used options are now collapsible. Check for example the C# Delegate or Pascal Method and Property dialogs.
- The default rename scope for Rename Local (method, class, module) is adjustable on the [Language]|Editing tab.
- The Language|Parsing options have an option "Compress Parameter Lists" which if enabled removes duplicate spaces from parameter lists. Default is enabled.
- When switching between modules, the explorer no longer (re-)positions the editor cursor position.
- Surround With Template predefines macro <!token!>. This expands to the selected text or the identifier at cursor position.
- Surround With Template allows using user macros in templates. When applying the template you'll be prompted for values. For example: <!class!>.Create(<!params!>);When applied, you'll be prompted for values for class and params
- Try.. finally wizard: acts like a smart surround template, looking at the preceding code to determine the code for the finally block. Customizable using a look-up list in file TryFinallyWizard.txt in the shared directory, for example "C:\Program Files\ModelMakerTools\Shared". Check this article for details. Default shortcut is Ctrl+Alt+J (similar to Delphi's Ctrl+J to invoke a template).
- Surround with Default Block Wizard: acts like a smart surround template to enclose the selection or line in a begin end or { }.block. Indention is smart and derived from the code preceding the selection. Default shortcut is Ctrl+Shift+B.
- Local Var, Field and Parameter Wizard use Hungarian type look up when clicking the "other.." type in the type selector.
- 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.
.NET Assembly import / extraction
Class and interface definitions can be extracted from .NET framework 1.1 and 2.0 assemblies and emitted as pascal or C# source files. Read Article...
Currently only class, interface and delegate types are imported - records / structs are skipped. Nested types are skipped. You'll get warnings when applicable. .NET Attributes and documentation as conatined in the assmebly are skipped.
Utility is available from the MMX|Tools menu
Chrome Pascal Support
From MMXVS v1.05 onwards, .pas files are interpreted as Chrome pascal only. Delphi pascal syntax is only available in the Borland IDE integrated Code Explorers.
The v1.05 parser recognizes all Chrome syntax - except generics. The editor and dialogs have been updated to support most syntax options. The editor currently does not support: field and method implements directives, event add/remove syntax. Interface property syntax is working, but not as easy as it could be.
New Pascal Features
- Whenever access is changed in the Property Editor dialog, the read / write code options are preset according to the preferences (Project Options| Coding Style).
- Add Local Var improved: new vars are appended after the last existing var in the last var section. If no var section exists, the var section is added after all local procedures, consts, labels etc. Also, you'll get a warning when adding a variable that already exists. Similar logic applies to Add Explaining Var.
- Add Field uses a similar approach as Add Local Var and looks for the assigment statement rather than just using the word at cursor position. To override this behaviour, select the field name.
Pascal String and Number conversion wizards
- The Convert String to const refactoring allows selecting the scope for the extracted const:
- Module: defines the extracted string globally in the current module - identical to the previous behavior.
- Local: defines the extracted string as a local const in the current method.
- External File: defines the extracted string globally in the interface section of a different file. The unit is added to the implementation's uses list. Placing const in a external file is commonly used to centralize strings.
- Similar, the Module String Conversion Wizard allows defining the extracted string in either the current Module (like previously) or an external file. The Module String Conversion Wizard uses the settings (scope and external file name) as defined on the Properties | String Conversion tab.
- String Scanner Options are now in separate tab in options dialog
- Default conversion type may be selected (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).
Pascal Module string conversion wizard
- Module string conversion wizard uses a regular expression to filter lines of code when extracting strings.
- Module string conversion wizard uses a regular expression to filter strings when extracting strings.
- In addition to converting a string to const , the Module string conversion wizard can mark a string as unlocalized. It does this by appending a user definable // comment to the line containing the string - defaults to // do not localize
- Module string conversion wizard is case-sensitive and treats 'Hello' and 'hello' as two different strings.
- Module string conversion wizard preview dialog scrolls the IDE editor to the line containing the string.
Solved bugs C#
- Extract Method would omit the () in the call to the extracted method if the extracted method had an empty parameter list. Solved
- Attributes containing strings would not be associated with entities. As a result, sorting would erase these. Solved.
- A class without ancestor specification would interpret the first supported interface as ancestor. This is due to the fact that Code Explorer uses a single pass parser rather than compile all code. As a work around for this problem, interfaces defined before the class in the same unit, are now recognized. Also, if the ancestor starts with 'I' or the Interface name prefix as defined on the C#|New Entities tab, and the next character is an upper case letter, the ancestor is assumed to be an interface. Interpreting ancestors as interfaces can be disabled by setting string value "HKEY_CURRENT_USER\Software\ModelMaker\MideX\3.0\C#\Preferences\Delphi 7\FixAncestors" to "False".
- Convert to Const would replace the constant with the suggested identifier rather than the identifier name after editing. Solved.
Solved bugs Pascal
- Rename Local with a scope other than method would not include the method implementation declaration lines. As a result Rename Local could not be used to rename a method in class / module scope. Solved.
- Making a property override in the Property Editor Dialog would not reset access to none. Solved
- Rebuilding a parameter list with identical optional parameters as "I: Integer = 0; J: Integer = 0;" would result in bad syntax: "I, J: Integer = 0". Solved, default parameters are no longer combined


Live Documentation