How do I rename my entire project in IntelliJ without having so many manual steps? - intellij-idea

I have IntelliJ 2019.2
I occassionally mis-name my project during creation.
I have to quit IntelliJ, renaming the folder, opening project again and renaming package and project module manually as well.
Any way to improve this?

Please follow the discussion on the issue: Renaming a project in IntelliJ IDEA
There are project, module name, name in file system etc that can all be different and can be renamed. Rename of folder can be done in file system, project, module rename in the Project Structure settings.

Related

Module is not listed in IntelliJ "Run Configuration"

Setup:
I have imported the Git project into IntelliJ.
I compiled the project using "make compile"
Issue:
I tried to create a "Run Configuration". The Module is not listed in the drop-down window.
Debugging:
I compared it with a working setup wherein a project was created using "File->New Project" and wherein .iml was automatically created. I see that the problematic project does not have a .iml file. I could not make out any other differences.
Is the absence of .iml file the root-cause for the issue? If so, how to generate this .iml file? Rather than manual writing, I prefer to generate it using GUI to avoid any manual errors. Please suggest.
In Eclipse IDE, one can convert a project from one type to another. Ex: normal project to Maven project. A default project to Java project by editing .project file.

Intellij not detecting runConfigurations xml

I imported a simple sbt scala project in Intellij idea.
Once the project is imported, I create runConfigurations directory inside .idea directory and moved all the checked in runConfigurations inside
.idea/runConfigurations.
Still I am not able to see anu run configurations.
After you have imported the .run/****.xml file in the project folder, close the PyCharm project and reopen it.

Command line generation of IntelliJ IDEA project files?

I prefer having one IDEA project per task I'm working on. If it's a Gradle project, I can run gradlew idea to generate the project files then rename them to be indicative of the task I'm working on (so that when re-opening from IDEA a project, it's obvious what the task is and IDEA is able to list several tasks for the same Gradle project). This works well enough if it's a Gradle project, but if it's not, I'm left with using the IDEA GUI to open the project by pointing to the working directory. Is there a command-line way to generate the IDEA project files so I can rename them prior to using the GUI? Being able to do this would also obviate the need for using gradlew idea for this purpose.
Using the GUI, create the project by pointing it to the build.gradle file or project root directory. Once the project is created:
click the File menu
click the Project Structure menu item
change the Project name text value

how to export intellij project

I simply want to export my java intellij project from one pc to another, no need for git because I only want to test something on the other pc because it has more memory.
Surprisingly no information on this is available, there is information on how to export a project to a jar file, but I cannot import from this jar file. On their website : https://www.jetbrains.com/help/idea/2016.3/import-existing-sources-project-name-and-location.html they don't give any clear instructions on how to do this simple operation? how is this done?
Till version 2016.3.4 IntelliJ doesn't provide such facility.
Best way to do so would be to copy the whole directory containing your project or module. Doing this would retain all your project related settings.
With the latest version of IntelliJ IDEA, all you need to do is unzip the project in the new computer and then select Open in the IntelliJ IDEA new project wizard. Do not use the option to import the project from the zip file, as that doesn't work.
Take all directories of your project and copy them into the other computer. Launch IntelliJ and open the folder of your main directory project, that is all it needs to work (*.iml files do all stuff for you). If you don't know what directory is the main, you can close the project in your other IDE and see what paths it is catching. For example in my case:

IntelliJ IDEA directory-based format and .iml file(s)

We started a directory-based project in IntelliJ IDEA (currently using version 2016.3 build 163.7743.44). Everything is fine, the .iml file is inside .idea/modules and we can easily share/update it.
The issue is that, sometimes, when someone clones the project and start using it the IDE doesn't care about that file (or project structure) and puts an .iml outside the project's root. It's an intermittent/random issue and I'm not able to reproduce it step by step.
We opted for deleting the .idea directory from Git and keep the configurations/settings in a JAR file.
Is there any way to tell the IDE to use one approach or the other? It's not a big deal, but I would like to know what's the reason behind that behavior.
The reason for that behavior may be that people don't use the "Open" action to open the project but use the "Import project from existing sources" action instead. The latter action does not use the existing .idea directory, but instead recreates the project structure from scratch. You should teach your colleagues not to use that action.
Note that storing the settings in a .jar file is not a replacement for sharing the project structure, because shared settings do not include project-specific items such as libraries and run configurations.