Skip to content
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

Bind command for explorer.newFolder #7843

Merged
merged 1 commit into from
May 26, 2020
Merged

Bind command for explorer.newFolder #7843

merged 1 commit into from
May 26, 2020

Conversation

vzhukovs
Copy link
Contributor

@vzhukovs vzhukovs commented May 19, 2020

What it does

This changes proposal adds bind for VS Code built-in command explorer.newFolder [1].

[1] microsoft/vscode/src/vs/workbench/contrib/files/browser/fileActions.ts#L112-L131

Signed-off-by: Vladyslav Zhukovskyi vzhukovs@redhat.com

How to test

Needed for Didact extension.

Review checklist

Reminder for reviewers

@vzhukovs vzhukovs added Team: Che-Editors issues regarding the che-editors team vscode issues related to VSCode compatibility labels May 19, 2020
@vzhukovs vzhukovs self-assigned this May 19, 2020
@akosyakov
Copy link
Member

Needed for Didact extension.

Are there steps to trigger these commands by using this extension?

@vzhukovs
Copy link
Contributor Author

vzhukovs commented May 20, 2020

Needed for Didact extension.

Are there steps to trigger these commands by using this extension?

Sure.

Triggering explorer.newFolder:
index js — Theia Browser Example 2020-05-20 12-59-28

Copy link
Member

@azatsarynnyy azatsarynnyy left a comment

Choose a reason for hiding this comment

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

explorer.newFolder works well for me
but after triggering workbench.view.explorer I've got the following error in the browser's console:

rpc-protocol.ts:376 Uncaught (in promise) TypeError: Converting circular structure to JSON
    --> starting at object with constructor 'SplitPanel'
    |     property '_layout' -> object with constructor 'ViewContainerLayout'
    --- property '_parent' closes the circle
    at JSON.stringify (<anonymous>)
    at Function.push.../../packages/plugin-ext/lib/common/rpc-protocol.js.MessageFactory.replyOK (rpc-protocol.ts:376)
    at rpc-protocol.ts:231

@akosyakov
Copy link
Member

@vzhukovs
Copy link
Contributor Author

explorer.newFolder works well for me
but after triggering workbench.view.explorer I've got the following error in the browser's console:

rpc-protocol.ts:376 Uncaught (in promise) TypeError: Converting circular structure to JSON
    --> starting at object with constructor 'SplitPanel'
    |     property '_layout' -> object with constructor 'ViewContainerLayout'
    --- property '_parent' closes the circle
    at JSON.stringify (<anonymous>)
    at Function.push.../../packages/plugin-ext/lib/common/rpc-protocol.js.MessageFactory.replyOK (rpc-protocol.ts:376)
    at rpc-protocol.ts:231

Created sample plugin, that simply calls Theia's internal command workbench.files.action.focusFilesExplorer, and it seems that there is a problem with serialization objects. Issue reproduces with custom plugin.

Created following depends on issue.

Signed-off-by: Vladyslav Zhukovskyi <vzhukovs@redhat.com>
@vzhukovs vzhukovs force-pushed the built_in_commands branch from 05356a7 to 2d14f55 Compare May 25, 2020 15:53
@vzhukovs vzhukovs changed the title Bind commands for explorer.newFolder and workbench.view.explorer Bind commands for explorer.newFolder May 25, 2020
@vzhukovs
Copy link
Contributor Author

Updated description w/ PR's title. Excluded bind for workbench.view.explorer command.

@vzhukovs vzhukovs changed the title Bind commands for explorer.newFolder Bind command for explorer.newFolder May 25, 2020
@akosyakov akosyakov requested a review from azatsarynnyy May 26, 2020 07:02
Copy link
Member

@azatsarynnyy azatsarynnyy left a comment

Choose a reason for hiding this comment

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

I've checked it again with Red Hat Didact extension. Create Folder command works well.

@vzhukovs vzhukovs merged commit aba96c7 into master May 26, 2020
@vzhukovs vzhukovs deleted the built_in_commands branch May 26, 2020 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team: Che-Editors issues regarding the che-editors team vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants