-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Theia Plugin Implementation
In this document we'll go over the basic mechanics involved for the plugin system.
Plugins are querying Theia's state via RPC and they are commonly run inside a "host process". It is a sub-process spawned by Theia's backend to run the plugin isolated from the main process. We refer to the plugin code as ext, and use main when talking about Theia-facing implementations.
The main side hooks into the diverse Theia extension apis, and forwards calls to the ext side over RPC.
The main side should run in the browser context, since this is where most of the IDE state is.
The RPC interfaces are defined under packages/plugin-ext/src/common/plugin-api-rpc.ts. The ext side code will run in the "extension host process", keep this in mind as your code will run isolated from other Theia processes. If you need something from Theia, it has to be fetched over RPC by querying the main side from the ext side.
-
mainimplementations:packages/plugin-ext/src/main -
extimplementations:packages/plugin-ext/src/plugin
You need the following elements for a given component to work:
- A main proxy identifier
- An ext proxy identifier
- A main interface
- An ext interface
- A main implementation
- An ext implementation
Methods to be called via RPC must start with $.
Example - Task API:
- TaskMain proxy identifier
- TaskExt proxy identifier
- TaskMain interface
- TaskExt interface
- TaskMainImpl
- TaskExtImpl
Note how the main implementation refers to the ext interface, and vice-versa.
Project Management
- Roadmap
- Dev Meetings
- Technical Meetings
- Community Call
- Intellectual Property (IP) guide
- Registering CQs (Deprecated)
Documentation