@theia/plugin-ext 1.19.0 → 1.21.0-next.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/common/connection.d.ts +47 -33
- package/lib/common/connection.d.ts.map +1 -1
- package/lib/common/connection.js +90 -28
- package/lib/common/connection.js.map +1 -1
- package/lib/common/plugin-api-rpc.d.ts +2 -3
- package/lib/common/plugin-api-rpc.d.ts.map +1 -1
- package/lib/common/plugin-api-rpc.js.map +1 -1
- package/lib/common/plugin-protocol.d.ts +2 -1
- package/lib/common/plugin-protocol.d.ts.map +1 -1
- package/lib/common/plugin-protocol.js.map +1 -1
- package/lib/hosted/browser/hosted-plugin.js +1 -1
- package/lib/hosted/browser/hosted-plugin.js.map +1 -1
- package/lib/hosted/node/scanners/scanner-theia.d.ts +1 -1
- package/lib/hosted/node/scanners/scanner-theia.d.ts.map +1 -1
- package/lib/hosted/node/scanners/scanner-theia.js +4 -1
- package/lib/hosted/node/scanners/scanner-theia.js.map +1 -1
- package/lib/main/browser/debug/debug-main.d.ts +3 -3
- package/lib/main/browser/debug/debug-main.d.ts.map +1 -1
- package/lib/main/browser/debug/debug-main.js +1 -2
- package/lib/main/browser/debug/debug-main.js.map +1 -1
- package/lib/main/browser/debug/plugin-debug-session-factory.d.ts +4 -4
- package/lib/main/browser/debug/plugin-debug-session-factory.d.ts.map +1 -1
- package/lib/main/browser/debug/plugin-debug-session-factory.js +1 -1
- package/lib/main/browser/debug/plugin-debug-session-factory.js.map +1 -1
- package/lib/main/browser/file-system-main-impl.js +1 -1
- package/lib/main/browser/file-system-main-impl.js.map +1 -1
- package/lib/main/browser/main-context.js +2 -2
- package/lib/main/browser/main-context.js.map +1 -1
- package/lib/main/browser/tasks-main.d.ts.map +1 -1
- package/lib/main/browser/tasks-main.js +6 -0
- package/lib/main/browser/tasks-main.js.map +1 -1
- package/lib/main/browser/view/plugin-view-registry.d.ts.map +1 -1
- package/lib/main/browser/view/plugin-view-registry.js +14 -3
- package/lib/main/browser/view/plugin-view-registry.js.map +1 -1
- package/lib/main/browser/view/tree-view-widget.d.ts +0 -3
- package/lib/main/browser/view/tree-view-widget.d.ts.map +1 -1
- package/lib/main/browser/view/tree-view-widget.js +1 -11
- package/lib/main/browser/view/tree-view-widget.js.map +1 -1
- package/lib/plugin/message-registry.d.ts.map +1 -1
- package/lib/plugin/message-registry.js +5 -5
- package/lib/plugin/message-registry.js.map +1 -1
- package/lib/plugin/node/debug/debug.d.ts +4 -4
- package/lib/plugin/node/debug/debug.d.ts.map +1 -1
- package/lib/plugin/node/debug/debug.js +3 -4
- package/lib/plugin/node/debug/debug.js.map +1 -1
- package/lib/plugin/node/debug/plugin-debug-adapter-session.d.ts +7 -7
- package/lib/plugin/node/debug/plugin-debug-adapter-session.d.ts.map +1 -1
- package/lib/plugin/node/debug/plugin-debug-adapter-session.js +6 -6
- package/lib/plugin/node/debug/plugin-debug-adapter-session.js.map +1 -1
- package/lib/plugin/node/debug/plugin-debug-adapter-starter.d.ts +7 -5
- package/lib/plugin/node/debug/plugin-debug-adapter-starter.d.ts.map +1 -1
- package/lib/plugin/node/debug/plugin-debug-adapter-starter.js +6 -13
- package/lib/plugin/node/debug/plugin-debug-adapter-starter.js.map +1 -1
- package/lib/plugin/plugin-context.d.ts.map +1 -1
- package/lib/plugin/plugin-context.js +2 -2
- package/lib/plugin/plugin-context.js.map +1 -1
- package/lib/plugin/quick-open.d.ts +1 -1
- package/lib/plugin/quick-open.d.ts.map +1 -1
- package/lib/plugin/quick-open.js +2 -4
- package/lib/plugin/quick-open.js.map +1 -1
- package/lib/plugin/tasks/tasks.d.ts +1 -3
- package/lib/plugin/tasks/tasks.d.ts.map +1 -1
- package/lib/plugin/tasks/tasks.js +3 -17
- package/lib/plugin/tasks/tasks.js.map +1 -1
- package/package.json +24 -24
- package/src/common/connection.ts +98 -41
- package/src/common/plugin-api-rpc.ts +2 -4
- package/src/common/plugin-protocol.ts +2 -2
- package/src/hosted/browser/hosted-plugin.ts +1 -1
- package/src/hosted/node/scanners/scanner-theia.ts +5 -3
- package/src/main/browser/debug/debug-main.ts +3 -4
- package/src/main/browser/debug/plugin-debug-session-factory.ts +3 -3
- package/src/main/browser/file-system-main-impl.ts +1 -1
- package/src/main/browser/main-context.ts +3 -3
- package/src/main/browser/style/tree.css +4 -0
- package/src/main/browser/tasks-main.ts +7 -0
- package/src/main/browser/view/plugin-view-registry.ts +16 -3
- package/src/main/browser/view/tree-view-widget.tsx +2 -19
- package/src/plugin/message-registry.ts +5 -6
- package/src/plugin/node/debug/debug.ts +7 -8
- package/src/plugin/node/debug/plugin-debug-adapter-session.ts +9 -9
- package/src/plugin/node/debug/plugin-debug-adapter-starter.ts +11 -18
- package/src/plugin/plugin-context.ts +4 -3
- package/src/plugin/quick-open.ts +4 -7
- package/src/plugin/tasks/tasks.ts +4 -18
- package/lib/common/plugin-message-reader.d.ts +0 -46
- package/lib/common/plugin-message-reader.d.ts.map +0 -1
- package/lib/common/plugin-message-reader.js +0 -116
- package/lib/common/plugin-message-reader.js.map +0 -1
- package/lib/common/plugin-message-writer.d.ts +0 -38
- package/lib/common/plugin-message-writer.d.ts.map +0 -1
- package/lib/common/plugin-message-writer.js +0 -67
- package/lib/common/plugin-message-writer.js.map +0 -1
- package/lib/main/browser/connection-main.d.ts +0 -59
- package/lib/main/browser/connection-main.d.ts.map +0 -1
- package/lib/main/browser/connection-main.js +0 -98
- package/lib/main/browser/connection-main.js.map +0 -1
- package/lib/plugin/connection-ext.d.ts +0 -56
- package/lib/plugin/connection-ext.d.ts.map +0 -1
- package/lib/plugin/connection-ext.js +0 -88
- package/lib/plugin/connection-ext.js.map +0 -1
- package/src/common/plugin-message-reader.ts +0 -111
- package/src/common/plugin-message-writer.ts +0 -65
- package/src/main/browser/connection-main.ts +0 -107
- package/src/plugin/connection-ext.ts +0 -95
|
@@ -19,7 +19,6 @@ exports.TasksExtImpl = void 0;
|
|
|
19
19
|
const plugin_api_rpc_1 = require("../../common/plugin-api-rpc");
|
|
20
20
|
const converter = require("../type-converters");
|
|
21
21
|
const types_impl_1 = require("../types-impl");
|
|
22
|
-
const rpc_protocol_1 = require("../../common/rpc-protocol");
|
|
23
22
|
const task_provider_1 = require("./task-provider");
|
|
24
23
|
const event_1 = require("@theia/core/lib/common/event");
|
|
25
24
|
const coreutils_1 = require("@theia/core/shared/@phosphor/coreutils");
|
|
@@ -37,12 +36,7 @@ class TasksExtImpl {
|
|
|
37
36
|
this.onDidTerminateTask = new event_1.Emitter();
|
|
38
37
|
this.onDidExecuteTaskProcess = new event_1.Emitter();
|
|
39
38
|
this.onDidTerminateTaskProcess = new event_1.Emitter();
|
|
40
|
-
this.disposed = false;
|
|
41
39
|
this.proxy = rpc.getProxy(plugin_api_rpc_1.PLUGIN_RPC_CONTEXT.TASKS_MAIN);
|
|
42
|
-
this.fetchTaskExecutions();
|
|
43
|
-
}
|
|
44
|
-
dispose() {
|
|
45
|
-
this.disposed = true;
|
|
46
40
|
}
|
|
47
41
|
get taskExecutions() {
|
|
48
42
|
return [...this.executions.values()];
|
|
@@ -181,17 +175,9 @@ class TasksExtImpl {
|
|
|
181
175
|
this.proxy.$unregister(callId);
|
|
182
176
|
});
|
|
183
177
|
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
taskExecutions.forEach(execution => this.getTaskExecution(execution));
|
|
188
|
-
}
|
|
189
|
-
catch (error) {
|
|
190
|
-
if (this.disposed && rpc_protocol_1.ConnectionClosedError.is(error)) {
|
|
191
|
-
return;
|
|
192
|
-
}
|
|
193
|
-
console.error(`Can not fetch running tasks: ${error}`);
|
|
194
|
-
}
|
|
178
|
+
// Initial `this.executions` map with the running tasks from the previous session
|
|
179
|
+
async $initLoadedTasks(taskExecutions) {
|
|
180
|
+
taskExecutions.forEach(execution => this.getTaskExecution(execution));
|
|
195
181
|
}
|
|
196
182
|
getTaskExecution(execution) {
|
|
197
183
|
const executionId = execution.id;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tasks.js","sourceRoot":"","sources":["../../../src/plugin/tasks/tasks.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,gEAMqC;AAErC,gDAAgD;AAChD,8CAA4D;
|
|
1
|
+
{"version":3,"file":"tasks.js","sourceRoot":"","sources":["../../../src/plugin/tasks/tasks.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,gEAMqC;AAErC,gDAAgD;AAChD,8CAA4D;AAE5D,mDAAsD;AACtD,wDAA8D;AAE9D,sEAA8D;AAC9D,sEAAwE;AAGxE,MAAa,YAAY;IAiBrB,YAAY,GAAgB,EAAW,WAAmC;QAAnC,gBAAW,GAAX,WAAW,CAAwB;QAdlE,WAAM,GAAG,CAAC,CAAC;QACX,gBAAW,GAAG,IAAI,GAAG,EAA+B,CAAC;QACrD,eAAU,GAAG,IAAI,GAAG,EAA+B,CAAC;QAClD,mBAAc,GAAW,gBAAI,CAAC,KAAK,EAAE,CAAC;QAEtC,uBAAkB,GAAmC,IAAI,GAAG,EAAE,CAAC;QAC/D,6BAAwB,GAAmC,IAAI,GAAG,EAAE,CAAC;QAG9D,qBAAgB,GAAkC,IAAI,eAAO,EAAwB,CAAC;QACtF,uBAAkB,GAAgC,IAAI,eAAO,EAAsB,CAAC;QACpF,4BAAuB,GAAyC,IAAI,eAAO,EAA+B,CAAC;QAC3G,8BAAyB,GAAuC,IAAI,eAAO,EAA6B,CAAC;QAGtH,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,QAAQ,CAAC,mCAAkB,CAAC,UAAU,CAAC,CAAC;IAC7D,CAAC;IAED,IAAI,cAAc;QACd,OAAO,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;IACzC,CAAC;IAED,IAAI,cAAc;QACd,OAAO,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC;IACvC,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,SAA2B,E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,CAAC,GAAG,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;SACnD;QACD,OAAO,EAAE,CAAC;IACd,CAAC;IAEO,cAAc;QAClB,OAAO,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;IACnD,CAAC;CACJ;AApND,oCAoNC"}
|
package/package.json
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/plugin-ext",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.21.0-next.14+afd980a4d4f",
|
|
4
4
|
"description": "Theia - Plugin Extension",
|
|
5
5
|
"main": "lib/common/index.js",
|
|
6
6
|
"typings": "lib/common/index.d.ts",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@theia/bulk-edit": "1.
|
|
9
|
-
"@theia/callhierarchy": "1.
|
|
10
|
-
"@theia/console": "1.
|
|
11
|
-
"@theia/core": "1.
|
|
12
|
-
"@theia/debug": "1.
|
|
13
|
-
"@theia/editor": "1.
|
|
14
|
-
"@theia/file-search": "1.
|
|
15
|
-
"@theia/filesystem": "1.
|
|
16
|
-
"@theia/markers": "1.
|
|
17
|
-
"@theia/messages": "1.
|
|
18
|
-
"@theia/monaco": "1.
|
|
19
|
-
"@theia/navigator": "1.
|
|
20
|
-
"@theia/output": "1.
|
|
21
|
-
"@theia/plugin": "1.
|
|
22
|
-
"@theia/preferences": "1.
|
|
23
|
-
"@theia/scm": "1.
|
|
24
|
-
"@theia/search-in-workspace": "1.
|
|
25
|
-
"@theia/task": "1.
|
|
26
|
-
"@theia/terminal": "1.
|
|
27
|
-
"@theia/timeline": "1.
|
|
28
|
-
"@theia/workspace": "1.
|
|
8
|
+
"@theia/bulk-edit": "1.21.0-next.14+afd980a4d4f",
|
|
9
|
+
"@theia/callhierarchy": "1.21.0-next.14+afd980a4d4f",
|
|
10
|
+
"@theia/console": "1.21.0-next.14+afd980a4d4f",
|
|
11
|
+
"@theia/core": "1.21.0-next.14+afd980a4d4f",
|
|
12
|
+
"@theia/debug": "1.21.0-next.14+afd980a4d4f",
|
|
13
|
+
"@theia/editor": "1.21.0-next.14+afd980a4d4f",
|
|
14
|
+
"@theia/file-search": "1.21.0-next.14+afd980a4d4f",
|
|
15
|
+
"@theia/filesystem": "1.21.0-next.14+afd980a4d4f",
|
|
16
|
+
"@theia/markers": "1.21.0-next.14+afd980a4d4f",
|
|
17
|
+
"@theia/messages": "1.21.0-next.14+afd980a4d4f",
|
|
18
|
+
"@theia/monaco": "1.21.0-next.14+afd980a4d4f",
|
|
19
|
+
"@theia/navigator": "1.21.0-next.14+afd980a4d4f",
|
|
20
|
+
"@theia/output": "1.21.0-next.14+afd980a4d4f",
|
|
21
|
+
"@theia/plugin": "1.21.0-next.14+afd980a4d4f",
|
|
22
|
+
"@theia/preferences": "1.21.0-next.14+afd980a4d4f",
|
|
23
|
+
"@theia/scm": "1.21.0-next.14+afd980a4d4f",
|
|
24
|
+
"@theia/search-in-workspace": "1.21.0-next.14+afd980a4d4f",
|
|
25
|
+
"@theia/task": "1.21.0-next.14+afd980a4d4f",
|
|
26
|
+
"@theia/terminal": "1.21.0-next.14+afd980a4d4f",
|
|
27
|
+
"@theia/timeline": "1.21.0-next.14+afd980a4d4f",
|
|
28
|
+
"@theia/workspace": "1.21.0-next.14+afd980a4d4f",
|
|
29
29
|
"@types/markdown-it": "*",
|
|
30
30
|
"@types/mime": "^2.0.1",
|
|
31
31
|
"decompress": "^4.2.1",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"watch": "theiaext watch"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
|
-
"@theia/ext-scripts": "1.
|
|
85
|
+
"@theia/ext-scripts": "1.20.0",
|
|
86
86
|
"@types/decompress": "^4.2.2",
|
|
87
87
|
"@types/escape-html": "^0.0.20",
|
|
88
88
|
"@types/lodash.clonedeep": "^4.5.3",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"nyc": {
|
|
93
93
|
"extends": "../../configs/nyc.json"
|
|
94
94
|
},
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "afd980a4d4ff6b48d70fc0ce1e459f6496c62624"
|
|
96
96
|
}
|
package/src/common/connection.ts
CHANGED
|
@@ -13,69 +13,126 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { IWebSocket, MessageReader, MessageWriter, Message } from '@theia/core/shared/vscode-ws-jsonrpc';
|
|
16
|
+
import { Channel } from '@theia/debug/lib/common/debug-service';
|
|
17
|
+
import { ConnectionExt, ConnectionMain } from './plugin-api-rpc';
|
|
18
|
+
import { Emitter } from '@theia/core/lib/common/event';
|
|
20
19
|
|
|
21
20
|
/**
|
|
22
|
-
*
|
|
21
|
+
* A channel communicating with a counterpart in a plugin host.
|
|
23
22
|
*/
|
|
24
|
-
export
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
* Allows to forward messages to another connection.
|
|
29
|
-
*
|
|
30
|
-
* @param to the connection to forward messages
|
|
31
|
-
* @param map the function in which the message can be changed before forwarding
|
|
32
|
-
*/
|
|
33
|
-
forward(to: Connection, map?: (message: Message) => Message): void;
|
|
34
|
-
}
|
|
23
|
+
export class PluginChannel implements Channel {
|
|
24
|
+
private messageEmitter: Emitter<string> = new Emitter();
|
|
25
|
+
private errorEmitter: Emitter<unknown> = new Emitter();
|
|
26
|
+
private closedEmitter: Emitter<void> = new Emitter();
|
|
35
27
|
|
|
36
|
-
/**
|
|
37
|
-
* The container for message reader and writer which can be used to create connection between plugins and main side.
|
|
38
|
-
*/
|
|
39
|
-
export class PluginConnection implements Connection {
|
|
40
28
|
constructor(
|
|
41
|
-
readonly
|
|
42
|
-
readonly
|
|
43
|
-
|
|
29
|
+
protected readonly id: string,
|
|
30
|
+
protected readonly connection: ConnectionExt | ConnectionMain) { }
|
|
31
|
+
|
|
32
|
+
send(content: string): void {
|
|
33
|
+
this.connection.$sendMessage(this.id, content);
|
|
44
34
|
}
|
|
45
35
|
|
|
46
|
-
|
|
47
|
-
this.
|
|
48
|
-
const output = map(input);
|
|
49
|
-
to.writer.write(output);
|
|
50
|
-
});
|
|
36
|
+
fireMessageReceived(msg: string): void {
|
|
37
|
+
this.messageEmitter.fire(msg);
|
|
51
38
|
}
|
|
52
|
-
}
|
|
53
39
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
export class PluginWebSocketChannel implements IWebSocket {
|
|
58
|
-
constructor(protected readonly connection: PluginConnection) { }
|
|
40
|
+
fireError(error: unknown): void {
|
|
41
|
+
this.errorEmitter.fire(error);
|
|
42
|
+
}
|
|
59
43
|
|
|
60
|
-
|
|
61
|
-
this.
|
|
44
|
+
fireClosed(): void {
|
|
45
|
+
this.closedEmitter.fire();
|
|
62
46
|
}
|
|
63
47
|
|
|
64
48
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
65
49
|
onMessage(cb: (data: any) => void): void {
|
|
66
|
-
this.
|
|
50
|
+
this.messageEmitter.event(cb);
|
|
67
51
|
}
|
|
68
52
|
|
|
69
53
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
70
54
|
onError(cb: (reason: any) => void): void {
|
|
71
|
-
this.
|
|
55
|
+
this.errorEmitter.event(cb);
|
|
72
56
|
}
|
|
73
57
|
|
|
74
58
|
onClose(cb: (code: number, reason: string) => void): void {
|
|
75
|
-
this.
|
|
59
|
+
this.closedEmitter.event(() => cb(-1, 'closed'));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
close(): void {
|
|
63
|
+
this.connection.$deleteConnection(this.id);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export class ConnectionImpl implements ConnectionMain, ConnectionExt {
|
|
68
|
+
private readonly proxy: ConnectionExt | ConnectionExt;
|
|
69
|
+
private readonly connections = new Map<string, PluginChannel>();
|
|
70
|
+
|
|
71
|
+
constructor(proxy: ConnectionMain | ConnectionExt) {
|
|
72
|
+
this.proxy = proxy;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Gets the connection between plugin by id and sends string message to it.
|
|
77
|
+
*
|
|
78
|
+
* @param id connection's id
|
|
79
|
+
* @param message incoming message
|
|
80
|
+
*/
|
|
81
|
+
async $sendMessage(id: string, message: string): Promise<void> {
|
|
82
|
+
if (this.connections.has(id)) {
|
|
83
|
+
this.connections.get(id)!.fireMessageReceived(message);
|
|
84
|
+
} else {
|
|
85
|
+
console.warn(`Received message for unknown connection: ${id}`);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Instantiates a new connection by the given id.
|
|
91
|
+
* @param id the connection id
|
|
92
|
+
*/
|
|
93
|
+
async $createConnection(id: string): Promise<void> {
|
|
94
|
+
console.debug(`Creating plugin connection: ${id}`);
|
|
95
|
+
|
|
96
|
+
await this.doEnsureConnection(id);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Deletes a connection.
|
|
101
|
+
* @param id the connection id
|
|
102
|
+
*/
|
|
103
|
+
async $deleteConnection(id: string): Promise<void> {
|
|
104
|
+
console.debug(`Deleting plugin connection: ${id}`);
|
|
105
|
+
const connection = this.connections.get(id);
|
|
106
|
+
if (connection) {
|
|
107
|
+
this.connections.delete(id);
|
|
108
|
+
connection.fireClosed();
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Returns existed connection or creates a new one.
|
|
114
|
+
* @param id the connection id
|
|
115
|
+
*/
|
|
116
|
+
async ensureConnection(id: string): Promise<PluginChannel> {
|
|
117
|
+
console.debug(`Creating local connection: ${id}`);
|
|
118
|
+
const connection = await this.doEnsureConnection(id);
|
|
119
|
+
await this.proxy.$createConnection(id);
|
|
120
|
+
return connection;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Returns existed connection or creates a new one.
|
|
125
|
+
* @param id the connection id
|
|
126
|
+
*/
|
|
127
|
+
async doEnsureConnection(id: string): Promise<PluginChannel> {
|
|
128
|
+
const connection = this.connections.get(id) || await this.doCreateConnection(id);
|
|
129
|
+
this.connections.set(id, connection);
|
|
130
|
+
return connection;
|
|
76
131
|
}
|
|
77
132
|
|
|
78
|
-
|
|
79
|
-
this.
|
|
133
|
+
protected async doCreateConnection(id: string): Promise<PluginChannel> {
|
|
134
|
+
const channel = new PluginChannel(id, this.proxy);
|
|
135
|
+
channel.onClose(() => this.connections.delete(id));
|
|
136
|
+
return channel;
|
|
80
137
|
}
|
|
81
138
|
}
|
|
@@ -91,8 +91,7 @@ import type {
|
|
|
91
91
|
TimelineProviderDescriptor
|
|
92
92
|
} from '@theia/timeline/lib/common/timeline-model';
|
|
93
93
|
import { SerializableEnvironmentVariableCollection } from '@theia/terminal/lib/common/base-terminal-protocol';
|
|
94
|
-
|
|
95
|
-
import { ThemeType } from '@theia/core/lib/browser/theming';
|
|
94
|
+
import { ThemeType } from '@theia/core/lib/common/theme';
|
|
96
95
|
import { Disposable } from '@theia/core/lib/common/disposable';
|
|
97
96
|
import { PickOptions, QuickInputButtonHandle, QuickPickItem } from '@theia/core/lib/browser';
|
|
98
97
|
|
|
@@ -266,8 +265,6 @@ export interface ConnectionMain {
|
|
|
266
265
|
$createConnection(id: string): Promise<void>;
|
|
267
266
|
$deleteConnection(id: string): Promise<void>;
|
|
268
267
|
$sendMessage(id: string, message: string): void;
|
|
269
|
-
$createConnection(id: string): Promise<void>;
|
|
270
|
-
$deleteConnection(id: string): Promise<void>;
|
|
271
268
|
}
|
|
272
269
|
|
|
273
270
|
export interface ConnectionExt {
|
|
@@ -1794,6 +1791,7 @@ export const MAIN_RPC_CONTEXT = {
|
|
|
1794
1791
|
};
|
|
1795
1792
|
|
|
1796
1793
|
export interface TasksExt {
|
|
1794
|
+
$initLoadedTasks(executions: TaskExecutionDto[]): Promise<void>;
|
|
1797
1795
|
$provideTasks(handle: number): Promise<TaskDto[] | undefined>;
|
|
1798
1796
|
$resolveTask(handle: number, task: TaskDto, token?: CancellationToken): Promise<TaskDto | undefined>;
|
|
1799
1797
|
$onDidStartTask(execution: TaskExecutionDto, terminalId: number): void;
|
|
@@ -23,8 +23,7 @@ import { IJSONSchema, IJSONSchemaSnippet } from '@theia/core/lib/common/json-sch
|
|
|
23
23
|
import { RecursivePartial } from '@theia/core/lib/common/types';
|
|
24
24
|
import { PreferenceSchema, PreferenceSchemaProperties } from '@theia/core/lib/common/preferences/preference-schema';
|
|
25
25
|
import { ProblemMatcherContribution, ProblemPatternContribution, TaskDefinition } from '@theia/task/lib/common';
|
|
26
|
-
|
|
27
|
-
import { ColorDefinition } from '@theia/core/lib/browser/color-registry';
|
|
26
|
+
import { ColorDefinition } from '@theia/core/lib/common/color';
|
|
28
27
|
import { ResourceLabelFormatter } from '@theia/core/lib/common/label-protocol';
|
|
29
28
|
|
|
30
29
|
export const hostedServicePath = '/services/hostedPlugin';
|
|
@@ -682,6 +681,7 @@ export interface ViewContainer {
|
|
|
682
681
|
id: string;
|
|
683
682
|
title: string;
|
|
684
683
|
iconUrl: string;
|
|
684
|
+
themeIcon?: string;
|
|
685
685
|
}
|
|
686
686
|
|
|
687
687
|
/**
|
|
@@ -542,7 +542,7 @@ export class HostedPluginSupport {
|
|
|
542
542
|
|
|
543
543
|
// Make sure that folder by the path exists
|
|
544
544
|
if (!await this.fileService.exists(globalStorageFolderUri)) {
|
|
545
|
-
await this.fileService.createFolder(globalStorageFolderUri);
|
|
545
|
+
await this.fileService.createFolder(globalStorageFolderUri, { fromUserGesture: false });
|
|
546
546
|
}
|
|
547
547
|
const globalStorageFolderFsPath = await this.fileService.fsPath(globalStorageFolderUri);
|
|
548
548
|
if (!globalStorageFolderFsPath) {
|
|
@@ -73,8 +73,7 @@ import {
|
|
|
73
73
|
ProblemPatternContribution,
|
|
74
74
|
TaskDefinition
|
|
75
75
|
} from '@theia/task/lib/common/task-protocol';
|
|
76
|
-
|
|
77
|
-
import { ColorDefinition } from '@theia/core/lib/browser/color-registry';
|
|
76
|
+
import { ColorDefinition } from '@theia/core/lib/common/color';
|
|
78
77
|
import { ResourceLabelFormatter } from '@theia/core/lib/common/label-protocol';
|
|
79
78
|
import { PluginUriFactory } from './plugin-uri-factory';
|
|
80
79
|
|
|
@@ -555,10 +554,13 @@ export class TheiaPluginScanner implements PluginScanner {
|
|
|
555
554
|
}
|
|
556
555
|
|
|
557
556
|
private readViewContainer(rawViewContainer: PluginPackageViewContainer, pck: PluginPackage): ViewContainer {
|
|
557
|
+
const themeIcon = rawViewContainer.icon.startsWith('$(') ? rawViewContainer.icon : undefined;
|
|
558
|
+
const iconUrl = this.toPluginUrl(pck, rawViewContainer.icon);
|
|
558
559
|
return {
|
|
559
560
|
id: rawViewContainer.id,
|
|
560
561
|
title: rawViewContainer.title,
|
|
561
|
-
iconUrl
|
|
562
|
+
iconUrl,
|
|
563
|
+
themeIcon,
|
|
562
564
|
};
|
|
563
565
|
}
|
|
564
566
|
|
|
@@ -32,7 +32,6 @@ import { DebugSourceBreakpoint } from '@theia/debug/lib/browser/model/debug-sour
|
|
|
32
32
|
import { URI as Uri } from '@theia/core/shared/vscode-uri';
|
|
33
33
|
import { SourceBreakpoint, FunctionBreakpoint } from '@theia/debug/lib/browser/breakpoint/breakpoint-marker';
|
|
34
34
|
import { DebugConfiguration, DebugSessionOptions } from '@theia/debug/lib/common/debug-configuration';
|
|
35
|
-
import { ConnectionMainImpl } from '../connection-main';
|
|
36
35
|
import { DebuggerDescription } from '@theia/debug/lib/common/debug-service';
|
|
37
36
|
import { DebugProtocol } from 'vscode-debugprotocol';
|
|
38
37
|
import { DebugConfigurationManager } from '@theia/debug/lib/browser/debug-configuration-manager';
|
|
@@ -44,7 +43,6 @@ import { PluginDebugAdapterContribution } from './plugin-debug-adapter-contribut
|
|
|
44
43
|
import { PluginDebugSessionContributionRegistrator, PluginDebugSessionContributionRegistry } from './plugin-debug-session-contribution-registry';
|
|
45
44
|
import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable';
|
|
46
45
|
import { PluginDebugSessionFactory } from './plugin-debug-session-factory';
|
|
47
|
-
import { PluginWebSocketChannel } from '../../../common/connection';
|
|
48
46
|
import { PluginDebugAdapterContributionRegistrator, PluginDebugService } from './plugin-debug-service';
|
|
49
47
|
import { HostedPluginSupport } from '../../../hosted/browser/hosted-plugin';
|
|
50
48
|
import { DebugFunctionBreakpoint } from '@theia/debug/lib/browser/model/debug-function-breakpoint';
|
|
@@ -53,6 +51,7 @@ import { ConsoleSessionManager } from '@theia/console/lib/browser/console-sessio
|
|
|
53
51
|
import { DebugConsoleSession } from '@theia/debug/lib/browser/console/debug-console-session';
|
|
54
52
|
import { ContributionProvider } from '@theia/core/lib/common';
|
|
55
53
|
import { DebugContribution } from '@theia/debug/lib/browser/debug-contribution';
|
|
54
|
+
import { ConnectionImpl } from '../../../common/connection';
|
|
56
55
|
|
|
57
56
|
export class DebugMainImpl implements DebugMain, Disposable {
|
|
58
57
|
private readonly debugExt: DebugExt;
|
|
@@ -76,7 +75,7 @@ export class DebugMainImpl implements DebugMain, Disposable {
|
|
|
76
75
|
private readonly debuggerContributions = new Map<string, DisposableCollection>();
|
|
77
76
|
private readonly toDispose = new DisposableCollection();
|
|
78
77
|
|
|
79
|
-
constructor(rpc: RPCProtocol, readonly connectionMain:
|
|
78
|
+
constructor(rpc: RPCProtocol, readonly connectionMain: ConnectionImpl, container: interfaces.Container) {
|
|
80
79
|
this.debugExt = rpc.getProxy(MAIN_RPC_CONTEXT.DEBUG_EXT);
|
|
81
80
|
this.sessionManager = container.get(DebugSessionManager);
|
|
82
81
|
this.labelProvider = container.get(LabelProvider);
|
|
@@ -149,7 +148,7 @@ export class DebugMainImpl implements DebugMain, Disposable {
|
|
|
149
148
|
this.debugPreferences,
|
|
150
149
|
async (sessionId: string) => {
|
|
151
150
|
const connection = await this.connectionMain.ensureConnection(sessionId);
|
|
152
|
-
return
|
|
151
|
+
return connection;
|
|
153
152
|
},
|
|
154
153
|
this.fileService,
|
|
155
154
|
terminalOptionsExt,
|
|
@@ -25,12 +25,12 @@ import { DebugPreferences } from '@theia/debug/lib/browser/debug-preferences';
|
|
|
25
25
|
import { DebugSessionOptions } from '@theia/debug/lib/browser/debug-session-options';
|
|
26
26
|
import { DebugSession } from '@theia/debug/lib/browser/debug-session';
|
|
27
27
|
import { DebugSessionConnection } from '@theia/debug/lib/browser/debug-session-connection';
|
|
28
|
-
import { IWebSocket } from '@theia/core/shared/vscode-ws-jsonrpc';
|
|
29
28
|
import { TerminalWidgetOptions, TerminalWidget } from '@theia/terminal/lib/browser/base/terminal-widget';
|
|
30
29
|
import { TerminalOptionsExt } from '../../../common/plugin-api-rpc';
|
|
31
30
|
import { FileService } from '@theia/filesystem/lib/browser/file-service';
|
|
32
31
|
import { DebugContribution } from '@theia/debug/lib/browser/debug-contribution';
|
|
33
32
|
import { ContributionProvider } from '@theia/core/lib/common/contribution-provider';
|
|
33
|
+
import { Channel } from '@theia/debug/lib/common/debug-service';
|
|
34
34
|
|
|
35
35
|
export class PluginDebugSession extends DebugSession {
|
|
36
36
|
constructor(
|
|
@@ -57,7 +57,7 @@ export class PluginDebugSession extends DebugSession {
|
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
59
|
* Session factory for a client debug session that communicates with debug adapter contributed as plugin.
|
|
60
|
-
* The main difference is to use a connection factory that creates [
|
|
60
|
+
* The main difference is to use a connection factory that creates [Channel](#Channel) over Rpc channel.
|
|
61
61
|
*/
|
|
62
62
|
export class PluginDebugSessionFactory extends DefaultDebugSessionFactory {
|
|
63
63
|
constructor(
|
|
@@ -68,7 +68,7 @@ export class PluginDebugSessionFactory extends DefaultDebugSessionFactory {
|
|
|
68
68
|
protected readonly messages: MessageClient,
|
|
69
69
|
protected readonly outputChannelManager: OutputChannelManager,
|
|
70
70
|
protected readonly debugPreferences: DebugPreferences,
|
|
71
|
-
protected readonly connectionFactory: (sessionId: string) => Promise<
|
|
71
|
+
protected readonly connectionFactory: (sessionId: string) => Promise<Channel>,
|
|
72
72
|
protected readonly fileService: FileService,
|
|
73
73
|
protected readonly terminalOptionsExt: TerminalOptionsExt | undefined,
|
|
74
74
|
protected readonly debugContributionProvider: ContributionProvider<DebugContribution>
|
|
@@ -123,7 +123,7 @@ export class FileSystemMainImpl implements FileSystemMain, Disposable {
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
$mkdir(uri: UriComponents): Promise<void> {
|
|
126
|
-
return this._fileService.createFolder(new CoreURI(URI.revive(uri)))
|
|
126
|
+
return this._fileService.createFolder(new CoreURI(URI.revive(uri)), { fromUserGesture: false })
|
|
127
127
|
.then(() => undefined).catch(FileSystemMainImpl._handleError);
|
|
128
128
|
}
|
|
129
129
|
|
|
@@ -18,7 +18,7 @@ import { CommandRegistryMainImpl } from './command-registry-main';
|
|
|
18
18
|
import { PreferenceRegistryMainImpl } from './preference-registry-main';
|
|
19
19
|
import { QuickOpenMainImpl } from './quick-open-main';
|
|
20
20
|
import { RPCProtocol } from '../../common/rpc-protocol';
|
|
21
|
-
import { PLUGIN_RPC_CONTEXT, LanguagesMainFactory, OutputChannelRegistryFactory } from '../../common/plugin-api-rpc';
|
|
21
|
+
import { PLUGIN_RPC_CONTEXT, LanguagesMainFactory, OutputChannelRegistryFactory, MAIN_RPC_CONTEXT } from '../../common/plugin-api-rpc';
|
|
22
22
|
import { MessageRegistryMainImpl } from './message-registry-main';
|
|
23
23
|
import { WindowStateMain } from './window-state-main';
|
|
24
24
|
import { WorkspaceMainImpl } from './workspace-main';
|
|
@@ -29,7 +29,7 @@ import { TerminalServiceMainImpl } from './terminal-main';
|
|
|
29
29
|
import { DialogsMainImpl } from './dialogs-main';
|
|
30
30
|
import { TreeViewsMainImpl } from './view/tree-views-main';
|
|
31
31
|
import { NotificationMainImpl } from './notification-main';
|
|
32
|
-
import {
|
|
32
|
+
import { ConnectionImpl } from '../../common/connection';
|
|
33
33
|
import { WebviewsMainImpl } from './webviews-main';
|
|
34
34
|
import { TasksMainImpl } from './tasks-main';
|
|
35
35
|
import { StorageMainImpl } from './plugin-storage';
|
|
@@ -130,7 +130,7 @@ export function setUpPluginApi(rpc: RPCProtocol, container: interfaces.Container
|
|
|
130
130
|
const storageMain = new StorageMainImpl(container);
|
|
131
131
|
rpc.set(PLUGIN_RPC_CONTEXT.STORAGE_MAIN, storageMain);
|
|
132
132
|
|
|
133
|
-
const connectionMain = new
|
|
133
|
+
const connectionMain = new ConnectionImpl(rpc.getProxy(MAIN_RPC_CONTEXT.CONNECTION_EXT));
|
|
134
134
|
rpc.set(PLUGIN_RPC_CONTEXT.CONNECTION_MAIN, connectionMain);
|
|
135
135
|
|
|
136
136
|
const tasksMain = new TasksMainImpl(rpc, container);
|
|
@@ -97,6 +97,13 @@ export class TasksMainImpl implements TasksMain, Disposable {
|
|
|
97
97
|
this.proxy.$onDidEndTaskProcess(event.code, event.taskId);
|
|
98
98
|
}
|
|
99
99
|
}));
|
|
100
|
+
|
|
101
|
+
// Inform proxy about running tasks form previous session
|
|
102
|
+
this.$taskExecutions().then(executions => {
|
|
103
|
+
if (executions.length > 0) {
|
|
104
|
+
this.proxy.$initLoadedTasks(executions);
|
|
105
|
+
}
|
|
106
|
+
});
|
|
100
107
|
}
|
|
101
108
|
|
|
102
109
|
dispose(): void {
|
|
@@ -218,15 +218,28 @@ export class PluginViewRegistry implements FrontendApplicationContribution {
|
|
|
218
218
|
}
|
|
219
219
|
const toDispose = new DisposableCollection();
|
|
220
220
|
const containerClass = 'theia-plugin-view-container';
|
|
221
|
+
let themeIconClass = '';
|
|
221
222
|
const iconClass = 'plugin-view-container-icon-' + viewContainer.id;
|
|
222
|
-
|
|
223
|
-
|
|
223
|
+
|
|
224
|
+
if (viewContainer.themeIcon) {
|
|
225
|
+
const icon = monaco.theme.ThemeIcon.fromString(viewContainer.themeIcon);
|
|
226
|
+
if (icon) {
|
|
227
|
+
themeIconClass = monaco.theme.ThemeIcon.asClassName(icon) ?? '';
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
if (!themeIconClass) {
|
|
232
|
+
const iconUrl = PluginSharedStyle.toExternalIconUrl(viewContainer.iconUrl);
|
|
233
|
+
toDispose.push(this.style.insertRule('.' + containerClass + '.' + iconClass, () => `
|
|
224
234
|
mask: url('${iconUrl}') no-repeat 50% 50%;
|
|
225
235
|
-webkit-mask: url('${iconUrl}') no-repeat 50% 50%;
|
|
226
236
|
`));
|
|
237
|
+
}
|
|
238
|
+
|
|
227
239
|
toDispose.push(this.doRegisterViewContainer(viewContainer.id, location, {
|
|
228
240
|
label: viewContainer.title,
|
|
229
|
-
|
|
241
|
+
// The container class automatically sets a mask; if we're using a theme icon, we don't want one.
|
|
242
|
+
iconClass: (themeIconClass || containerClass) + ' ' + iconClass,
|
|
230
243
|
closeable: true
|
|
231
244
|
}));
|
|
232
245
|
return toDispose;
|
|
@@ -37,7 +37,7 @@ import { MenuPath, MenuModelRegistry, ActionMenuNode } from '@theia/core/lib/com
|
|
|
37
37
|
import * as React from '@theia/core/shared/react';
|
|
38
38
|
import { PluginSharedStyle } from '../plugin-shared-style';
|
|
39
39
|
import { ViewContextKeyService } from './view-context-key-service';
|
|
40
|
-
import { Widget } from '@theia/core/lib/browser/widgets/widget';
|
|
40
|
+
import { ACTION_ITEM, Widget } from '@theia/core/lib/browser/widgets/widget';
|
|
41
41
|
import { Emitter, Event } from '@theia/core/lib/common/event';
|
|
42
42
|
import { MessageService } from '@theia/core/lib/common/message-service';
|
|
43
43
|
import { View } from '../../../common/plugin-protocol';
|
|
@@ -327,9 +327,6 @@ export class TreeViewWidget extends TreeViewWelcomeWidget {
|
|
|
327
327
|
}
|
|
328
328
|
|
|
329
329
|
protected renderTailDecorations(node: TreeViewNode, props: NodeProps): React.ReactNode {
|
|
330
|
-
if (this.model.selectedNodes.every(selected => selected.id !== node.id) && node.id !== this.hoverNodeId) {
|
|
331
|
-
return false;
|
|
332
|
-
}
|
|
333
330
|
return this.contextKeys.with({ view: this.id, viewItem: node.contextValue }, () => {
|
|
334
331
|
const menu = this.menus.getMenu(VIEW_ITEM_INLINE_MENU);
|
|
335
332
|
const arg = this.toTreeViewSelection(node);
|
|
@@ -349,27 +346,13 @@ export class TreeViewWidget extends TreeViewWelcomeWidget {
|
|
|
349
346
|
if (!icon || !this.commands.isVisible(node.action.commandId, arg) || !this.contextKeys.match(node.action.when)) {
|
|
350
347
|
return false;
|
|
351
348
|
}
|
|
352
|
-
const className = [TREE_NODE_SEGMENT_CLASS, TREE_NODE_TAIL_CLASS, icon, 'theia-tree-view-inline-action'].join(' ');
|
|
349
|
+
const className = [TREE_NODE_SEGMENT_CLASS, TREE_NODE_TAIL_CLASS, icon, ACTION_ITEM, 'theia-tree-view-inline-action'].join(' ');
|
|
353
350
|
return <div key={index} className={className} title={node.label} onClick={e => {
|
|
354
351
|
e.stopPropagation();
|
|
355
352
|
this.commands.executeCommand(node.action.commandId, arg);
|
|
356
353
|
}} />;
|
|
357
354
|
}
|
|
358
355
|
|
|
359
|
-
protected hoverNodeId: string | undefined;
|
|
360
|
-
protected setHoverNodeId(hoverNodeId: string | undefined): void {
|
|
361
|
-
this.hoverNodeId = hoverNodeId;
|
|
362
|
-
this.update();
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
protected createNodeAttributes(node: TreeNode, props: NodeProps): React.Attributes & React.HTMLAttributes<HTMLElement> {
|
|
366
|
-
return {
|
|
367
|
-
...super.createNodeAttributes(node, props),
|
|
368
|
-
onMouseOver: () => this.setHoverNodeId(node.id),
|
|
369
|
-
onMouseOut: () => this.setHoverNodeId(undefined)
|
|
370
|
-
};
|
|
371
|
-
}
|
|
372
|
-
|
|
373
356
|
protected toContextMenuArgs(node: SelectableTreeNode): [TreeViewSelection] {
|
|
374
357
|
return [this.toTreeViewSelection(node)];
|
|
375
358
|
}
|
|
@@ -55,12 +55,11 @@ export class MessageRegistryExt {
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
for (const item of rest) {
|
|
59
|
-
pushItem(item);
|
|
60
|
-
}
|
|
61
|
-
const actionHandle = await this.proxy.$showMessage(type, message, options, actions);
|
|
62
|
-
return actionHandle !== undefined ? items[actionHandle] : undefined;
|
|
63
58
|
}
|
|
64
|
-
|
|
59
|
+
for (const item of rest) {
|
|
60
|
+
pushItem(item);
|
|
61
|
+
}
|
|
62
|
+
const actionHandle = await this.proxy.$showMessage(type, message, options, actions);
|
|
63
|
+
return actionHandle !== undefined ? items[actionHandle] : undefined;
|
|
65
64
|
}
|
|
66
65
|
}
|