Hello IntelliJ comunity
I've created a couple of file templates with Tools>Save File as Template menu item for Spring/JPA stuff. And tooks me a while to see how can I create a file templates based on existing java file. One can get this support using Find Action popup and entering file template or scanning each and every menu (very time consuming). I wonder why such of useful support is not contributed to context menu for java editor and as context menu contribution on java item in package view. Moreover if one select a valid java file in package explorer view the Tools>Save File as Template becomes grayed out (strange....)
Any way this was the easy part. The hard part was to use them. I remembered I did used once such of java file template, and I also remembered (but I can be wrong) the contributions were exposed in New... popup (Alt-Insert). So this was the first place where I looked for my custom templates. But unfortunatelly they did not contributed there.
So I seached the online idea help, but unfortunatelly the http://www.jetbrains.com/idea/webhelp/file-templates.html#h2when_are_the_file_templates_used? doesn't help me at all. I generally find the idea online help not very useful, but this is my personal feeling.
So I try the new Java Class popup, and I noticed the custom java file templates contribute to kind combobox, messing them up, and felt sorry I created them in the first place. The IntelliJ Development team did manage to hide the use of custom java templates so well.
Many times I thought that the live template is mush less powerful as its couterpart live template. If I remember well I file an enhancement in youtrack in order to make file templates more appealing to IntelliJ users.
Idea Team please don't mess up the Kind default java type with our custom java file templates or use the second key stroke to filter out further:
- 1st Alt-Insert reveal only default types and
- 2nd filter-in our java contributions.