Bug 305518 - [formatter] Line inside <pre> tag is wrongly indented by one space when starting just after the star
Summary: [formatter] Line inside <pre> tag is wrongly indented by one space when start...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.6   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.6 M7   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-11 10:44 EST by Frederic Fusier CLA
Modified: 2010-04-26 08:58 EDT (History)
2 users (show)

See Also:


Attachments
Proposed patch (13.66 KB, patch)
2010-03-23 10:54 EDT, Frederic Fusier CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Fusier CLA 2010-03-11 10:44:53 EST
Using 3.6M6 candidate (ie. I20100310-1800).

Looking closer at fix for bug 303957, I saw that there's something wrong with the current formatting of the code snippet:

public interface Test {
/**
 * <pre>
 *    A
 *   / \
 *  B   C
 * / \ / \
 *D  E F  G
 * </pre>
 */
public void foo();
}

is formatted as:
public interface Test {
	/**
	 * <pre>
	 *    A
	 *   / \
	 *  B   C
	 * / \ / \
	 * D  E F  G
	 * </pre>
	 */
	public void foo();
}

Observe that the 5th ligne inside the <pre> tag is indented by one space regarding the original lines...

Instead, it should be:

public interface Test {
	/**
	 * <pre>
	 *    A
	 *   / \
	 *  B   C
	 * / \ / \
	 *D  E F  G
	 * </pre>
	 */
	public void foo();
}
Comment 1 Frederic Fusier CLA 2010-03-23 10:54:27 EDT
Created attachment 162772 [details]
Proposed patch

Improve the way to remove/insert prefix stars in the javadoc comment snippet. When a non-spaces characters is discovered just after the prefix star, then shift the entire snippet one space to the right.
Comment 2 Frederic Fusier CLA 2010-03-23 10:55:18 EDT
(In reply to comment #1)
> Created an attachment (id=162772) [details]
> Proposed patch
> 
Released for 3.6M7 in HEAD stream.
Comment 3 Satyam Kandula CLA 2010-04-26 04:28:20 EDT
Verified for 3.6M7 using build I20100424-2000