toniedzwiedz
toniedzwiedz

Reputation: 18553

Can't see a custom template in IntelliJ

I have created a custom File Template for a special type of a Java class commonly used in my project.

I went to Settings > Editor > File and Code Templates, copied the Class template and customised the code.

enter image description here

However, I cannot see the new file type in the New File menu.

enter image description here

Upvotes: 2

Views: 529

Answers (1)

toniedzwiedz
toniedzwiedz

Reputation: 18553

It turns out I misunderstood the way these templates are supposed to be used. I found the answer in the Documentation.

If required, specify the kind of the new template-based file. For example, if you select Java class, you'll be able to create a Java class, interface, enumeration, annotation, etc.; if you select to create an HTML file, you'll be able to create HTML, HTML4, or XHTML file. In other words, use one of the corresponding related file templates.

There seems to be only one item in this menu for every file type. My custom template was registered but it's only available as a Kind of a Java Class. It's available in the popup menu that appears once I try to create a Java Class.

Menu option to create a new Java Class

Java file 'Kind' selection

Upvotes: 1

Related Questions