| Author |
Eclipse - include default header
|
Arijit Ghosh
Ranch Hand
Joined: Feb 01, 2002
Posts: 174
|
|
Hi, How can I format my java files to include the copyright header for all files at the click of a button ? Regards, Arijit
|
 |
Ben Poole
Ranch Hand
Joined: Jul 17, 2003
Posts: 33
|
|
Why not set up your template code headers in Eclipse? Window / Preferences Then, under "Java" select "Code Style" followed by "Code Templates" -- simply set up your "New Java files" template accordingly.
|
 |
Arijit Ghosh
Ranch Hand
Joined: Feb 01, 2002
Posts: 174
|
|
right.. I did that.. I selected create new file... but it did not add any headers... Also, what if the files already exust ? Say 50 files.. and I want Eclipse check and add if its not present... Regards, Arijit
|
 |
Ben Poole
Ranch Hand
Joined: Jul 17, 2003
Posts: 33
|
|
OK, well once you've set up your template, when you create a new class that will get the headers you define. That works for sure. As for retrospectively updating your source code, I reckon you need a code formatter of some sort, i.e. something more than plain ole' Eclipse. In fact, sounds like a task for Jalopy to me (Jalopy has an Eclipse plug-in too).
|
 |
 |
|
|
subject: Eclipse - include default header
|
|
|