I am using IntelliJ for working on Java Modules of my app. However, one of the modules is disappearing form the Project explorer randomly. This module was not originally added to the Project Explorer when this workspace was created.
Do I need to explicitly save some settings or do I need to save the work-space in a specific way such that it doesn't disappear?
FYI, How am I adding a project in my work-space: Go to "Project Structure" -> Alt + Insert -> Import Module -> Select .iml file of my module -> Click on "Ok"
The Project is now visible in Project->Packages on left hand side navigation view. But after may be an IntelliJ restart, it will be gone and I'll have to import again to see its files.
Note : I understand that the question could be quite on a broader context, but as a new developer on IntelliJ platform, I am looking for a setting change which can fix this. I believe the project or code has nothing to do with it. However, I can certainly be wrong, but my intent is to only understand if this is some customizable behavior of IntelliJ.
So it turns out that I was checking at the wrong places for the fix. The actual culprit was here:
Project -> Settings -> Maven -> Ignored Files
The pom.xml
file of the Project that was disappearing was marked as ignored here. That's why I was having to import the module every time I would restart IntelliJ. But post the restart, the module was being removed considering it is to be ignored.
Uncheck the pom.xml from above setting.
EDIT
Apart from above fix make sure your modules are loaded in IDEA IntelliJ. Right click on Project View -> Load/Unload Modules.. -> Verify that the module is among loaded ones.