Replies: 4 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.
-
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 |
Beta Was this translation helpful? Give feedback.
-
I added issue #1231 and PR #1232. I think, we can close this discussion now since the original problem is solved now. |
Beta Was this translation helpful? Give feedback.
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, 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