Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to rename / move a project in Intellij Idea 12?

As stated here one can change the name of a project. However, it only changes the name of the project and it will not change the folder structure.

As an example if your project is called sample1 and it resides ~/user1/development/IdeaProjects/sample1, the folder location won't be changed to ~/user1/development/IdeaProjects/sample2 if one changes the project name to sample2.

like image 687
sheidaei Avatar asked Aug 28 '13 16:08

sheidaei


People also ask

How do you rename a project in Java?

To rename the project, simply right-click the project and select "Refactor/Rename...". Fill in the new name and click OK.

How do I change folder structure in IntelliJ?

From the main menu, select File | Project Structure Ctrl+Alt+Shift+S and click Modules. Select the necessary module and open the Sources tab. to the right of the necessary folder (folder path). Specify the path relative to the output folder root, and click OK.

How do I move a package in IntelliJ?

Move Package DialogClick the ellipsis button, and select the target package in the Choose Destination Package dialog that shows a tree view of all packages within the project. The content of a package is moved along with the package from the old location to the new destination package.

How do I rename a feature in IntelliJ?

js project in IntelliJ. The only way to rename files seems to be Shift+F6 which attempts to find all usages which takes too long (~30s - 1min).


2 Answers

It seems that one has to right click on the project (after following the instructions to rename the Project), then choose Refactor -> Move to relocate project to the new location. I didn't find any solution to rename and move a project at once.

like image 184
sheidaei Avatar answered Sep 24 '22 14:09

sheidaei


  1. Right click on project, then Refactor -> Rename... (shift+F6), set desired name
  2. Close IntelliJ
  3. Rename directory in your filesystem to your desired name
  4. In startup dialog select Open (or File -> Open... in main window)
  5. Please select renamed project directory

Enjoy, it work's for me!

like image 20
Dawid Naczke Avatar answered Sep 23 '22 14:09

Dawid Naczke