Refactoring Code

From RAD Studio
Jump to: navigation, search

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. RAD Studio 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 Delphi and C++.

You can access all refactoring commands from the Refactor menu or from the context menu in the Code Editor.

Some refactoring commands are also accessible from the modeling panes Diagram View and Model View.

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 Delphi 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

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:

See Also