-
Notifications
You must be signed in to change notification settings - Fork 220
Adoption of index changed event with a list of affected projects #1710
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
Signed-off-by: BoykoAlex <[email protected]>
Signed-off-by: BoykoAlex <[email protected]>
Signed-off-by: BoykoAlex <[email protected]>
af3bfa5 to
f4b0960
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
This PR enhances the Spring index update notification system to include information about which projects were affected by index changes, enabling more efficient partial tree refreshes instead of full reloads.
- Modified the
SpringIndexUpdatedNotificationtype to includeIndexUpdateDetailswith affected project information - Implemented partial tree refresh logic in both VSCode and Eclipse views that updates only affected projects
- Refactored state management by replacing
BootLsStatewith a more focusedSpringIndexStatein Eclipse
Reviewed Changes
Copilot reviewed 21 out of 22 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| notification.ts | Added IndexUpdateDetails interface and updated notification type signature |
| structure-tree-manager.ts | Implemented partial tree refresh logic with affected project handling |
| nodes.ts | Refactored node classes, converted methods to properties, removed base SpringNode class |
| explorer-tree-provider.ts | Simplified by removing expansion state tracking logic |
| apiManager.ts | Updated emitter type to use IndexUpdateDetails instead of void |
| api.d.ts | Updated Spring index event signature |
| SpringMetamodelIndexingTest.java | Changed from List to Set accessor methods in test assertions |
| JsonNodeHandler.java | Enhanced node ID assignment to prioritize project ID |
| SpringSymbolIndex.java | Changed affected projects from List to LinkedHashSet to avoid duplicates |
| IndexUpdatedParams.java | Changed type from List<String> to Set<String> for affected projects |
| SpringIndexState.java | New state management class for Spring index updates |
| STS4LanguageClientImpl.java | Updated to use new SpringIndexState and DefaultLanguageClient |
| LanguageServerCommonsActivator.java | Added singleton SpringIndexState instance |
| StructureClient.java | Updated parameter record to include affected projects collection |
| StereotypeNodeDeserializer.java | Added PROJECT_ID constant |
| StereotypeNode.java | Added getProjectId() helper method |
| RefreshAction.java | Updated refresh call signature |
| LogicalStructureView.java | Implemented partial refresh logic for affected projects |
| GroupingAction.java | Updated refresh call signature |
| DelegatingStreamConnectionProvider.java | Removed obsolete state management code |
| BootLsState.java | Deleted - replaced by SpringIndexState |
| BootLanguageServerPlugin.java | Removed BootLsState field and getter |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
vscode-extensions/vscode-spring-boot/lib/explorer/structure-tree-manager.ts
Show resolved
Hide resolved
vscode-extensions/vscode-spring-boot/lib/explorer/structure-tree-manager.ts
Outdated
Show resolved
Hide resolved
| // Serves 2 purposes: non UI trigerred refresh as a result of the index update and a UI trigerred refresh | ||
| // The UI trigerred refresh needs to preceed with an event fired such that tree view would kick off a new promise getting all new root elements and would show progress while promise is being resolved. | ||
| // The index update typically would have a list of projects for which index has changed then the refresh can be silent with letting the tree know about new data once it is computed | ||
| // If the index update event doesn't have a list of project then this is an edge case for which we'd show the preogress and treat it like UI trigerred refresh |
Copilot
AI
Nov 7, 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.
Corrected spelling of 'preogress' to 'progress' and 'trigerred' to 'triggered'.
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
Outdated
Show resolved
Hide resolved
....ls.eclipse.commons/src/org/springframework/tooling/ls/eclipse/commons/SpringIndexState.java
Outdated
Show resolved
Hide resolved
...work.tooling.boot.ls/src/org/springframework/tooling/boot/ls/views/LogicalStructureView.java
Show resolved
Hide resolved
…rc/org/springframework/tooling/boot/ls/views/LogicalStructureView.java Co-authored-by: Copilot <[email protected]> Signed-off-by: Alex Boyko <[email protected]>
…ee-manager.ts Co-authored-by: Copilot <[email protected]> Signed-off-by: Alex Boyko <[email protected]>
…ee-manager.ts Co-authored-by: Copilot <[email protected]> Signed-off-by: Alex Boyko <[email protected]>
…ee-manager.ts Co-authored-by: Copilot <[email protected]> Signed-off-by: Alex Boyko <[email protected]>
…e.commons/src/org/springframework/tooling/ls/eclipse/commons/SpringIndexState.java Co-authored-by: Copilot <[email protected]> Signed-off-by: Alex Boyko <[email protected]>
--------- Signed-off-by: Alex Boyko <[email protected]>
No description provided.