Automatic completion of copyright notice and class annotation in java development

In Java project development, it is inevitable to add some copyright notices or class comments to the coded files. If there are many files, it is really tired to add or modify them manually. Tools can be used to meet our requirements. I use eclipse, so let's explain how to do it under eclipse. 1、 Copyright notice: you can use jautodoc to copy the plugin and feature directories of jautodoc into the eclipse directory, Restart eclipse with the - clean parameter (this parameter is no longer needed in the future) to the window reference menu of eclipse, Java jautodoc, configure project specific settings, select add file header, click the [Edit] button, enter the copyright information, and save it. To add a copyright in the future, press Alt + Shift + J. similar copyright information is as follows:

Among them, ${file_name} and ${year} are built-in variables. When editing the template, enter $and many similar variable prompts will be displayed. If you are interested, you can have a look.

2、 Class annotation, you can directly use the code style function of eclipse. Window reference java code style code templates comments, select type, click Edit, enter class comments, and save. To add copyright later, press Ctrl + Alt + J. similar class comments are as follows:

Similarly, ${date} here is also a predefined variable

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>