Renaming a project in IntelliJ IDEA

前端 未结 13 1346
無奈伤痛
無奈伤痛 2020-12-07 14:48

I have some projects where the directory containing the project is called \"Code\".

When I open IDEA, in my recent projects list all I see is that name.

Is t

相关标签:
13条回答
  • 2020-12-07 15:06

    Once you have changed the project name by following the other suggestions mentioned in this thread, you can also change the module name within the project settings -> Modules:

    This will change the name that is included within the brackets just next to the name of the project:

    After this, proceed to refactor and rename the class that contains the main method to match your new project name. (This class is normally auto-generated by intelliJ after creating a new project).

    That should do it. Cheers!

    0 讨论(0)
  • 2020-12-07 15:11

    intellij project structured in folder

    I completed the renaming as below.

    The attached image is structured in project folder.

    Must make changes in the xml into a new project name.

    1. close IDEA intellij (14.0.2)

    2. change intellij project name (folder)

      e.g) old_project_name -> new_project_name

    3. change .idea in folder

    We have only changed the

    1) artifacts in folder -> xml

    2) runConfigurations in folder -> xml

    3) modules.xml

    4) workspace.xml

    5) [your_project_name].iml

    (Depending on your project structure, your folder may not contain xml)

    1. restart IDEA intellij

    2. File -> Import Module...[your intellij project]

    I hope this helps you :)

    0 讨论(0)
  • 2020-12-07 15:15

    If your project is file based, you cannot rename the project from within IDEA.

    Convert your project to a directory based format, and then you will have the option to rename it under "File > Project Structure > Project > Project Name".

    0 讨论(0)
  • 2020-12-07 15:17

    Following are the steps to be followed in IntelliJ Idea Community Edition:

    1. Go to File >> Project Structure >> Project > Project Name Update project name with its new name.

    2. Go to pom.xml Update project name with its new name in the

    3. Select "Project" view and click root folder of the project then refactor its name.

    4. Exit IntelliJ Idea and Rename root folder name in the windows directory structure where this project repository is stored.

    5. Restart IntelliJ Idea and import the project using "Import project from existing resource" option.

    0 讨论(0)
  • 2020-12-07 15:20

    Am using intellij 2017.2.6

    • Go to project view

    • Right Click on the top root element

    • Choose Refactor-> Rename

    • Small dialog appear -> enter the desired name

    • Click ok

    0 讨论(0)
  • 2020-12-07 15:21

    Actually this is a maven project and its name is defined from the maven pom.xml So if you want to change the name you need to change its name in pom.xml
    from

     <artifactId>Code</artifactId>
    

    to

     <artifactId>My-prject-name</artifactId>
    
    0 讨论(0)
提交回复
热议问题