Bug 114686 - [code templates] The Javadoc of autogenerated get/set method should use the Javadoc of the field
Summary: [code templates] The Javadoc of autogenerated get/set method should use the J...
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows 2000
: P5 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
: 280176 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-11-01 21:47 EST by solomon CLA
Modified: 2009-06-15 08:17 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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