Command: Refactoring – Rename <…>
Function: The command opens a dialog for renaming an object or variable throughout the entire project.
Call: menu; context menu
Requirement: An object is selected in the device tree or in the POUs view, or the cursor is positioned before or on a variable identifier in the declaration part of a POU.
You can rename the following:
- Variables 
- POUs 
- GVLs 
- Methods 
- Properties 
- Devices 
- Variables and unit conversions in the unit conversion edit 
Dialog: Rename
| Current name | Name of the object or variable | 
| New name | Input field for a new name If the name already exists, then CODESYS reports this directly below this input field. | 
| OK | Can be enabled if you have specified a valid name in New name Opens the Refactoring dialog The relevant objects and locations are highlighted in both views. | 
Dialog: Refactoring
| The dialog displays all occurrence locations in the project. The relevant objects and locations are highlighted in both views. | |
| Right view | Displays the occurrence within an object where Current name occurs | 
| Left view | Device tree of the project with the object | 
| In both views, you can define what should be done for each location of occurrence. To do this, the following mechanisms are provided in the context menu: | |
| Reject this change | Reject the single change in view on the right | 
| Accept this object | Accept all changes in the relevant object | 
| Reject this Object | Reject all changes in the relevant object | 
| Accept Whole Project | Accept all changes in the project | 
| Reject whole project | Reject all changes in the project | 
| CODESYS highlights the accepted changes in yellow and the rejected changes in gray. | |
For more information, see: Refactoring