File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes Eclipse setup question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Eclipse setup question" Watch "Eclipse setup question" New topic
Author

Eclipse setup question

Higgledy Smith
Ranch Hand

Joined: Mar 07, 2006
Posts: 192
How do you configure Eclipse so that whenever a new class is created the editor will open with a customized commented prolog section?

like:

David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Edit the file header template.

Java -> Code Style -> Templates -> Comments - Files.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

That's a weird way to comment Java classes, though, and completely bypasses the built-in Javadoc mechanism.

IMO including change history in the file itself is a code smell: that's what SCCSs are for.
Higgledy Smith
Ranch Hand

Joined: Mar 07, 2006
Posts: 192
David Newton wrote:That's a weird way to comment Java classes, though, and completely bypasses the built-in Javadoc mechanism.

IMO including change history in the file itself is a code smell: that's what SCCSs are for.


I agree. The company I worked for at the time insisted on it, not me.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16054
    
  21

David Newton wrote:That's a weird way to comment Java classes, though, and completely bypasses the built-in Javadoc mechanism.

IMO including change history in the file itself is a code smell: that's what SCCSs are for.


Actually, this particular prototype is rather odd. If the SCCS is CVS, the $Log$ keyword will be expanded to list the changes. There doesn't seem to be a point to having someone add manual history below that, as the example seems to imply.

CVS is a little odd itself. It actually does expand the log into the source file archive itself, then appends later log messages as updates are made. Or such has been my experience.

SVN took a different tack, which I'm not sure I agree with. On the one hand, when you have 3 pages of log history before you even see the code, it can be a real nuisance. But the history does provide a cue as to where people have been meddling, when bugs pop up.

Then again, I have a bigger problem when people create source lines that are 3x wider than the printed page. For serious debugging I've never successfully made it to "paperless" (and some of these guys also bleed off the screen as well). Trying to highlight items with my infamous pink marker on an LCD screen just doesn't seem to work.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Eclipse setup question