The type reported for dinfo is bool here and str there, but DeclarationInfo elsewhere. In fact it should be list[DeclarationInfo].
However, the reference is alway correctly resolved. This is because there is no ambiguity with references in this tree. There are only those references in the scope of the cursor. There are, however, many different documentation strings one could show.
The eclipse code for this feature would work "inside-out" and not stack documentation strings. So if you hover on dinfo you'd get the location of that lexical and look that up in the documentation relation. If you'd want information on the parent of dinfo you'd have to however whitespace or operators of that level in the tree.
The code for looking up the tree that represents the cursor best is in TreeAdapter and can be easily reused for this purpose. All you need is a tree..
Describe the bug![image](https://github.com/usethesource/rascal-language-servers/assets/1990295/d526967a-3003-462b-8543-05a21f7a3c68)
This is just an example.
The type reported for
dinfo
isbool
here andstr
there, butDeclarationInfo
elsewhere. In fact it should belist[DeclarationInfo]
.However, the reference is alway correctly resolved. This is because there is no ambiguity with references in this tree. There are only those references in the scope of the cursor. There are, however, many different documentation strings one could show.
The eclipse code for this feature would work "inside-out" and not stack documentation strings. So if you hover on
dinfo
you'd get the location of that lexical and look that up in the documentation relation. If you'd want information on the parent ofdinfo
you'd have to however whitespace or operators of that level in the tree.The code for looking up the tree that represents the cursor best is in
TreeAdapter
and can be easily reused for this purpose. All you need is a tree..