Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-core-dev] [JDT Core DOM] In an AST Visitor, is it possible to know which node's property I am visiting?

Hi, I'm programming an AST Visitor.

An EnumDeclaration node contains the following structural properties:

JAVADOC, MODIFIERS, NAME, SUPER_INTERFACE_TYPES, ENUM_CONSTANTS and BODY_DECLARATIONS.

When I visit a child node of EnumDeclaration (a SimpleName node, for instance), is it possible to know which of the lists of nodes I'm visiting? Is it possible to differenciate?

I'd like to process a node differently, depending on whether I found it in ENUM_CONSTANTS or BODY_DECLARATIONS.

Thanks for the help.

Back to the top