AppCode 2016.3 Help

Rename Refactorings

On this page:

Basics

Rename refactorings allow you to rename with all the references to them in the code corrected automatically.

Examples

Renaming a symbol

To rename a symbol, follow these general steps

  1. Select the item to be renamed.
    • To select a file, click the desired file in the Project tool window.
    • To select a symbol in the editor, place the caret at the name of the symbol to be renamed.
    • To select a symbol in the Structure view, click the desired symbol in the Structure tool window.
  2. Choose Refactor | Rename on the main menu or on the context menu, or press ⇧F6.
  3. Preview and apply changes.
    AppCode_RenameRef.png

Renaming a file or directory

To rename a file or directory

  1. Select a desired file in the Project tool window.
  2. Choose Refactor | Rename on the main or context menu or press ⇧F6.
  3. 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.
  4. 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.

Important notes

See Also

Last modified: 28 March 2017