I like intellij's code/file templates, they are working really well for me for single files but it would be great to be able to create multiple files/classes at once.
I did find this question but since it has been a few years since I was hoping that things might have changed.
We are using the mvp pattern in our application so every time we want to create a new view, it requires two classes and two interfaces, which are always in the same pattern. It would be awesome if we could generate all of the infrastructure for this and link up the classes.
Any suggestions or new information would be appreciated? Maybe it is time to log a feature request with JetBrains?
To use the new template, right-click a directory in the Project tool window or press Alt+Insert and select the Java MVC template. Specify a name for the model class and IntelliJ IDEA will create all three files.
Click 'Compound' In the right-hand pane, enter a meaningful name for your group, then click the green '+' icon (the one in the right-hand pane, not the top-left of the window) Select one of the run configurations. Repeat 5 and 6 for all the configurations you want to run in a single click.
IntelliJ IDEA stores global templates in the IDE configuration directory under fileTemplates.
This feature seems to be available in ReSharper (another JetBrains
IDE). It still does not seem possible in IDEA
yet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With