Skip to content

Conversation

@BoykoAlex
Copy link
Contributor

@BoykoAlex BoykoAlex commented Oct 1, 2025

Fixes #1629

@BoykoAlex BoykoAlex force-pushed the structure-view-groups branch from 6713347 to 48f92df Compare October 1, 2025 20:53
@BoykoAlex BoykoAlex requested a review from Copilot October 1, 2025 20:53
Copy link
Contributor

Copilot AI left a 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.

.map(groupEntry -> groupEntry.getAsString())
.toList();
if (groupsElement != null) {
selectedGroups = new Gson().fromJson(groupsElement, new TypeToken<Map<String, Set<String>>>() {});
Copy link

Copilot AI Oct 1, 2025

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.

Suggested change
selectedGroups = new Gson().fromJson(groupsElement, new TypeToken<Map<String, Set<String>>>() {});
selectedGroups = new Gson().fromJson(groupsElement, new TypeToken<Map<String, Set<String>>>() {}.getType());

Copilot uses AI. Check for mistakes.
Signed-off-by: BoykoAlex <[email protected]>
@BoykoAlex BoykoAlex force-pushed the structure-view-groups branch from d2d7bc6 to 4ab1223 Compare October 1, 2025 21:38
Signed-off-by: BoykoAlex <[email protected]>
@BoykoAlex BoykoAlex merged commit 23e4963 into main Oct 2, 2025
4 checks passed
@BoykoAlex BoykoAlex deleted the structure-view-groups branch October 2, 2025 03:30
@martinlippert martinlippert added this to the 5.0.0.RELEASE milestone Oct 2, 2025
@martinlippert martinlippert added for: vscode something that is specific for VSCode theme: structural view labels Oct 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

for: vscode something that is specific for VSCode theme: structural view

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[structure view] allow users to select the groups to display

3 participants