Replies: 2 comments
-
Can't your LS just set a more detailed name and/or set the |
Beta Was this translation helpful? Give feedback.
-
Hi @mickaelistria, CDT LSP uses the clangd project and it seems, populating the details field with a file name, a containing class name, or method signature has already been discussed for clangd (see clangd/clangd#1940 and clangd/clangd#1185). Unfortunately, it seems to be unlikely for these changes in clangd to be implemented any time soon. I hoped for a more generic solution, but that would probably involve modifying the LSP standard. I hoped that I could adapt the call hierarchy view for CDT LSP based on already available features (or after minimal changes in LSP4E), but that seems a bit complicated and probably unnecessarily inefficient in terms of runtime. |
Beta Was this translation helpful? Give feedback.
-
When viewing a call hierarchy In JDT and CDT, we're used to see the called methods, but also their parent classes. That's something we're missing in CDT LSP. It seems that's a feature that could be implemented in LSP4E. But I'm not sure how.
For comparison:
CDT's call hierarchy example:
CDT LSP's call hierarchy example:
The call hierarchy feature is implemented in LSP4E. When debugging
org.eclipse.lsp4e.callhierarchy.CallHierarchyContentProvider#updateCallers(CallHierarchyViewTreeNode)
I didn't see any details about the calling method's parent / container in the language server response. It seems, theCallHierarchyItem
does not provide any information on that, just the calling method's code range.Is there a simpler way of retrieving the calling method's parent class than asking the language server for the method's declaration and then requesting the document symbols for a certain range of code?
Beta Was this translation helpful? Give feedback.
All reactions