Bug 52908 - [DOM Comments] Wrong text element positions when starting/ending with { or }
Summary: [DOM Comments] Wrong text element positions when starting/ending with { or }
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M8   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-24 04:36 EST by Frederic Fusier CLA
Modified: 2004-03-25 10:19 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Fusier CLA 2004-02-24 04:36:40 EST
Using build I200402190800.

When a text line in Javadoc comment starts or ends with opening or closing 
brace (ie. '{' or '}'), then its starting position or length is incorrect.

Here's a sample which shows this specific issue:
public class X {
	/**
	 * Text element starting with a
	 * { caused troubles in its position
	 * if the bug is not fixed
	 * @see Object
	 */
	Object x1;
	/**
	 * Text element ending with a }
	 * caused troubles in its position
	 * if the bug is not fixed
	 * @see Object
	 */
	Object x2;
	/**
	 * Text element starting with a
	 * } caused troubles in its position
	 * if the bug is not fixed
	 * @see Object
	 */
	Object x3;
	/**
	 * Text element ending with a {
	 * caused troubles in its position
	 * if the bug is not fixed
	 * @see Object
	 */
	Object x4;
	/**
	 * Text element starting with
	 * { and ending with }
	 * caused troubles in its position
	 * if the bug is not fixed
	 * @see Object
	 */
	Object x6;
	/**
	 * Text element starting with
	 * } and ending with {
	 * caused troubles in its position
	 * if the bug is not fixed
	 * @see Object
	 */
	Object x7;
}
Comment 1 Frederic Fusier CLA 2004-03-01 16:59:15 EST
Fixed.

Now text fragment starting or ending with opening or closing braces have 
correct start position and length.

[jdt-core-internal]
Modify start and end position indexes stored in method parseComment(int,int) of 
AbstractCommentParser class.

Regression tests added in jdt.core.tests.dom.ASTConverterJavadocTest
Comment 2 Jerome Lanneluc CLA 2004-03-25 10:19:52 EST
Verified in I200403240010.