-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
plugin: add workspace file api #7718
Conversation
Is there a more standard/automated way of testing newly added plugin apis? |
089384c
to
f87fce8
Compare
Should not we rather listen to |
@akosyakov these new APIs are only triggered by the user-interface and not the filesystem from what I understand by their definitions. For example: |
@vince-fugnitto I meant by In this PR we disregard it and implement alternative logic to already existing. I don't think it is good. |
I mean we already have move APIs here for instance: theia/packages/filesystem/src/browser/filesystem-watcher.ts Lines 130 to 133 in 00c1747
Which report an event by triggered by a user from any window for the same backend. I wonder should not we add missing APIs there instead? I am not sure what is right here, but having duplicate events does not look good. We should figure out what should be used. It could be that our use cases is different to VS Code, i.e. they cannot have multiple windows for the same workspace, but we can. Can they? |
@akosyakov ok I see what you mean now. I think I already took a look at the
I can look into it, although using something designed with "watching" in mind confuses me a bit right now. But I agree that it would be better to avoid duplicating events.
No we can't open the same workspace twice in VS Code. |
We have a task to redesign the FS completely that it is aligned with VS Code: #7127 I discussed it with Sven and decided to do it ourself, since it is very involving and we don't want many iterations on PR for this. I was hoping that #7171 can be done just by binding events from theia/packages/filesystem/src/browser/filesystem-watcher.ts Lines 130 to 133 in 00c1747
I'm not sure it is good time to work on it. Maybe we are better to wait till #7127 is resolved. That's very likely that we will have to rework this part then. If you want to pursue it still:
We should not use it. Events should be exposed on
Yes, it is fine. It cannot be used anywhere else except |
@akosyakov thanks for the insight. I already started using the |
@marechal-p ok, ping when you need another look. Please file CQs earlier if you copied code to the plugin system, it will help to merge the PR faster. |
f87fce8
to
f2e1c5c
Compare
Had issues with my Eclipse account, finally opened the CQ: https://dev.eclipse.org/ipzilla/show_bug.cgi?id=22148 @akosyakov this PR is ready for review again, thanks. |
Integration tests for documents are broken. We should make sure that they work as on master. |
packages/filesystem/src/browser/filesystem-frontend-contribution.ts
Outdated
Show resolved
Hide resolved
faa5f7e
to
1606e55
Compare
1606e55
to
cbaa24f
Compare
@akosyakov Reverted most changes, tell me if what is left is better? CI is green now. |
I'm uncomfortable to change Event APIs and propagate these changes to FS watcher APIs. Can we revert them for now till we know how the final solution will look like? I would prefer to copy as much as possible code for the extension host process from VS Code without changing to avoid diverging and it will likely remove the need for such APIs. |
cbaa24f
to
4388f34
Compare
@akosyakov reverted the changes to the events API. If the current changes don't make your planned changes more complicated then let's merge this :) |
4388f34
to
09cf4c9
Compare
Add `on(will|did)(create|rename|delete)Files` to the plugin's workspace api. This implementation does not handle the `WorkspaceEdit` apis. Signed-off-by: Paul Maréchal <paul.marechal@ericsson.com>
09cf4c9
to
0a5139d
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.
Code changes looks good to me, but i have not tried. @vince-fugnitto Could you verify? I think typescript and java extension make use of these events.
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.
Follow-up of #7718 (review)
I verified the following:
- the events are correctly fired using the plugin referenced in the pull-request description.
- verified that the
vscode-typescript-builtin
does not throw errors (logs) regarding the missing events ([TS] VS Code TS extension throws various errors #7840).
What it does
Add
on(will|did)(create|rename|delete)Files
to the plugin's workspaceapi. This implementation does not handle the
WorkspaceEdit
apis.Fixes: #7171
How to test
Review checklist
Reminder for reviewers