Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does one go about creating custom IntelliJ project templates?

I wish to have a custom project template in IntelliJ IDEA (Community edition 12.0)

What I need, is for the project, when created, to copy in some standard files and then insert some values into those files.

I can probably do this myself using a bit of bash magic, but it would be very nice and tidy to just pick the template when creating a new project and get it all done in one go..

MSVS has very good support for custom projects, and I was kind of hoping IntelliJ had some of the same, though I have not been able to find it.

The only thing I found was the plugin facility, but I couldn't get started with that - IntelliJ just tells me the package com.intellij.openapi.components doesn't exist when I add an application component to the plugin project.

Cheers!

like image 589
Morten Nilsen Avatar asked Jan 08 '13 18:01

Morten Nilsen


People also ask

How do I create a project template in IntelliJ?

From the main menu, select File | New Projects Setup | Save Project as Template. In the dialog that opens, name the template and configure the options: Save: if the project contains more than one module, select whether you want to create a template from the whole project or from one of the modules.

Where are IntelliJ templates stored?

IntelliJ IDEA stores global templates in the IDE configuration directory under fileTemplates. Project: configure file templates specific for the current project. These templates are available to everyone who works on this project. IntelliJ IDEA stores them in the project folder under .

How do I customize my IntelliJ IDEA?

In the Settings/Preferences dialog ( Ctrl+Alt+S ), select Appearance & Behavior | Appearance. Select the UI theme from the Theme list: IntelliJ Light: Traditional light theme for IntelliJ-based IDEs.


1 Answers

I figured out that you can create project templates quite easily, all you do is go into the meny, tools, save project as template. Unfortunately, this did not provide me with features I needed, so I have made a bash script to do what I need.

like image 83
Morten Nilsen Avatar answered Oct 02 '22 20:10

Morten Nilsen