You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using NodeFinder to identify AST nodes at a specific position in the document. When using this for positions inside of annotations while having missing pieces in the annotation attributes at the same time, I am experiencing difficulties. The concrete case is (the <*> is not part of the doc, just marks the position in the doc where I am trying to find the node):
@ConditionalOnProperty(name=<*>)
NodeFinder for the <*> position returns the inserted $missing$ SimpleName node. Correct behavior, I think.
@ConditionalOnProperty(prefix = "else", name=<*>)
NodeFinder at <*> does not find the $missing$ node, but returns the surrounding TypeDeclaration node (because the annotation mentioned here is on a type).
It looks to me like the length of the NormalAnnotation node is slightly off (-1) in this case, so that the NodeFinder thinks that the <*> is not covered by the annotation, but only by the surrounding node (the TypeDeclaration). Whereas in the first case (where it works), the annotation node seems to cover that position, so that NodeFinder can find the $missing$ node.
The text was updated successfully, but these errors were encountered:
I am using NodeFinder to identify AST nodes at a specific position in the document. When using this for positions inside of annotations while having missing pieces in the annotation attributes at the same time, I am experiencing difficulties. The concrete case is (the <*> is not part of the doc, just marks the position in the doc where I am trying to find the node):
NodeFinder for the
<*>
position returns the inserted$missing$
SimpleName node. Correct behavior, I think.NodeFinder at
<*>
does not find the$missing$
node, but returns the surroundingTypeDeclaration
node (because the annotation mentioned here is on a type).It looks to me like the length of the
NormalAnnotation
node is slightly off (-1) in this case, so that the NodeFinder thinks that the<*>
is not covered by the annotation, but only by the surrounding node (theTypeDeclaration
). Whereas in the first case (where it works), the annotation node seems to cover that position, so that NodeFinder can find the$missing$
node.The text was updated successfully, but these errors were encountered: