Refactorings in MMX Code Explorer for Delphi
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.
Sorting and rearranging your code helps to keep your code organized. Sorted code
makes is easier to maintain and to navigate in.
Whether you group related members based on functionality or
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 …
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 …