Move Namespace Dialog
The dialog is available only if the PHP plugin is installed and enabled. The PHP plugin is not bundled with IntelliJ IDEA, but it can be installed on the Settings/Preferences | Plugins page as described in Installing plugins from JetBrains repository.
The dialog opens when you select a PHP namespace to be moved and chooseon the main menu or from the context menu of the selection.
IntelliJ IDEA supposes that the namespaces in your project are arranged in compliance with the PSR0 standard and enforces you to retain the folder structure and the namespace hierarchy in accordance with this standard when moving namespaces.
When you specify a namespace to move a namespace to, IntelliJ IDEA automatically updates the Target Destination Directory field, which shows the path to the folder that corresponds to the namespace in question.
|New Namespace Name||When the dialog opens, the field shows the fully qualified name of the selected namespace. Specify the new namespace name. Use only backslashes |
|Target Destination Directory||When the dialog opens, the field shows the path to the folder corresponding to the current namespace.|
The path is displayed in the following format:
...\<project root>\<current namespace folder relative to the project root>The path is updated automatically as you specify the new namespace name. However, if you are going to move a namespace to another parent namespace, IntelliJ IDEA will not suggest the proper folder unless you appoint a root folder for your namespace structure by marking the relevant folder as Sources on the Directories page of the Settings/Preferences dialog Ctrl+Alt+S.
Do one of the following:
Click this button to open the Move Files with Related Namespaces dialog and specify the classes and files to be moved to the new namespace and the new folder.
The upper pane of the dialog lists the destination namespaces and folders for classes and files related to the namespace. Each item in the list corresponds to a class/file. When you move the cursor to an item, the bottom pane shows the contents of the file related with it.