VS Code & Theia Extension
February 18, 2022 ยท View on GitHub
Example mono-repo demonstrating the following:
Simple implementation of a custom Theia plugin API namespace
This follows the custom API namespace documentation and is implemented in the ide-ext package, specifically:
- Backend which registers API support in the plugin host
- Plugin which implements the support for the custom API
- Frontend which exposes API functionality to the frontend via RPC
The API is outlined in the api package
A VS Code Extension which upgrades functionality in Theia
This extension is found in the extension package with the Theia plugin namespace implemented here.
Four custom methods of calling into Theia are outlined:
- A function handler
- A custom event from Theia
- A custom function in Theia
- Executing a custom command in Theia
Running
Clone this repo and execute:
yarn
Running the VS Code Extension launch configuration starts an extension host with the vanilla extension running in VS Code:
The extension functionality can be executed using the tree view button exposed in the added view.
Running the Theia IDE launch configuration starts a browser-based Theia IDE which also loads the extension:
The Extension Menu allows execution of two communication samples:
Event to extensionfires a custom event in the extension which is then responded to with a call back into TheiaGet message from extensionexecutes a function handler in the extension