Bug 114686

Summary: [code templates] The Javadoc of autogenerated get/set method should use the Javadoc of the field
Product: [Eclipse Project] JDT Reporter: solomon <lsong>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P5 CC: etiennel, markus.kell.r
Version: 3.1Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description solomon CLA 2005-11-01 21:47:58 EST
The simple way is adding a variable ${field_javadoc_first_line} in  code 
template.
Comment 1 Markus Keller CLA 2009-06-15 08:03:39 EDT
*** Bug 280176 has been marked as a duplicate of this bug. ***
Comment 2 Markus Keller CLA 2009-06-15 08:17:58 EDT
From bug 280176:

If we do something here, we should support generating correct Javadoc, including @param and @return tags.

This would need 2 new code template variables, e.g.

- {@field_javadoc_summary}: For use in main description of getter and setter. Extracts the first sentence as specified here: http://java.sun.com/javase/6/docs/technotes/tools/windows/javadoc.html#leadingasterisks

- {@field_javadoc_tag_summary}: For use after @return and @param tags. Extracts the first sentence, removes the dot at the end and makes the first character lowercase

To see where the implementation would go, see references to 
org.eclipse.jdt.internal.corext.template.java.CodeTemplateContextType.BARE_FIELD_NAME