Go Up to Refactoring Procedures Index
Refactoring refers to the capability to make structural changes to your code without changing the functionality of the code. Code can often be made more compact, more readable, and more efficient through selective refactoring operations. Appmethod provides a set of refactoring operations that can help you re-architect your code in the most effective and efficient manner possible.
Refactoring operations are available for Object Pascal and C++.You can access all refactoring commands from the Refactor menu or from the context menu in the Code Editor.
The Undo capability is available for all refactoring operations. Some operations can be undone using the standard Undo (
CTRL+Z) menu command, while the rename refactorings provide a specific Undo feature.
Refactoring Operations Supported only in Code Editor
When editing your Object Pascal or C++ code in the Code Editor, you can employ:
- Refactor > Rename
- Refactor > Declare Variable
- Refactor > Declare Field
- Refactor > Extract Method
- Refactor > Extract Resource String
- Refactor > Change Params.
- Refactor > Find Unit
- Search > Find References
- Using Sync Edit mode
- Renaming identifiers using Refactor > Rename (Object Pascal, C++).
- Declaring new variables using Refactor > Declare Variable (Object Pascal).
- Declaring new fields using Refactor > Declare Field (Object Pascal).
- Creating a method from a code fragment using Refactor > Extract Method (Object Pascal).
- Converting a quoted string to a resource string using Refactor > Extract Resource String (Object Pascal).
- Changing parameters of procedures and functions using Refactor > Change Params.
- Finding and adding units using Refactor > Find Unit (Object Pascal).
- Finding References (Object Pascal) using Search > Find References (Object Pascal, C++).
- Using Sync Edit mode (Object Pascal, C++).
Refactoring Operations Supported in both Code Editor and Modeling Views
In Code Editor and in Diagram View and Model View (used in UML Modeling), you can employ:
- Moving Members using Refactor > Move.
- Extracting Interfaces using Refactor > Extract Interface.
- Extracting Superclass using Refactor > Extract Superclass.
- "Pull Members Up" and "Push Members Down" using Refactor > Pull Members Up and Refactor > Push Members Down.
- "Safe Delete" using Refactor > Safe Delete.
- Creating Inline Variables using Refactor > Inline Variable.
- Introducing Fields using Refactor > Introduce Field.
- Introducing Variables using Refactor > Introduce Variable.
- Opening Refactorings Pane using View > Refactorings.
- Refactoring Overview
- Symbol Rename Overview (Object Pascal, C++)
- Declare Variable and Declare Field Overview (Object Pascal)
- Extract Method Overview (Object Pascal)
- Extract Resource String (Object Pascal)
- Change Parameters Overview (Object Pascal)
- Find References Overview (Object Pascal)
- Sync Edit Mode (Object Pascal, C++)
- Refactoring Operations Supported in Modeling Tools