开发者

Setting an template in Eclipse

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜