Bug 53477 - AnonymousClassDeclaration has wrong range
Summary: AnonymousClassDeclaration has wrong range
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.0 M8   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-02 04:29 EST by Markus Keller CLA
Modified: 2004-03-24 12:50 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 Markus Keller CLA 2004-03-02 04:29:45 EST
I200400226

public class K {
	class Inner {
	}
	void make() {
		new K(){}.new Inner(){/*x*/};
	}
}

The AnonymousClassDeclaration whose implementation is marked by /*x*/ should
have a range covering "{/*x*/}". Currently, getStartPosition() and getLength()
return a range covering "{}.new Inner(){/*x*/}".

(For Markus' memory: This makes NodeFinder return a wrong node, causing problems
in ChangeSignatureRefactoring test A_testAll51_in)
Comment 1 Olivier Thomann CLA 2004-03-03 09:25:43 EST
I will investigate.
Comment 2 Olivier Thomann CLA 2004-03-04 13:08:27 EST
Fixed and released in HEAD.
Regression test added.
Comment 3 Frederic Fusier CLA 2004-03-24 12:50:01 EST
Verified for 3.0 using build I200403240800.