Bug 174298

Summary: Wrong NAME_PROPERTY child type for AnnotationTypeDeclaration and EnumDeclaration
Product: [Eclipse Project] JDT Reporter: Eric Inman <eric-inman>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.2   
Target Milestone: 3.3 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Eric Inman CLA 2007-02-15 08:18:12 EST
Build ID: M20060629-1905

Steps To Reproduce:
System.out.println(
    AnnotationTypeDeclaration.NAME_PROPERTY.getChildType().
	getSimpleName() + "\n" +
    EnumDeclaration.NAME_PROPERTY.getChildType).
        getSimpleName() + "\n" +
    TypeDeclaration.NAME_PROPERTY.getChildType().
        getSimpleName());

Results:

Name
Name
SimpleName


More information:
For AbstractTypeDeclaration and its subclasses, getName() returns a SimpleName, not a Name; and setName(...) takes a SimpleName.
Comment 1 Olivier Thomann CLA 2007-02-15 11:07:12 EST
Released for 3.3M6.
Added regression test org.eclipse.jdt.core.tests.dom.ASTConverterTestAST3_2#test0668
Comment 2 David Audel CLA 2007-03-20 13:47:21 EDT
Verified for 3.3 M6 using build I20070320-0010