Detect and create custom language module (project from existing sources /version control)

Whenever I open a folder or check out a project intellij creates a Java module for that workspace. Is there any way I can intercept this step and detect that this folder/project uses a different language and build system and create the correct type of module instead of the java module.

I have implemented projectOpenProcessors but this only shows a small notification after a java module/project has been created, and while it lets me set up the project correctly if the user clicks “load“ it does have some issues like name conflict with the existing (unnecessary created) java module that i would like to avoid.

Please do not do that, ModuleType is deprecated. Better assume that all modules have the same type and do not rely on them. Check relevant modules at runtime via respective APIs of plugins, such as com.intellij.java.library.JavaLibraryUtil for Maven libraries/dependencies.

There has to be a better way than to let intellij make a Java project do all the indexing and what not, only for me to tell the user at the end of it that this is the wrong project/module type, delete it and re-create it with the correct type.

if the ModuleType is deprecated, then where should language specific configuration for a given module be configured ? i need custom configuration kinda like how flash/flex modules

like this:

Module type breaks all cross-language features for users, so we no longer implement them, this is an obsolete way of implementing support for languages and frameworks.

if the ModuleType is deprecated, then where should language specific configuration for a given module be configured

We suggest implementing them in regular Settings instead or better use domain-specific configuration files and implement editors for them.

Indexing is not related to module types in any way, using/not-using module types does not impact performance of this process

Hiding it in settings is probably going to confuse a lot of people, an to be honest i still find it annoying that i have to look through settings an trying to find the page where per-module bytecode version for java is hidden. i think this is a step in the wrong direction, its not always clear what is global/IDE settings and what is module/project settings and keeping those concepts separated is a good thing in my opinion.