Refactoring

Code refactoring is the process of improving the source code of a program without changing the overall result. Generally, code refactoring improves code readability and maintainability. 

The VS Code extension supports various refactoring techniques like renaming, searching, and previewing of CFCs, CFMs, and UDFs at the project and workspace levels.

Refactor CFC or CFM filenames

When you rename a CFC or CFM, you can refactor all valid instances of the CFM or CFC, including all references to the CFM or CFC.  

  1. Right-click the file in the Project Manager.

  2. Select Rename. 

  3. Enter the new name and preview the changes. Click Show Preview. 

  4. When you preview the changes, you can review the selected instances and de-select any instance that you do not want to rename. 

Reference search

Check where the refactored UDF or CFC or CFM has been used in the project.

Right-click the file and select Find File References.

Refactor function or variable

When you rename a function or variable, you can refactor all valid references of the function or variable.

  1. Right-click the function or variable. 

  2. Click Rename Symbol. 

  3. Enter the new name and hit Shift + Enter. 

  4. The Refactor preview appears at the bottom. 

 Adobe

Get help faster and easier

New user?

Adobe MAX 2024

Adobe MAX
The Creativity Conference

Oct 14–16 Miami Beach and online

Adobe MAX

The Creativity Conference

Oct 14–16 Miami Beach and online

Adobe MAX 2024

Adobe MAX
The Creativity Conference

Oct 14–16 Miami Beach and online

Adobe MAX

The Creativity Conference

Oct 14–16 Miami Beach and online