The title says everything. If I want to add copyright comment in code files in Eclipse Helios, how can I do it? Manually copy-paste or is t开发者_运维技巧here any other way?
Go to preferences Java/CodeStyle/Code Templates
then expand Code, and New Java Files, edit that, and put in whatever text you want. Now whenever you create a class, that will be automatically injected.
Was looking into doing this for my project and found this plugin quite useful
http://www.wdev91.com/?p=cpw_ug
You can also install the Eclipse Releng tools (from the eclipse 3.6 update site included in Helios). I can add copyright headers to existing files and update existing copyright headers to include the current year.
See http://market.eclipsesource.com/yoxos/node/org.eclipse.releng.tools.feature.group for more information.
The procedure is similar for C++ code in Eclipse CDT: Window:Preferences:C/C++:Code Style:Code Templates:Comments:Files:Edit
The resulting dialog has a button for inserting variables such as time, date, year, file name, etc.
精彩评论