Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to automatically place JavaDoc comments in Eclipse?

 
James Dekker
Ranch Hand
Posts: 221
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fellow Ranchers,

I am using Eclipse Ganymede... How can I set it so that for every class, method, instance declaration, etc. that I create, Eclipse automatically places JavaDoc?

Right now I am using control space (Content Assist) right after I type in /**.

Would prefer it to be always generated (decorating my code) while I am developing.

Happy programming,

James
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alt-Shift-J, IRC, or from the context menu. It won't add Javadocs automagically if you type in a function. If it's created from a template, like when overriding etc., you can define the template for the Javadoc as well.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18093
48
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe I used to have a tool that would do that, but I don't remember what it was. Jalopy might do it, and it's available as an Eclipse plugin.

You don't need to do a control-space to make autodoc comments work. Just type "/**" above the method/class definition and press ENTER. Eclipse will automatically close the comment and put in as much of the doc body as it can deduce. No control key press required.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The key sequence will do it from anywhere in the method, though :D
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic