Repository navigation
Closed
Labels
Milestone
Description
Thank you for the new interesting feature "Logical Structure" from Spring Tools and Modulith.
Describe the bug
I use VSCode.
I can see the hierarchy of the Logical Structure with Modules, Controllers and soon. But when I click on entry in this hierarchy then VSCode can't open the file and logs the following error:
[error] [Window] Error: The editor could not be opened because the file was not found.
at IDe.gc (vscode-file://vscode-app/[…]/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2625:81151)
at async IDe.setInput (vscode-file://vscode-app/[…]/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2625:80309)
at async PGe.S (vscode-file://vscode-app/[…]/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:610:58577)
at async PGe.L (vscode-file://vscode-app/[…]/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:610:57132)
at async PGe.openEditor (vscode-file://vscode-app/[…]/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:610:56214)
at async vscode-file://vscode-app/[…]/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:722:23355
at async vscode-file://vscode-app/[…]/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:604:1272
at async qae.value (vscode-file://vscode-app/[…]/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:604:26027)
When I click on “Open Reference” for a node (e.g., “Services (Spring)”), the following error message is logged:
[error] [Window] cannot open jar:file%3A/[…]/.m2/repository/org/jmolecules/integrations/jmolecules-spring/0.30.0/jmolecules-spring-0.30.0.jar%21/META-INF/jmolecules-stereotypes.json. Detail: Unable to resolve resource jar:file%3A/[…]/.m2/repository/org/jmolecules/integrations/jmolecules-spring/0.30.0/jmolecules-spring-0.30.0.jar%21/META-INF/jmolecules-stereotypes.json
To Reproduce
I suspect the cause is that I am using remote SSH. VSCode as the “front end” runs on Windows and uses SSH to access a VSCode server on Linux, where the code is also located.
Activity
martinlippert commentedon Sep 27, 2025
Thanks @jekutzsche for trying out the new structure view and for your feedback and report here, very much appreciated.
The first issue is interesting, that should usually work. Does clicking on items in the outline view work in your setting, especially items from the Spring Tools part of the outline view?
The second part about clicking on the stereotype node is a known WIP item that doesn't fully work yet, to be fixed soon, I hope.
jekutzsche commentedon Sep 27, 2025
Thanks for your answer. The outline generally works, and jumping to files also works from the Spring Boot Dashboard. I'm not sure what you mean by “items from the Spring Tools part of the outline view.”
martinlippert commentedon Oct 15, 2025
@jekutzsche The "open reference" action should work now in the latest pre-release builds, so would be awesome if you could give that a try to see if that works in your environment as well.
Double checking the latest pre-release for navigating from elements in the tree to the corresponding file in your workspace might also be worth doing, but we haven't investigated that scenario yet (the SSH-connected front-end), so I doubt that this works now by accident.
What I mean with the "Spring Tools" part of the outline view: If you open a Java source file from your workspace and expand the "Outline" view (nothing in the Spring Boot Dashboard perspective, just the "outline" section in the regular file explorer perspective), it usually shows the structure of the file, like the Java elements of your source code file. If the source file contains Spring-specific things (like Spring annotations, request mappings, etc.), the outline view shows all the regular Java elements of the file as coming from the Java tooling, and above, some Spring-related elements as coming from the Spring Tools. When you click on those elements (e.g. a request mapping), it jumps to the positing of the request mapping in the source file.
martinlippert commentedon Oct 15, 2025
I tried the latest pre-release in a dev container setup, running the workspace inside of a linux container on my machine, and connecting the VSCode instance to that container. That setup seems to work, navigation from elements in the logical structure view to the Java source files works. I used the petclinc project to test this.
I remember that the logical structure view might display elements that have no direct association to a source file in the workspace (and therefore does not allow navigation), in case you hit that situation. If you have (or can create) a sample project that reproduces the problem you mentioned, that would be great for further investigations here.
jekutzsche commentedon Oct 16, 2025
Thank you very much, @martinlippert. It looks good, and I haven't encountered any further issues.
Navigating from elements in the tree to the corresponding file now functions correctly. However, I cannot find any elements in the logical structure view that do not have a direct connection to a source file in the workspace. Therefore, I am currently unable to verify that the function is correct.
The ‘Open Reference’ action now works for me too. The icing on the cake would be if the corresponding entry in the settings file were to jump straight to it (if that is possible).
The Spring Tools part of the outline view also works for me. It jumps to the positing of the request mapping in the source file.
Thanks again for the corrections, the function looks quite helpful.
martinlippert commentedon Oct 16, 2025
Thanks a lot for the additional feedback, great to hear that all the things are now working for you.
I created #1676 for this. Feel free to subscribe to that issue to track progress, but we will tackle that one most likely not for the initial Spring Tools 5 GA release, but for the one after.