Skip to content

Conversation

@samgst-amazon
Copy link
Contributor

Workspace service should now correctly report file changes:

didCreate:

  • called when files are copied into a workspace folder through the IDE
  • called when a file is moved from one location to another within the workspace, didCreate will emit the uri of the new location that the file moved to

didDelete:

  • called when a file is moved from one location within the workspace to another, didDelete will emit the uri of the old location that the file moved from

didChangeWatchedFiles:

  • for file copies this now emits the new copied file's uri with FileChangedType as Created (before this was emitting the uri of the original copied parent and fileChangeType as Changed)
  • for file moves this now emits both the old and new uri paths with FileChangedType as Deleted and Created for each.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Description

Widened the scope of VFileEvents that each function was capturing and handled each event appropriately.

Widen the scope of VFileEvents to correctly report to the LSP what is happening with the workspace.

Checklist

  • My code follows the code style of this project
  • I have added tests to cover my changes
  • A short description of the change has been added to the CHANGELOG if the change is customer-facing in the IDE.
  • I have added metrics for my changes (if required)

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

@samgst-amazon samgst-amazon requested a review from a team as a code owner March 13, 2025 20:33
@github-actions
Copy link

github-actions bot commented Mar 13, 2025

Qodana Community for JVM

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at [email protected]

Copy link
Contributor

@leigaol leigaol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the comments from github actions before merge.

@samgst-amazon samgst-amazon enabled auto-merge (squash) March 13, 2025 21:20
@samgst-amazon samgst-amazon merged commit 38fe91e into feature/q-lsp Mar 13, 2025
15 of 18 checks passed
@samgst-amazon samgst-amazon deleted the samgst/q-lsp-capture-more-events branch March 13, 2025 22:38
leigaol pushed a commit to leigaol/aws-toolkit-jetbrains that referenced this pull request Mar 20, 2025
)

* capture more events for didCreate

* Emit correct data for move and copy events

* detekt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants