I’m still using Eclipse. Some habits are hard to get rid of. Finding gems like these make it harder. On the Eclipse Marketplace, there is a plugin called Copyright Wizard 1.4.0. Once installed, you can configure the templates in the Preferences as seen below:
Configuring the template is optional. When you’re ready to apply the copyright, right-click on the folder or java package, select the Apply copyright
…Set your params and license…
…right click and refresh your project and you will see the new copyright/license notice
I experimented with another tool called Eclipse Releng Tools but I found it didn’t handle the XML use case I’ve documented above. This plugin is a pretty handy tool to have if you are a propitiatory developer or an open source one. Whatever tool you use, all that matters is you get it done.