Creating Modules Programmatically
Hi,
I'd like to create new modules from within a plug-in I'm writing. I got everything to run without any exceptions, I got it to rename some directories (which it shouldn't), I got it log log what it should log, but I didn't get any new module in my project directory or new module files in the filesystem.
I create the module using
, get the modifiable root model of it, do my stuff and finally commit first the root model, then the modifiable module model.
What steps do I need to perform to create new modules? (BTW: I do the same for libraries which works just fine)
TIA,
Raffi
Please sign in to leave a comment.
Additions:
- No Exceptions are thrown.
- And another thing: The modules will have names that differ from their directory name. This is because the system, I'm writing the plugin for, uses a directory structure like <group>/<module>/api, <group>/<module>/impl etc. Using the default names of IDEA I'd end up with about 20 modules called "api" - so I'd like to rename them to <group>.<module>.api while keeping the base path. As mentioned above, IDEA keeps renaming e.g. api to <group>.<module>.api, which will break the underlying build system.
TIA,
Raffi