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
{{ message }}
Repository navigation
Symbols view should nest elements by their surrounding scope #1431
It would be nice if the elements were nested inside each other. The parameter annotation as a nested node underneath the method, that in turn underneath the bean etc. Otherwise (and currently) you might end up with a gazillion of @RequestParam list entries that – without that contextual information – are not really helpful on their own.
There is bit of groundwork necessary to fully materialize this on the UI side, but the groundwork is already underway. I hope for the hierarchical view of symbols to appear in the outline view of VSCode as the first step (probably for the 4.29.0 release), then the work continues for the remaining UI work for 4.30.0 or 4.31.0 - just as a quick update.
@odrotbohm There is a (very specific) way to play around with early steps here.
you need to use VSCode with the Java and Spring Boot Tools extension installed
you need to switch the Spring Boot Tools extension to the "pre-release" version (there is a button for that in the extension page in VSCode)
you need to set a specific preference via: Settings -> Extensions -> Spring Boot Tools -> Language Server -> Spring-boot-LS-Java-Vmware, and add -DoutlineSymbolsFromIndex=true
Then, you can restart VSCode and import your project. The new hierarchical structure will then show up for one file only in the outline section under the Spring Boot Tools node of the tree. This works for single files only at the moment, but it should give you a good idea about how the hierarchical structural view will look like for a single file.
You could imagine that the separate structural view would then show the project perspective, but below the project nodes for each file (the tree structure that you see in the outline view).
This is very early days and it needs a lot of polishing and improvements on various levels. But feel free to give it a try and report back what you stumble upon, what should be incorporated into the structure, what is missing, how to display it differently, etc. At the moment the exact label for each node is more or less what we also create for the workspace symbols, but I assume that those structural view nodes should get their own, slightly different label over time.
One more thing: There is a setting for directing the log output of the language server to a log file. Would be great to set that, just in case something goes wrong. The log output might help in that case.
The new hierarchical structure will then show up for one file only in the outline section under the Spring Boot Tools node of the tree.
Can you elaborate where I would find this? What does "the tree" refer to here? In the Spring Boot Dashboard view I only see the sections "Apps", "Beans", and "Endpoint Mappings".
Spring Data repositories could list the query methods in a nested way?
How do you identify a query method and distinguish such a method from another, non-query method? Can you point me to the code in Spring Data that identifies query methods? That way, I could mimic that logic inside the tools.
Not all Spring components cause a Spring Boot Tools node to appear in the outline (for example, PaymentServiceImpl in Restbucks does not)
Will take a look.
The hover text of a bean node ends with "(interface)" even if the bean node is a class (for example PaymentController in Restbucks)
Will look into this as well.
Thanks a lot for the early feedback, very much appreciated. Feel free to add more thoughts here anytime.
Not all Spring components cause a Spring Boot Tools node to appear in the outline (for example, PaymentServiceImpl in Restbucks does not)
PaymentServiceImpl is annotated with a Service annotation from JMolecules, not Spring. This is at least the reason why the tooling doesn't recognize it as a bean. How does it turn into a bean? Feels like I need to treat since as a regular @Component annotated class, but how can the tooling decide this?
The hover text of a bean node ends with "(interface)" even if the bean node is a class (for example PaymentController in Restbucks)
This comes from the SymbolKind constant that we use here, so VSCode adds the symbol kind to the hover automatically (no way to prevent that), so we need to be more precise about which SymbolKind we choose for each individual symbol or index element.
Activity
GH-1041: replaced webflux symbol addon information objects with new i…
martinlippert commentedon Feb 5, 2025
There is bit of groundwork necessary to fully materialize this on the UI side, but the groundwork is already underway. I hope for the hierarchical view of symbols to appear in the outline view of VSCode as the first step (probably for the
4.29.0release), then the work continues for the remaining UI work for4.30.0or4.31.0- just as a quick update.GH-1431: compute document symbols directly instead of going through w…
GH-1431: enable index elements to compute document symbols on-demand
7 remaining items
GH-1431: replaced scan pass logic with exception handling and removed…
GH-1431: fix tests, failed due to newly added test data in the test p…
martinlippert commentedon Feb 27, 2025
@odrotbohm There is a (very specific) way to play around with early steps here.
Settings -> Extensions -> Spring Boot Tools -> Language Server -> Spring-boot-LS-Java-Vmware, and add-DoutlineSymbolsFromIndex=trueThen, you can restart VSCode and import your project. The new hierarchical structure will then show up for one file only in the outline section under the
Spring Boot Toolsnode of the tree. This works for single files only at the moment, but it should give you a good idea about how the hierarchical structural view will look like for a single file.You could imagine that the separate structural view would then show the project perspective, but below the project nodes for each file (the tree structure that you see in the outline view).
This is very early days and it needs a lot of polishing and improvements on various levels. But feel free to give it a try and report back what you stumble upon, what should be incorporated into the structure, what is missing, how to display it differently, etc. At the moment the exact label for each node is more or less what we also create for the workspace symbols, but I assume that those structural view nodes should get their own, slightly different label over time.
martinlippert commentedon Feb 27, 2025
One more thing: There is a setting for directing the log output of the language server to a log file. Would be great to set that, just in case something goes wrong. The log output might help in that case.
odrotbohm commentedon Feb 27, 2025
Can you elaborate where I would find this? What does "the tree" refer to here? In the Spring Boot Dashboard view I only see the sections "Apps", "Beans", and "Endpoint Mappings".
odrotbohm commentedon Feb 27, 2025
Never mind. Found it.
odrotbohm commentedon Feb 27, 2025
This looks nice already. A few things that caught my eye:
PaymentServiceImplin Restbucks does not)PaymentControllerin Restbucks)martinlippert commentedon Feb 27, 2025
How do you identify a query method and distinguish such a method from another, non-query method? Can you point me to the code in Spring Data that identifies query methods? That way, I could mimic that logic inside the tools.
Will take a look.
Will look into this as well.
Thanks a lot for the early feedback, very much appreciated. Feel free to add more thoughts here anytime.
martinlippert commentedon Feb 27, 2025
PaymentServiceImplis annotated with aServiceannotation from JMolecules, not Spring. This is at least the reason why the tooling doesn't recognize it as a bean. How does it turn into a bean? Feels like I need to treat since as a regular@Componentannotated class, but how can the tooling decide this?This comes from the
SymbolKindconstant that we use here, so VSCode adds the symbol kind to the hover automatically (no way to prevent that), so we need to be more precise about which SymbolKind we choose for each individual symbol or index element.martinlippert commentedon May 22, 2025
With the switch made in #1557, this is done for document symbols - based on the new indexing - and enabled by default.
Additional work to provide this kind of hierarchical structure on the project or workspace level is still underway.
odrotbohm commentedon May 22, 2025
Any ETA on when builds will reach the snapshot repo?
martinlippert commentedon May 22, 2025
Already available... :-)