My File Template\" similar to 开发者_开发问答the \"New > Java Class\" bundled with Intel" />
开发者

IntelliJ IDEA - New Template

I'm trying to create a set of custom file templates for IntelliJ.

I basically want to go right-click, "New > My File Template" similar to 开发者_开发问答the "New > Java Class" bundled with IntelliJ.

I've added my own custom file template via "Settings > File Templates", but they don't appear in my "New" context menu.

This is a Java project, and my templates extension is java. Am I missing something?

All help greatly appreciated.

IntelliJ IDEA - New Template

No My Template >>>

IntelliJ IDEA - New Template


If you select Java Class you can then choose the template for your new class. This is a new feature, it used to be available when selecting New.

IntelliJ IDEA - New Template


Actually you can, sort of.

I don't know know how to do it for Java files. but if you set the extension to txt you it will show up in the right click menu.

IntelliJ IDEA - New Template

and here it is in the menu:

IntelliJ IDEA - New Template

the only issue is if you're creating a java class you'll have to rename the file after creation to ${name}.java

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜