Refactorings in ModelMaker and Code Explorer for Delphi and Visual Studio
Unless indicated otherwise, all articles are applicable to ModelMaker, ModelMaker Code Explorer and ModelMaker Code Explorer for Visual Studio.
The samples demonstrate the features for Delphi Pascal. Where applicable the same refactorings are also available for C#.
The try..finally wizard inserts a try .. finally" statement and inserts the code for the finally block based on preceding code. The wizard can be applied on existing code in which case the selection ...
A very common programmers task is to adjust an existing method's signature.
The Synchronize Declaration / Implementation refactoring updates the corresponding signature in the declaration(or implementation) depending on the editor cursor position.
The Add Explaining Var refactoring introduces a local variable, and replaces the selected text (expression) with the variable. The variable is initialized using the selected text. Commonly used to make complex expressions more readable.
The Add Local Variable refactoring is used to declare a local variable while you're entering code in a method or procedure. The refactoring picks up the word at cursor position and determines the variable's type based on history and context. An Add Local Variable dialog is used to optionally change the suggested type.
The Surround with Template refactoring acts like a (parameterizable) dual code template. One code snippet is inserted before and the other after the selected code (or current line). Commonly used to add "if - then - begin - end" or "try - finally - end" statements around existing code.
ModelMaker Code Explorer has extended support to Sort and Rearrange Delphi and C# .NET source code.
Instant Drag- Drop Rearrange members
The Members view Rearrange Mode allows instantly dragging ...
When preparing your application for localization you'll need to deal with hard coded strings in source files.
These hard coded strings are usually either converted to a resourcestring, a constant ...
The "Extract Class definitions from Assembly" utility is used to convert classes and interfaces in an .NET assembly to Pascal or C# source files.
Both .NET framework 1.1 and 2.0 assemblies can ...
Often when you add a field or property you need to add code to the class constructor or destructor to initialize or finalize the member.
The Creational Wizard is used to centralize this process ...
Often when you add an indexer / array property you need to insert additional members that implement the indexer.
For example a field to store the values, make sure there's a constructor and add ...
Analyzing Unit dependencies is an important task in Delphi development:
It helps managing coupling and re-usability on unit level.
It helps avoiding unwanted linking of units.
When using ...
Lattix LDM for Delphi Pascal enables you to analyze the architecture of Delphi Pascal
applications in terms of units and their interrelationships based on interface and implementation uses ...