How to add copyright to Eclipse automatically

摘要: A quick guide to show you how to add @Copyright comment to new and existing Java files in Eclipse IDE.

A quick guide to show you how to add @Copyright comment to new and existing Java files in Eclipse IDE.

Solution 1. Eclipse Code Templates

Go to preferences -> Java -> Code Style -> Code Templates, expands Code and select “New Java Files”, edit the template to add whatever copyright messages you want.

Now, that copyright message will be injected on every newly created Java class.

Solution 2. Eclipse Plugin – Copyright Wizard

Using this Copyright Wizard plugin is recommended, it lets you select a list of common copyright templates like Apache License, EPL, GPL; and apply it to new or existing Java classes automatically. In additional, it allow to update the copyright year.

1. Download and install Copyright Wizard – http://www.wdev91.com/?p=cpw

2. To edit the copyright template – select project properties, go general -> copyright

3. To apply the copyright template to all source files – select project -> apply copyright

Done.

References

  1. Eclipse plugin – Copyright Wizard
  2. Eclipse Releng Tools

上一篇: How to convert Date in BeanWrapperFieldSetMapper
下一篇: jobParameters cannot be found on object of type BeanExpressionContext
 评论 ( What Do You Think )
名称
邮箱
网址
评论
验证
   
 

 


  • 微信公众号

  • 我的微信

站点声明:

1、一号门博客CMS,由Python, MySQL, Nginx, Wsgi 强力驱动

2、部分文章或者资源来源于互联网, 有时候很难判断是否侵权, 若有侵权, 请联系邮箱:summer@yihaomen.com, 同时欢迎大家注册用户,主动发布无版权争议的 文章/资源.

3、鄂ICP备14001754号-3, 鄂公网安备 42280202422812号