eclipsesource / vscode-theia-extension

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VS Code & Theia Extension

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:

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:

Screenshot 2022-02-17 at 19 14 47

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:

Screenshot 2022-02-17 at 19 15 16

The Extension Menu allows execution of two communication samples:

  • Event to extension fires a custom event in the extension which is then responded to with a call back into Theia
  • Get message from extension executes a function handler in the extension

About


Languages

Language:TypeScript 97.8%Language:JavaScript 2.2%