Bug 13084

Summary: DCR: ASTNode.getElementType
Product: [Eclipse Project] JDT Reporter: Martin Aeschlimann <martinae>
Component: CoreAssignee: Jim des Rivieres <jeem>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: dirk_baeumer
Version: 2.0   
Target Milestone: 2.0 M5   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Martin Aeschlimann CLA 2002-04-09 12:33:16 EDT
It would be nice if the AST Nodes could be distiguished by an int 'type'-id
like IJavaElement.getElementType / IResource.getType
- instanceof checks can be reduced.
- needed to implement a switch statement over many node types
- nice to find a parent of a certain kind
Comment 1 Olivier Thomann CLA 2002-04-09 12:36:59 EDT
Jim, could you please have a look at this PR?
Comment 2 Jim des Rivieres CLA 2002-04-11 19:14:27 EDT
Added ASTNode.getNodeType() and constants on ASTNode.
Constants are small, unique, positive numbers, suitable for use in switch
statements.

Test suites updated.