Linking a custom code generator plugin into IntelliJ

I am currently working on a generic Maven code generation plugin which will allow to generate any sort of output based on Java classes, Java source files, property files and the Maven model using Velocity templates.

Now creating this plugin is not the issue here, but I would like to provide an IntelliJ-integration plugin that allows to perform/update the code generation efficiently without the need to start any Maven goals "before make" every time a file is changed.

I would like to create a wrapper plugin that gets notified if a resource has changed and ask the generator if it needs to generate/update/delete something and to give it the chance to do so and extend the current IntelliJ update job to include any touched resource (So if ABC.java is updated and the Generator creates a ABCHelper.java and a ABC.properties from this that not only would IntelliJ re-compile/re-deploy ABC.java but also ABCHelper.java and also re-copy ABC.properties).

Is there any way to to so? I would also like to use this mechanism to provide IDE support for stuff I will be adding to the upcomming Apache Maven-Flex-Plugin (Flexmojos Replacement).

Please sign in to leave a comment.