open projects without UI and programmatically

I am developing a plugin that can open multitple android projects in Intellij IDEA (~1000 projects) and analyze source files of those projects. I am finding a way to open a project with no UI and programmatically, analyze the project and close it, open a new one, and so on.
I tried ProjectManagerEx.getInstanceEx().loadAndOpenProject(), ProjectManager.getInstance().loadAndOpenProject() but none of that methods works and they require .ipr file, I don't see any .ipr file in any Android projects. Does anyone know how to open (import) a project with no UI and programmtically ?

Thanks.

2 comments
Comment actions Permalink

They don't require the .ipr file; they can work with the .idea directory as well. Do your projects have the .idea directory?


0
Comment actions Permalink

Some of them have .idea folder for example (https://github.com/martinchodev/RedPanal-Android-WebApp), but some doesn't have for example (https://github.com/stephanlindauer/criticalmaps-android). I don't know why some doesn't have, maybe the developers put the .idea folder in .gitignore file. I can filter out all project that doesn't have .idea folder. The thing is that when I tried to open using ProjectManager.getInstance().loadAndOpenProject() in initComponent() of an ApplicationComponent. The IDE just stucks in loading screen. When I open aproject manually it works and It opens in a new window.

Could you find a way for me ?

Thanks.

0

Please sign in to leave a comment.