Replies: 4 comments
|
Can't your LS just set a more detailed name and/or set the |
|
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. |
|
Hi all, Good news: the language server implemented by clangd (vers. 20) now also provides the called method's container (class and/or namespace) in the Though, it looks somewhat odd in Eclipse (see screenshot). For example, there are some spaces missing (and the method name is contained twice in the labels). @mickaelistria and @rubenporras, do you know if any other language server (besides clangd) fills the I didn't find any tests for the |

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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, theCallHierarchyItemdoes 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?
All reactions