Temporarily ignoring unused modules
Why would I want to unload modules?
To make the IDE work faster, you can unload the modules that you are not working on at the moment. IntelliJ IDEA ignores the unloaded modules when you search or refactor your code, or compile your project.
The info about the unloaded modules is not shared through version control. So you can temporarily unload unnecessary modules without affecting your teammates' project configurations.
How do I unload or load modules?
- In the Project tool window, right-click any element and select Load/Unload Modules.
- Load or unload the modules in the dialog that opens.
Are there any potential problems?
Problems may arise when there are dependencies between loaded and unloaded modules.
To illustrate, let's assume that a module A depends on a module B, and you:
- unload B while A stays loaded:
- unload A while B stays loaded:
- There will be no associated errors in your code.
- The compilation of B will be a success.
- When you invoke Find Usages or refactoring on a class, field, method, etc. contained in B, the result may be incomplete (because the contents of A are not taken into account), and IntelliJ IDEA will inform you of that.
- You may accidentally break the compilation of dependent code in A by making changes to your code in B. Because A isn't compiled when you compile your project, there will be no indication of potential compilation failure.