7

I've just installed this Copyright wizard plugin for managing copyright disclaimers in my Eclipse projects. I discovered it thanks to this post.

I set it up and all works fine:

  1. I created my own copyright header
  2. I used the wizard to apply it to all files of an existing project

Now I have the following problem:

When I create a new file inside the project, the copyright isn't added by default. How can I solve this?

Community
  • 1
  • 1
Heisenbug
  • 38,762
  • 28
  • 132
  • 190

1 Answers1

5

It sounds like you're looking for Eclipse's Code Templates feature. In the version of Eclipse I have handy, it's found through Preferences -> Java -> Code Style -> Code Templates.

I have a feeling that you will be most interested in either the New Java files (found under Code) or Files (found under Comments) template.

There is corresponding functionality for XML files under Preferences -> XML -> XML Files -> Editor -> Templates (look at the xml declaration template), and for Ant files under Preferences -> Ant -> Editor -> Templates (Buildfile template). I am willing to bet that there are similar templates for pretty much every other language Eclipse can be used with.

user
  • 6,897
  • 8
  • 43
  • 79
  • No. It's what I'm looking for. I know that, but accordingly to the post I linked the Copyright wizard plugin is built exactly for manage copyright headers. It's more flexible than a Code Template. I would like to understand how to configure it in order to automatically add the header using that plugin. – Heisenbug Sep 04 '11 at 13:03