Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between open project and import project in Intellij?

When first starting up Intellij IDEA you are given some quick start options which include Import Project and Open Project. What is the difference between these two options?

According to the answer in Difference between open and import a project in androidstudio open is used for existing projects and import is for migrating from other environments. However when testing, I am able to open both [existing projects already in Intellij and projects from other IDEs] using either Import or Open project.

I am wondering if the meaning is different for Intellij vs Android Studio.

Note: I have never used Android Studio so please excuse me if it shows the same behavior.

like image 653
Joey Avatar asked May 18 '16 15:05

Joey


People also ask

What is import project?

Project Imports Scheme is a concept, unique to Indian Customs, wherein all the goods imported for the purpose of setting up of Industrial Project or substantial expansion of existing industrial projects is subjected to single classification under heading 98.01 of Custom Tariff Act, 1975 and subjected to single rate of ...

How does importing differ from just opening the document as normal?

The difference is that opening files makes them their own scene, while importing merges the saved file into the current scene.

How do I open an import project in IntelliJ?

Launch IntelliJ IDEA. If the Welcome screen opens, press Ctrl+Shift+A , type project from existing sources , and click the Import project from existing sources action in the popup. Otherwise, from the main menu, select File | New | Project from Existing Sources.

Can we import 2 projects in IntelliJ?

Most IDEs provide workspaces that contain multiple projects and thus enable you to work on mutliple projects in one instance of the IDE.


2 Answers

Basically you can use Open every time as it works both for new and existing projects.

The only additional feature of Import is that you can set new project name and location if you wish to and additionaly do some basic config stuff such as Add Framework support (but thiis you can do even if you open project later). My personal preference is to use only Open as Import is rarely necessary for me.

like image 87
Vojtech Ruzicka Avatar answered Oct 23 '22 18:10

Vojtech Ruzicka


At least for IDEA 2018.1 and 2018.2, there're extra differences when working with Gradle projects:

  1. .idea/libraries/*.xml and .idea/modules.xml are only generated in case the project was opened. They're not in case it was imported.
  2. The generated .iml files are slightly different (the imported version doesn't list any libraries, so I assume IDEA relies on the underlying foreign project model for imported projects).

Since it works both ways, I prefer importing projects as it results in less IDEA-specific generated files.

like image 2
Bass Avatar answered Oct 23 '22 16:10

Bass