WebStorm 2016.1 Help

Move Refactorings

On this page:

Move Refactorings: Basics

The Move refactorings allow you to move files and directories within a project. So doing, WebStorm automatically corrects all references to the moved symbols in the source code.

The following Move refactorings are available:

  • The Move File refactoring moves a file to another directory.
  • The Move Directory refactoring moves a directory to another directory.
  • The Move Static Member refactoring moves a static method, variable, or constant from one class to another.

Moving a File or a Directory to Another Directory

To move a file or directory to another directory, follow these steps:

  1. Select the file or directory in the Project tool window.
  2. Do one of the following:
    • On the main menu, choose Refactor, and then choose Move.
    • On the context menu of the selection, choose Refactor, and then choose Move.
    • Press F6.

    The dialog that opens depends on the type of the selected symbol.

  3. In the To directory field, specify the folder to move the selected file or folder to. Choose an existing folder from the drop-down list or type the full path to the parent folder to be created.
  4. To have the references to the selected file or folder updated according to the refactoring result, select the Search for references check box.

See Also

Last modified: 11 July 2016