-
-
Notifications
You must be signed in to change notification settings - Fork 95
feat(workspace-tree): Sync open editor with workspace tree view #461
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
base: master
Are you sure you want to change the base?
Conversation
3937271 to
3f3207d
Compare
|
@cameron-martin , @vogelsgesang I assumed the tests might be failing because the github runner env doesn't have Update: I solved it now by explicitly calling the asynchronous sync function and awaiting it's result. I guess that's good enough for the test, but if someone knows of a more elegant way to do this feel free to comment. |
cb48761 to
a4b0bb4
Compare
|
@cameron-martin , @vogelsgesang I have deactivated the one problematic test case for now, so that this PR becomes green anyway. |
|
Looks like the tests are failing even though you disabled the problematic test. Could you take a look at this? |
0d67415 to
ac3d667
Compare
|
@cameron-martin I had to update the test to recent changes on |
fd9422c to
af53df2
Compare
|
Ok found it and fixed it. The problem was that due to the way the test was setup, there were multiple instances of the treeview provider which messed things up. |
The implementation of reveal() in the tree view required proper parent-child relationships and package path resolution. The changes ensure that: 1. The tree view can properly navigate and reveal items by maintaining correct parent references 2. Package paths are consistently resolved through the parent chain 3. The selected item in the tree view is synchronized with the currently open editor A cache of BazelPackageTreeItems was added to improve performance by: - Reducing redundant package path calculations - Avoiding bazel queries performed by existing getChildren operator - Minimizing repeated string operations when resolving package paths Part of bazel-contrib#353
af53df2 to
f3af823
Compare
This PR implements a synchronization between the file opened in the editor and the workspace tree view of the bazel extension.
Note on implementation:
The implementation of reveal() in the tree view required proper parent-child relationships and package path resolution. The changes ensure that:
A cache of BazelPackageTreeItems was added to improve performance by:
This PR is part of #353