Community
Participate
Working Groups
When I create a new Java class the following comment is inserted at teh top: /* * Created on ${date} * * To change the template for this generated file go to * Window>Preferences>Java>Code Generation>Code and Comments */ However those instructions are out of date. I'm not sure when the details changed but they should be Window>Preferences>Java>Code Style>Code Text
Note: 'Code Text' preference node does not exist in Eclipse SDK so I guess this is just a typo (you meant 'Code Templates', right?). We do not force new templates into existing workspaces. If you did not modify the templates you can just go to the 'Code Templates' preference page and click 'Restore Defaults'. If you modified some templates you can first export those you changed and re-import them again. Alternatively you can export all and edit the .xml file (remove those you did not change).
I understand and agree that Eclipse should not replace a template that the user modified. However this does not seem to be the case here. When the original default template becomes invalid due to a change in Eclipse, then an upgrade should replace the old, now incorrect default template.
This would mean to migrate the templates either the first time you use it or on startup. There are currently no plans for this.
There's an alternate approach. The default templates could be stored separately from the user-defined templates. A default template would only be used if the user's preferences did not contain a value (including possibly an empty value) for a given template.
Get rid of deprecated state.