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 there any other way?
-
6*"copy-pest"* --- I'll have to remember that one :-) – Stephen C May 08 '11 at 06:28
-
@Stephen C thanks for reply. So no other way? Any plugin? – Tapas Bose May 08 '11 at 06:30
4 Answers
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.

- 28,272
- 7
- 61
- 66
Was looking into doing this for my project and found this plugin quite useful

- 5,128
- 8
- 41
- 52
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.

- 10,614
- 1
- 25
- 32
-
Tool doesn't work for me and is severely bugged, only adding IBM copyright, ignoring all other copyright inputs. – Eric Tobias Jan 08 '15 at 10:02
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.

- 1
- 1