Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340371 - [templates] Indentation of Javadoc template mangled on insertion
Summary: [templates] Indentation of Javadoc template mangled on insertion
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.7 M7   Edit
Assignee: Dani Megert CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-17 16:50 EDT by Markus Keller CLA
Modified: 2011-03-18 10:24 EDT (History)
1 user (show)

See Also:


Attachments

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