Rename refactorings allow you to rename symbols and files globally with all the references to them in the code corrected automatically.
Renaming a symbol
To rename a symbol, follow these general steps
- Select the item to be renamed.
Chooseon the main menu or on the context menu, or press N/A.
Preview and apply changes.
Renaming a file or directory
To rename a file or directory
Select a desired file in the Project tool window.
Chooseon the main or context menu or press N/A.
In Rename File dialog box that opens, specify the new file name. Select Search in comments and strings checkbox to let AppCode apply changes to comments and strings.
Press Preview to observe possible changes in Find Tool Window. Press Refactor to proceed.AppCode finds all the occurrences of the file name and changes them respectively.
- Local variables are renamed in-place.
To be able to use the Rename dialog when renaming local variables, you should disable in-place refactoring in the editor settings.