Community
Participate
Working Groups
The resolveBinding() method is in a significant number of ASTNode subclasses. There really should be a common interface for things with this method. Similarly, there should be a common interface for AST nodes that can be annotated. Right now, getting annotations from a ASTNode if you don't know exactly what it is is horrible. Sometimes you call getAnnotations(), sometimes you call modifiers(). There really should just be IAnnotatable (or something) that has getAnnotations().
This would be a breaking API change. So I doubt it is doable. Jim, any comment?
Adding an interface to ASTNode classes should be doable without breaking binary compatibility.
Could you please clarify what you want? modifiers() are defined for ASTNodes and getAnnotations() is defined for a binding. Inside the modifiers list, you can find the AST node corresponding to the annotation, whereas in the binding world, you use getAnnotations() to retrieve the resolved information concerning the annotations. You can also use resolveAnnotation() on the AST node corresponding to the annotation to get the resolved information.
Please provide the requested clarifications. Closing as REMIND.
As of now 'LATER' and 'REMIND' resolutions are no longer supported. Please reopen this bug if it is still valid for you.