TheMethod
TheMethod

Reputation: 3001

Intellij project opening directory above project

I feel kind of silly asking this but I've been poking around and I don't know what is causing it. I have a directory structure that has a number of projects in it, it looks like this:

projects_root/project1 projects_root/project2 projects_root/project3

When I open any of these projects with Intellij it instead opens up the projects_root directory, so that all the projects in the directory are opened under my project tab. This is annoying as it clutters up my project view and it's causing some issues with my debug configurations etc. The strange thing is this was working fine until yesterday, that is opening project1 would open at the root of project1 instead of projects_root. I've changed no settings, the behaviour seemed to just start out of the blue. Has anyone seen behaviour like this before? Could anyone recommend a fix for this?

Upvotes: 1

Views: 384

Answers (1)

Sam Berry
Sam Berry

Reputation: 7844

It appears that the content root of your IntelliJ project is incorrect. I can't tell you the cause for why this happened but you should be able to fix the content roots without needing to recreate each of the projects.

For each project, open up the respective IntelliJ project and follow the steps for removing a content root for all of the non-applicable content. E.g., for project1 remove projects_root/project2 and projects_root/project3.

Upvotes: 1

Related Questions