Community
Participate
Working Groups
I20090825-1032 The length of an Assignment ASTNode should not include whitespace or comments after the RightHandSide node. For VariableDeclarationFragments, the same problem has already been fixed with bug 203579. public class Snippet { void m() { int x= 1 ; int y= - 1 , z=0 ; // Assignment nodes too long: int a= x = 2 ; System.out.print( x=1 ); java.util.Arrays.asList( x=1 /*bla*/ , x= 2 // comment ); } }
Right, comments should be part of the extended source range.
Created attachment 145732 [details] Proposed fix + regression test
Released for 3.6M2. Regression test added in: org.eclipse.jdt.core.tests.dom.ASTConverter15Test#test0337
Verified for 3.6M2