As I know for now there is no any feature to do that in intellij idea. I dont know why but they dont support to do that, at least this is the result which I found with all my researching. Maybe some of us manage this problem with different ways. How do you work with multiple modules in intellij? How should I increase the performance while working with multiple projects?
-
Surely you just want 'right click module' --> 'remove module' – planty182 Dec 17 '14 at 10:53
5 Answers
Closing unused modules in intellij idea like in eclipse?
You can make that module directory as excluded from that project.
Right clicked on the directory, then goto Mark Directory As
-> then click Excluded
it
To Add a module back, click on Project Structure
button, then goto Modules
section, then you can add them back

- 31,165
- 11
- 75
- 105
-
I saw, thank you, here is my last question so can we suppose that this is equiavelant to eclipse's close-open project process? – Mustafa Güven Mar 20 '14 at 09:11
-
@MustafaGüven, I never used eclipse. So, no idea about eclipse behavior. Accept the answer ;) – Abimaran Kugathasan Mar 20 '14 at 09:12
-
-
this is not working for android because when I run the project to build all excluded projects come back again. – Mustafa Güven Mar 20 '14 at 10:02
-
@MustafaGüven, build is based on Maven pom or gradle build file, not depend on IDE. – Abimaran Kugathasan Mar 20 '14 at 10:04
-
1Works great for a maven project. Excluded modules are correctly bypassed and fetched from the maven repository. It is much faster for large projects if you want to modify only a few modules. – A21z Aug 07 '14 at 17:45
-
1this worked fine while building from maven, but still the IDE is marking the classes in other modules that depends on the excluded module with red errors. – Vegegoku Nov 07 '16 at 10:52
-
even after excluding the module, the intellij search results shows the files from this excluded module. Is there a way to not show results from this excluded module – firstpostcommenter Jul 29 '19 at 11:30
In Intellij 2017.2, you can easly load/unload modules or groups of modules :
- Right click in the "Project" view
- Select "Load/Unload modules"
- Select modules to load/unload and click OK button
Warning : This is an "experimental" feature
Ref : jetbrains site

- 2,004
- 1
- 20
- 22
-
2Works great, this should be the accepted answer as of IntelliJ 2017.2 ! – Sébastien Nussbaumer Aug 28 '17 at 08:40
-
3I cannot get this to work; a module that depends on an unloaded module cannot compile. The expected behaviour (like in eclipse) is to fetch unloaded module from maven repo and compile. – Jonas Andersson Nov 23 '17 at 11:52
The Offline Module plugin let you disable or enable modules in project without deleting.
Click Disable Module
in context menu in Project View, it disables the selected modules. Disabled Modules are shown in a group and can be add back by Load Module
.

- 9,848
- 3
- 55
- 69
-
1This is exactly what the OP requested (and what I want, too)! Thanks for the link. – Malina Kirn Jan 29 '15 at 22:44
Projects in Eclipse are Modules in IntelliJ. I do not recommend using them the same way - ie importing unrelated projects as modules into one IntelliJ project.
Importing for example database project and application project into one is ok, or when working on one project means working on another. But when you import too many projects into one, you will have a problem with searching and "Go To File/Class" actions, and you will use too much heap space.
Generally, when you have a lot of opened projects, there are three problems
- too much used heap -> GC pauses.
- switching between them is hard
- closing and reopening a lot of projects is hard
To solve this, I have made Frame Switcher plugin for easier switching between projects, and reopening closed ones. Also, when you have 32 bit Windows and have too many projects, then you need to start new IntelliJ instance, and Frame Switcher can integrate them.
There is also Missing Functionality plugin which lets you "Close All Other Projects".

- 12,020
- 7
- 45
- 52
Since the old "Offline Module" doesn't work, I made a plugin to utilize the mechanics of "Mark as Excluded" to quickly show/hide multiple modules.
Link to module here: https://plugins.jetbrains.com/plugin/7803?pr=idea

- 89
- 1