开发者

Setting an template in Eclipse

开发者 https://www.devze.com 2023-02-21 18:24 出处:网络
I want that every time I create a new class Eclipse will generate the header wit开发者_运维技巧h the date,

I want that every time I create a new class Eclipse will generate the header wit开发者_运维技巧h the date, the name of the file, etc. How do you set this up?


You can do that by setting the code-style property.

ie GO to Window->preferences->java->code style->Code templates

and import the template which you want.


You should go to the "Preferences" menu, "Java", "Code Style", "Code Templates". Then you should select "Code", "New Java Files", press "Edit" button and you can add some fields as you want by clicking on "Insert Variable" button.

Don't forget to check "Automatically add comments for new methods and types".

Hope this helps.

0

精彩评论

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