Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 340371

Summary: [templates] Indentation of Javadoc template mangled on insertion
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: TextAssignee: Dani Megert <daniel_megert>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert
Version: 3.2   
Target Milestone: 3.7 M7   
Hardware: All   
OS: All   
Whiteboard:

Description Markus Keller CLA 2011-03-17 16:50:01 EDT
I20110310-1119

I tried to create a Javadoc template with name BETA_JAVA7 and this content (properly formatted, i.e. without Bugzilla's additional line breaks):

 * This is an implementation of an early-draft specification developed under the Java
 * Community Process (JCP) and is made available for testing and evaluation purposes
 * only. The code is not compatible with any specification of the JCP.
 *

When I try to insert this into the standard Eclipse header comment at the beginning of line

 * Contributors:

, the result is this:

* This is an implementation of an early-draft specification developed under the Java
 * Community Process (JCP) and is made available for testing and evaluation purposes
 * only. The code is not compatible with any specification of the JCP.
 *
  * Contributors:

=> first line misses first space
=> last line has 1 space too much
Comment 1 Dani Megert CLA 2011-03-18 05:16:02 EDT
Broken since 3.2.
Comment 2 Dani Megert CLA 2011-03-18 06:54:51 EDT
Javadoc templates are formatted and indented via special JavaFormatter for templates but that formatter doesn't handle Javadoc indentation at all.

There are currently no plans to add that support but we should at least not destroy/touch the given template's indentation.

Fixed in HEAD (JavaFormatter.java, rev. 1.56).
Available in builds >= N20110317-2000.
Comment 3 Dani Megert CLA 2011-03-18 10:24:11 EDT
> Available in builds >= N20110317-2000.
==> Available in builds >= N20110318-2000.