Bug 13084 - DCR: ASTNode.getElementType
Summary: DCR: ASTNode.getElementType
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.0 M5   Edit
Assignee: Jim des Rivieres CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-09 12:33 EDT by Martin Aeschlimann CLA
Modified: 2002-04-16 07:48 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.