Create custom Project & Module types
I'm trying to create a new project type, based on the simple Java Module type. When this project is created, 2 modules will be created. The first is completely automatic, and takes only a version number as input from the user during creation. It contains a downloaded source package, as specified by the provided version number. The second is created as a standard Java module would be (empty) except for a single template class. A run configuration is also created for the second module. Exactly one of the first type of module should always exist in the project, but multiple modules of the second type may be added, each one generating their own run configuration.
Can anyone give me any hints as to how I might begin to code this?
Please sign in to leave a comment.
IntelliJ IDEA does not have a concept of "project type", or a way to restrict which module types can be added to a project. Also, our new project wizard creation infrastructure is heavily tailored towards creating single-module projects.
Possibly the easiest way to implement your requirements would be to provide a separate action, outside of the New Project Wizard framework, that would create the correct project/module structure as files on disk and open it as complete project afterwards.
I'll probably go with that then. Just out of curiosity, how do plugins such as the Android one add module types to the project wizard?
The ProjectTemplatesFactory interface can be used to add module types to the new project wizard. However, the Android wizard creates single-module projects, so, unlike your requirements, it works well with the existing API.
Hello I am really new in plugin development in IntelliJ and I want to learn how to create custom Project & Module types, I have search on google a lot and I am not abble to find anything that helps me to do it. I cant find any book for the plugin development. So please can anyone help me? I mean can anyone give me some start point of where I can find information about it. I will appreciate it!!