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

Support for VSCode Command workbench.action.revertAndCloseActiveEditor #7575

Closed
nmorenor opened this issue Apr 14, 2020 · 1 comment · Fixed by #9728
Closed

Support for VSCode Command workbench.action.revertAndCloseActiveEditor #7575

nmorenor opened this issue Apr 14, 2020 · 1 comment · Fixed by #9728
Labels
help wanted issues meant to be picked up, require help vscode issues related to VSCode compatibility

Comments

@nmorenor
Copy link
Contributor

We have an extension and we are looking to be compatible with Theia IDE I see that there are already work in progress to support the vscode built-in commands at 4050. Which will make the extension to work as if it were running on vscode.

We are using also the command workbench.action.revertAndCloseActiveEditor. I've just cloned the Theia repo and manually and dropped the .vsix under plugins directory.

@vince-fugnitto vince-fugnitto added the vscode issues related to VSCode compatibility label Apr 14, 2020
@akosyakov akosyakov added the help wanted issues meant to be picked up, require help label Apr 15, 2020
@akosyakov
Copy link
Member

Missing editor commands should be added here: https://github.com/eclipse-theia/theia/blob/master/packages/plugin-ext-vscode/src/browser/plugin-vscode-commands-contribution.ts#L348

Referenced implementation in VS Code: https://github.com/microsoft/vscode/blob/3f0e5b4ab059cb6c05ecac091b652cfc50b9292f/src/vs/workbench/browser/parts/editor/editorActions.ts#L462

In Theia:

  • to revert: MonacoEditor.getCurrent(EditorManager).document.revert
  • to close: EditorManager.close(EditorManager.current.id)

Don't forget to await.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted issues meant to be picked up, require help vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants