Bug 54776 - DefaultCommentMapper: different behaviour
Summary: DefaultCommentMapper: different behaviour
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M8   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-14 16:23 EST by Martin Aeschlimann CLA
Modified: 2004-03-25 12:43 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 Martin Aeschlimann CLA 2004-03-14 16:23:06 EST
20040314

In the folloing code, get the extended range of the method invocation:
The comment mapper only adds the second comment to it, not the first.

public class TestFieldInitializer1 {
	
	private int field= /*]*/foo()/*[*/;	
	
	public int foo() {
		return 1;
	}
}
Comment 1 Frederic Fusier CLA 2004-03-15 14:01:03 EST
Fixed.

Now method invocation extended range include leading comment. Problem was 
coming from the fact that we removed leading comments on same line of previous 
node. By-pass this test when previous node and first leading comment is on the 
same line as old comment mapper did.

[jdt-core-internal]
Changes done in storeLeadingComments method of DefaultCommentMapper.

Test case added in jdt.core.tests.dom.ASTConverterjavadocTests
Comment 2 Jerome Lanneluc CLA 2004-03-25 12:43:48 EST
Verified in build I200403250800