forked from eclipse-theia/theia
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use binary message RPC protocol for plugin API
Refactors the plugin RPC protocol to make use of the new message-rpc introduced with eclipse-theia#11011/eclipse-theia#11228. - Refactor plugin-ext RpcProtocol API to reuse the new message-rpc protocol - Remove custom RPC message encoding and handling reuse message-rpc - Implement `QueuingChannelMultiplexer` that queues messages and sends them accumulated on the next process.tick (replaces the old Multiplexer implementation) - Refactors proxy handlers and remote target handlers - Use `Channel` instead of `MessageConnection` for creating new instances of RPCProtocol - Refactor `RpcMessageEncoder`/`RpcMessageDecoder` to enable overwritting of already registered value encoders/decoders. - Add mode property to base `RpcProtocol` to enable switching from a bidirectional RPC protocol to a client-only or server-only variant. - Implement special message encoders and decoders for the plugin communication. (Replacement for the old `ObjectTransferrer` JSON replacers/revivers) - Adapt `HostedPluginServer` and `HostedPluginClient` API to send/receive messages in binary format instead of strings. This enables direct writethrough of the binary messages received from the hosted plugin process. - Adapt `hosted-plugin-process` and `plugin-host` to directly send binary messages via `IpcChannel`/`BinaryMessagePipe` - Remove incorrect (and unused) notification proxy identifiers and instantiation - NotificationExt was instantiated in the main context - There were unused notification proxy identifiers for main and ext in the wrong contexts Part of eclipse-theia#10684 Fixes eclipse-theia#9514 Co-authored-by: Lucas Koehler <[email protected]> Contributed on behalf of STMicroelectronics
- Loading branch information
Showing
22 changed files
with
650 additions
and
526 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
{ | ||
"private": true, | ||
"name": "@theia/example-electron", | ||
"productName": "Theia Electron Example", | ||
"version": "1.26.0", | ||
"main": "src-gen/frontend/electron-main.js", | ||
"license": "EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0", | ||
"theia": { | ||
"target": "electron", | ||
"frontend": { | ||
"config": { | ||
"applicationName": "Theia Electron Example" | ||
} | ||
} | ||
}, | ||
"dependencies": { | ||
"@theia/api-samples": "1.26.0", | ||
"@theia/bulk-edit": "1.26.0", | ||
"@theia/callhierarchy": "1.26.0", | ||
"@theia/console": "1.26.0", | ||
"@theia/core": "1.26.0", | ||
"@theia/debug": "1.26.0", | ||
"@theia/editor": "1.26.0", | ||
"@theia/editor-preview": "1.26.0", | ||
"@theia/electron": "1.26.0", | ||
"@theia/external-terminal": "1.26.0", | ||
"@theia/file-search": "1.26.0", | ||
"@theia/filesystem": "1.26.0", | ||
"@theia/getting-started": "1.26.0", | ||
"@theia/git": "1.26.0", | ||
"@theia/keymaps": "1.26.0", | ||
"@theia/markers": "1.26.0", | ||
"@theia/messages": "1.26.0", | ||
"@theia/metrics": "1.26.0", | ||
"@theia/mini-browser": "1.26.0", | ||
"@theia/monaco": "1.26.0", | ||
"@theia/navigator": "1.26.0", | ||
"@theia/outline-view": "1.26.0", | ||
"@theia/output": "1.26.0", | ||
"@theia/plugin-dev": "1.26.0", | ||
"@theia/plugin-ext": "1.26.0", | ||
"@theia/plugin-ext-vscode": "1.26.0", | ||
"@theia/preferences": "1.26.0", | ||
"@theia/preview": "1.26.0", | ||
"@theia/process": "1.26.0", | ||
"@theia/property-view": "1.26.0", | ||
"@theia/scm": "1.26.0", | ||
"@theia/scm-extra": "1.26.0", | ||
"@theia/search-in-workspace": "1.26.0", | ||
"@theia/task": "1.26.0", | ||
"@theia/terminal": "1.26.0", | ||
"@theia/timeline": "1.26.0", | ||
"@theia/toolbar": "1.26.0", | ||
"@theia/typehierarchy": "1.26.0", | ||
"@theia/userstorage": "1.26.0", | ||
"@theia/variable-resolver": "1.26.0", | ||
"@theia/vsx-registry": "1.26.0", | ||
"@theia/workspace": "1.26.0" | ||
}, | ||
"scripts": { | ||
"build": "yarn -s compile && yarn -s bundle", | ||
"bundle": "theia build --mode development", | ||
"clean": "theia clean", | ||
"compile": "tsc -b", | ||
"lint": "theiaext lint", | ||
"rebuild": "theia rebuild:electron --cacheRoot ../..", | ||
"start": "yarn -s rebuild && theia start --plugins=local-dir:../../plugins", | ||
"start:debug": "yarn -s start --log-level=debug --remote-debugging-port=9222", | ||
"start:watch": "concurrently --kill-others -n tsc,bundle,run -c red,yellow,green \"tsc -b -w --preserveWatchOutput\" \"yarn -s watch:bundle\" \"yarn -s start\"", | ||
"test": "yarn -s rebuild && electron-mocha --timeout 60000 \"./lib/test/**/*.espec.js\"", | ||
"watch": "concurrently --kill-others -n tsc,bundle -c red,blue \"tsc -b -w --preserveWatchOutput\" \"yarn -s watch:bundle\"", | ||
"watch:bundle": "theia build --watch --mode development", | ||
"watch:compile": "tsc -b -w" | ||
}, | ||
"devDependencies": { | ||
"@theia/cli": "1.26.0", | ||
"electron": "^15.3.5" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,4 @@ | |
|
||
export * from './messaging-service'; | ||
export * from './ipc-connection-provider'; | ||
export * from './ipc-channel'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.