The Eclipse repository contains a tool that will fix copyrights in your code. It will insert copyrights into any files that are missing them, and will also attempt to insert the additional year for modified files (e.g. “2007, 2008”). To do the latter, the tool compares all files against the last revision from the previous year to see if there were any changes. So even if you didn’t change the file for this check in, it might be fixing the copyright for a previous change in the current year.
Here are the steps to load and run the fix copyrights tool.
- Load module
- Export the plugin to your plugins directory by selecting Export… from the popup menu and then Deployable plugins and fragments
- Restart Eclipse to pick up the new plugin (shortcut is to choose File > Switch Workspace and indicate the same workspace).
- Go to Window > Preferences > Copyright Tool to set your copyright preferences.
- Set default creation year in the preferences to 2008 and default revision year to 2008. Click OK to save the preferences.
- Switch to the Resource perspective.
- Select all projects for which you want to run the tool and select Advanced Fix Copyrights from the context menu.
- Perform a team synchronization on the changed projects and commit the changes.