-
Notifications
You must be signed in to change notification settings - Fork 220
Structure view groupings UI #1661
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
6713347 to
48f92df
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds “Structure view groupings” to the Spring explorer: users can select which groups to show per project, with choices persisted per workspace.
- Introduces a “Select Groups to Show/Hide” command tied to project nodes in the Spring explorer.
- Persists per-project visible groups and sends them to the language server to shape the structure view.
- Refactors explorer tree initialization and expansion-state tracking into the provider.
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| vscode-extensions/vscode-spring-boot/package.json | Adds a project-node context menu item and command for group selection. |
| vscode-extensions/vscode-spring-boot/lib/explorer/structure-tree-manager.ts | Registers commands, persists group selections, and passes group filters to the LS. |
| vscode-extensions/vscode-spring-boot/lib/explorer/nodes.ts | Marks project nodes with a distinct context value (“project”) for menu targeting. |
| vscode-extensions/vscode-spring-boot/lib/explorer/explorer-tree-provider.ts | Adds a createTreeView helper and internalizes expansion-state tracking. |
| vscode-extensions/vscode-spring-boot/lib/copilot/copilotRequest.ts | Removes verbose request logging. |
| vscode-extensions/vscode-spring-boot/lib/Main.ts | Activates the structure explorer via the new provider API and manager. |
| headless-services/.../StructureViewUtil.java | Accepts Collection for group filters. |
| headless-services/.../SpringIndexCommands.java | Extends command args to per-project group maps, adds groups query command; parsing and return handling updated. |
| headless-services/.../ModulithStructureView.java | Accepts Collection for group filters. |
| headless-services/.../JMoleculesStructureView.java | Accepts Collection for group filters. |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
vscode-extensions/vscode-spring-boot/lib/explorer/structure-tree-manager.ts
Outdated
Show resolved
Hide resolved
vscode-extensions/vscode-spring-boot/lib/explorer/structure-tree-manager.ts
Show resolved
Hide resolved
| .map(groupEntry -> groupEntry.getAsString()) | ||
| .toList(); | ||
| if (groupsElement != null) { | ||
| selectedGroups = new Gson().fromJson(groupsElement, new TypeToken<Map<String, Set<String>>>() {}); |
Copilot
AI
Oct 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gson#fromJson requires a Type for generic deserialization. Pass the Type from the TypeToken using .getType(), otherwise this code will not compile and will not deserialize correctly.
| selectedGroups = new Gson().fromJson(groupsElement, new TypeToken<Map<String, Set<String>>>() {}); | |
| selectedGroups = new Gson().fromJson(groupsElement, new TypeToken<Map<String, Set<String>>>() {}.getType()); |
...ver/src/main/java/org/springframework/ide/vscode/boot/java/commands/SpringIndexCommands.java
Show resolved
Hide resolved
...ver/src/main/java/org/springframework/ide/vscode/boot/java/commands/SpringIndexCommands.java
Show resolved
Hide resolved
Signed-off-by: BoykoAlex <alex.boyko@broadcom.com>
d2d7bc6 to
4ab1223
Compare
Signed-off-by: BoykoAlex <alex.boyko@broadcom.com>
Fixes #1629