@theia/plugin-ext 1.37.0-next.8 → 1.37.0
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/language-pack-service.d.ts +16 -0
- package/lib/common/language-pack-service.d.ts.map +1 -0
- package/lib/common/language-pack-service.js +21 -0
- package/lib/common/language-pack-service.js.map +1 -0
- package/lib/common/plugin-api-rpc-model.d.ts +6 -0
- package/lib/common/plugin-api-rpc-model.d.ts.map +1 -1
- package/lib/common/plugin-api-rpc-model.js +6 -1
- package/lib/common/plugin-api-rpc-model.js.map +1 -1
- package/lib/common/plugin-api-rpc.d.ts +22 -1
- package/lib/common/plugin-api-rpc.d.ts.map +1 -1
- package/lib/common/plugin-api-rpc.js +2 -1
- package/lib/common/plugin-api-rpc.js.map +1 -1
- package/lib/common/plugin-protocol.d.ts +2 -0
- 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.d.ts +6 -2
- package/lib/hosted/browser/hosted-plugin.d.ts.map +1 -1
- package/lib/hosted/browser/hosted-plugin.js +26 -5
- package/lib/hosted/browser/hosted-plugin.js.map +1 -1
- package/lib/hosted/browser/worker/worker-main.js +4 -2
- package/lib/hosted/browser/worker/worker-main.js.map +1 -1
- package/lib/hosted/node/hosted-plugin-deployer-handler.js +2 -2
- package/lib/hosted/node/hosted-plugin-deployer-handler.js.map +1 -1
- package/lib/hosted/node/hosted-plugin-localization-service.d.ts +13 -1
- package/lib/hosted/node/hosted-plugin-localization-service.d.ts.map +1 -1
- package/lib/hosted/node/hosted-plugin-localization-service.js +122 -10
- package/lib/hosted/node/hosted-plugin-localization-service.js.map +1 -1
- package/lib/hosted/node/plugin-ext-hosted-backend-module.d.ts.map +1 -1
- package/lib/hosted/node/plugin-ext-hosted-backend-module.js +7 -0
- package/lib/hosted/node/plugin-ext-hosted-backend-module.js.map +1 -1
- package/lib/hosted/node/plugin-host-rpc.d.ts +2 -2
- package/lib/hosted/node/plugin-host-rpc.d.ts.map +1 -1
- package/lib/hosted/node/plugin-host-rpc.js +6 -4
- package/lib/hosted/node/plugin-host-rpc.js.map +1 -1
- package/lib/hosted/node/plugin-language-pack-service.d.ts +8 -0
- package/lib/hosted/node/plugin-language-pack-service.d.ts.map +1 -0
- package/lib/hosted/node/plugin-language-pack-service.js +54 -0
- package/lib/hosted/node/plugin-language-pack-service.js.map +1 -0
- package/lib/hosted/node/scanners/scanner-theia.d.ts.map +1 -1
- package/lib/hosted/node/scanners/scanner-theia.js +1 -0
- package/lib/hosted/node/scanners/scanner-theia.js.map +1 -1
- package/lib/main/browser/comments/comment-thread-widget.d.ts.map +1 -1
- package/lib/main/browser/comments/comment-thread-widget.js +5 -1
- package/lib/main/browser/comments/comment-thread-widget.js.map +1 -1
- package/lib/main/browser/comments/comments-main.d.ts +6 -1
- package/lib/main/browser/comments/comments-main.d.ts.map +1 -1
- package/lib/main/browser/comments/comments-main.js +15 -0
- package/lib/main/browser/comments/comments-main.js.map +1 -1
- package/lib/main/browser/localization-main.d.ts +9 -0
- package/lib/main/browser/localization-main.d.ts.map +1 -0
- package/lib/main/browser/localization-main.js +32 -0
- package/lib/main/browser/localization-main.js.map +1 -0
- package/lib/main/browser/main-context.d.ts.map +1 -1
- package/lib/main/browser/main-context.js +3 -0
- package/lib/main/browser/main-context.js.map +1 -1
- package/lib/main/browser/plugin-ext-frontend-module.d.ts.map +1 -1
- package/lib/main/browser/plugin-ext-frontend-module.js +5 -0
- package/lib/main/browser/plugin-ext-frontend-module.js.map +1 -1
- package/lib/main/browser/view/tree-view-widget.d.ts.map +1 -1
- package/lib/main/browser/view/tree-view-widget.js +10 -1
- package/lib/main/browser/view/tree-view-widget.js.map +1 -1
- package/lib/main/electron-browser/webview/electron-webview-widget-factory.d.ts +1 -0
- package/lib/main/electron-browser/webview/electron-webview-widget-factory.d.ts.map +1 -1
- package/lib/main/electron-browser/webview/electron-webview-widget-factory.js +4 -15
- package/lib/main/electron-browser/webview/electron-webview-widget-factory.js.map +1 -1
- package/lib/main/node/plugin-github-resolver.d.ts +3 -1
- package/lib/main/node/plugin-github-resolver.d.ts.map +1 -1
- package/lib/main/node/plugin-github-resolver.js +64 -71
- package/lib/main/node/plugin-github-resolver.js.map +1 -1
- package/lib/main/node/plugin-http-resolver.d.ts +2 -0
- package/lib/main/node/plugin-http-resolver.d.ts.map +1 -1
- package/lib/main/node/plugin-http-resolver.js +31 -31
- package/lib/main/node/plugin-http-resolver.js.map +1 -1
- package/lib/main/node/plugins-key-value-storage.js +1 -1
- package/lib/main/node/plugins-key-value-storage.js.map +1 -1
- package/lib/plugin/comments.d.ts +3 -0
- package/lib/plugin/comments.d.ts.map +1 -1
- package/lib/plugin/comments.js +24 -0
- package/lib/plugin/comments.js.map +1 -1
- package/lib/plugin/localization-ext.d.ts +17 -0
- package/lib/plugin/localization-ext.d.ts.map +1 -0
- package/lib/plugin/localization-ext.js +74 -0
- package/lib/plugin/localization-ext.js.map +1 -0
- package/lib/plugin/output-channel/log-output-channel.d.ts +24 -0
- package/lib/plugin/output-channel/log-output-channel.d.ts.map +1 -0
- package/lib/plugin/output-channel/log-output-channel.js +92 -0
- package/lib/plugin/output-channel/log-output-channel.js.map +1 -0
- package/lib/plugin/output-channel/output-channel-item.d.ts +3 -3
- package/lib/plugin/output-channel/output-channel-item.d.ts.map +1 -1
- package/lib/plugin/output-channel/output-channel-item.js.map +1 -1
- package/lib/plugin/output-channel-registry.d.ts +7 -2
- package/lib/plugin/output-channel-registry.d.ts.map +1 -1
- package/lib/plugin/output-channel-registry.js +15 -6
- package/lib/plugin/output-channel-registry.js.map +1 -1
- package/lib/plugin/plugin-context.d.ts +2 -1
- package/lib/plugin/plugin-context.d.ts.map +1 -1
- package/lib/plugin/plugin-context.js +26 -3
- package/lib/plugin/plugin-context.js.map +1 -1
- package/lib/plugin/plugin-manager.d.ts +3 -2
- package/lib/plugin/plugin-manager.d.ts.map +1 -1
- package/lib/plugin/plugin-manager.js +4 -1
- package/lib/plugin/plugin-manager.js.map +1 -1
- package/lib/plugin/preference-registry.d.ts +1 -1
- package/lib/plugin/preference-registry.js +1 -1
- package/lib/plugin/stubs/tests-api.d.ts +2 -1
- package/lib/plugin/stubs/tests-api.d.ts.map +1 -1
- package/lib/plugin/stubs/tests-api.js +2 -1
- package/lib/plugin/stubs/tests-api.js.map +1 -1
- package/lib/plugin/tree/tree-views.d.ts +2 -0
- package/lib/plugin/tree/tree-views.d.ts.map +1 -1
- package/lib/plugin/tree/tree-views.js +10 -3
- package/lib/plugin/tree/tree-views.js.map +1 -1
- package/lib/plugin/type-converters.d.ts.map +1 -1
- package/lib/plugin/type-converters.js +6 -3
- package/lib/plugin/type-converters.js.map +1 -1
- package/lib/plugin/types-impl.d.ts +8 -4
- package/lib/plugin/types-impl.d.ts.map +1 -1
- package/lib/plugin/types-impl.js +12 -7
- package/lib/plugin/types-impl.js.map +1 -1
- package/package.json +28 -30
- package/src/common/language-pack-service.ts +34 -0
- package/src/common/plugin-api-rpc-model.ts +7 -0
- package/src/common/plugin-api-rpc.ts +25 -2
- package/src/common/plugin-protocol.ts +2 -0
- package/src/hosted/browser/hosted-plugin.ts +27 -6
- package/src/hosted/browser/worker/worker-main.ts +5 -2
- package/src/hosted/node/hosted-plugin-deployer-handler.ts +2 -2
- package/src/hosted/node/hosted-plugin-localization-service.ts +132 -11
- package/src/hosted/node/plugin-ext-hosted-backend-module.ts +12 -0
- package/src/hosted/node/plugin-host-rpc.ts +8 -5
- package/src/hosted/node/plugin-language-pack-service.ts +43 -0
- package/src/hosted/node/scanners/scanner-theia.ts +1 -0
- package/src/main/browser/comments/comment-thread-widget.tsx +6 -1
- package/src/main/browser/comments/comments-main.ts +18 -1
- package/src/main/browser/localization-main.ts +34 -0
- package/src/main/browser/main-context.ts +4 -0
- package/src/main/browser/plugin-ext-frontend-module.ts +6 -0
- package/src/main/browser/view/tree-view-widget.tsx +11 -1
- package/src/main/electron-browser/webview/electron-webview-widget-factory.ts +4 -15
- package/src/main/node/plugin-github-resolver.ts +65 -81
- package/src/main/node/plugin-http-resolver.ts +29 -35
- package/src/main/node/plugins-key-value-storage.ts +1 -1
- package/src/plugin/comments.ts +32 -1
- package/src/plugin/localization-ext.ts +84 -0
- package/src/plugin/output-channel/log-output-channel.ts +108 -0
- package/src/plugin/output-channel/output-channel-item.ts +2 -2
- package/src/plugin/output-channel-registry.ts +20 -7
- package/src/plugin/plugin-context.ts +31 -3
- package/src/plugin/plugin-manager.ts +5 -1
- package/src/plugin/preference-registry.ts +1 -1
- package/src/plugin/stubs/tests-api.ts +3 -1
- package/src/plugin/tree/tree-views.ts +12 -3
- package/src/plugin/type-converters.ts +5 -3
- package/src/plugin/types-impl.ts +8 -3
- package/LICENSE +0 -642
|
@@ -13,11 +13,12 @@
|
|
|
13
13
|
//
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
|
-
|
|
17
|
-
PLUGIN_RPC_CONTEXT as Ext, OutputChannelRegistryMain, PluginInfo, OutputChannelRegistryExt
|
|
18
|
-
} from '../common/plugin-api-rpc';
|
|
19
|
-
import { RPCProtocol } from '../common/rpc-protocol';
|
|
16
|
+
|
|
20
17
|
import * as theia from '@theia/plugin';
|
|
18
|
+
import { PLUGIN_RPC_CONTEXT as Ext, OutputChannelRegistryExt, OutputChannelRegistryMain, PluginInfo } from '../common/plugin-api-rpc';
|
|
19
|
+
import { RPCProtocol } from '../common/rpc-protocol';
|
|
20
|
+
import { isObject } from '../common/types';
|
|
21
|
+
import { LogOutputChannelImpl } from './output-channel/log-output-channel';
|
|
21
22
|
import { OutputChannelImpl } from './output-channel/output-channel-item';
|
|
22
23
|
|
|
23
24
|
export class OutputChannelRegistryExtImpl implements OutputChannelRegistryExt {
|
|
@@ -28,12 +29,24 @@ export class OutputChannelRegistryExtImpl implements OutputChannelRegistryExt {
|
|
|
28
29
|
this.proxy = rpc.getProxy(Ext.OUTPUT_CHANNEL_REGISTRY_MAIN);
|
|
29
30
|
}
|
|
30
31
|
|
|
31
|
-
createOutputChannel(name: string, pluginInfo: PluginInfo): theia.OutputChannel
|
|
32
|
+
createOutputChannel(name: string, pluginInfo: PluginInfo): theia.OutputChannel;
|
|
33
|
+
createOutputChannel(name: string, pluginInfo: PluginInfo, options: { log: true; }): theia.LogOutputChannel;
|
|
34
|
+
createOutputChannel(name: string, pluginInfo: PluginInfo, options?: { log: true; }): theia.OutputChannel | theia.LogOutputChannel {
|
|
32
35
|
name = name.trim();
|
|
33
36
|
if (!name) {
|
|
34
37
|
throw new Error('illegal argument \'name\'. must not be falsy');
|
|
35
|
-
} else {
|
|
36
|
-
return new OutputChannelImpl(name, this.proxy, pluginInfo);
|
|
37
38
|
}
|
|
39
|
+
const isLogOutput = options && isObject(options);
|
|
40
|
+
return isLogOutput
|
|
41
|
+
? this.doCreateLogOutputChannel(name, pluginInfo)
|
|
42
|
+
: this.doCreateOutputChannel(name, pluginInfo);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
private doCreateOutputChannel(name: string, pluginInfo: PluginInfo): OutputChannelImpl {
|
|
46
|
+
return new OutputChannelImpl(name, this.proxy, pluginInfo);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
private doCreateLogOutputChannel(name: string, pluginInfo: PluginInfo): LogOutputChannelImpl {
|
|
50
|
+
return new LogOutputChannelImpl(name, this.proxy, pluginInfo);
|
|
38
51
|
}
|
|
39
52
|
}
|
|
@@ -131,6 +131,7 @@ import {
|
|
|
131
131
|
WebviewPanelTargetArea,
|
|
132
132
|
UIKind,
|
|
133
133
|
FileSystemError,
|
|
134
|
+
CommentThreadState,
|
|
134
135
|
CommentThreadCollapsibleState,
|
|
135
136
|
QuickInputButtons,
|
|
136
137
|
QuickPickItemKind,
|
|
@@ -234,6 +235,7 @@ import { PluginPackage } from '../common';
|
|
|
234
235
|
import { Endpoint } from '@theia/core/lib/browser/endpoint';
|
|
235
236
|
import { FilePermission } from '@theia/filesystem/lib/common/files';
|
|
236
237
|
import { TabsExtImpl } from './tabs';
|
|
238
|
+
import { LocalizationExtImpl } from './localization-ext';
|
|
237
239
|
|
|
238
240
|
export function createAPIFactory(
|
|
239
241
|
rpc: RPCProtocol,
|
|
@@ -245,7 +247,8 @@ export function createAPIFactory(
|
|
|
245
247
|
workspaceExt: WorkspaceExtImpl,
|
|
246
248
|
messageRegistryExt: MessageRegistryExt,
|
|
247
249
|
clipboard: ClipboardExt,
|
|
248
|
-
webviewExt: WebviewsExtImpl
|
|
250
|
+
webviewExt: WebviewsExtImpl,
|
|
251
|
+
localizationExt: LocalizationExtImpl
|
|
249
252
|
): PluginAPIFactory {
|
|
250
253
|
|
|
251
254
|
const authenticationExt = rpc.set(MAIN_RPC_CONTEXT.AUTHENTICATION_EXT, new AuthenticationExtImpl(rpc));
|
|
@@ -481,8 +484,10 @@ export function createAPIFactory(
|
|
|
481
484
|
|
|
482
485
|
return statusBarMessageRegistryExt.createStatusBarItem(alignment, priority, id);
|
|
483
486
|
},
|
|
484
|
-
createOutputChannel(name: string):
|
|
485
|
-
return
|
|
487
|
+
createOutputChannel(name: string, options?: { log: true }): any {
|
|
488
|
+
return !options
|
|
489
|
+
? outputChannelRegistryExt.createOutputChannel(name, pluginToPluginInfo(plugin))
|
|
490
|
+
: outputChannelRegistryExt.createOutputChannel(name, pluginToPluginInfo(plugin), options);
|
|
486
491
|
},
|
|
487
492
|
createWebviewPanel(viewType: string,
|
|
488
493
|
title: string,
|
|
@@ -1073,6 +1078,27 @@ export function createAPIFactory(
|
|
|
1073
1078
|
}
|
|
1074
1079
|
};
|
|
1075
1080
|
|
|
1081
|
+
const l10n: typeof theia.l10n = {
|
|
1082
|
+
// eslint-disable-next-line max-len
|
|
1083
|
+
t(...params: [message: string, ...args: Array<string | number | boolean>] | [message: string, args: Record<string, any>] | [{ message: string; args?: Array<string | number | boolean> | Record<string, any>; comment: string | string[] }]): string {
|
|
1084
|
+
if (typeof params[0] === 'string') {
|
|
1085
|
+
const key = params.shift() as string;
|
|
1086
|
+
|
|
1087
|
+
// We have either rest args which are Array<string | number | boolean> or an array with a single Record<string, any>.
|
|
1088
|
+
// This ensures we get a Record<string | number, any> which will be formatted correctly.
|
|
1089
|
+
const argsFormatted = !params || typeof params[0] !== 'object' ? params : params[0];
|
|
1090
|
+
return localizationExt.translateMessage(plugin.model.id, { message: key, args: argsFormatted as Record<string | number, any> | undefined });
|
|
1091
|
+
}
|
|
1092
|
+
return localizationExt.translateMessage(plugin.model.id, params[0]);
|
|
1093
|
+
},
|
|
1094
|
+
get bundle() {
|
|
1095
|
+
return localizationExt.getBundle(plugin.model.id);
|
|
1096
|
+
},
|
|
1097
|
+
get uri() {
|
|
1098
|
+
return localizationExt.getBundleUri(plugin.model.id);
|
|
1099
|
+
}
|
|
1100
|
+
};
|
|
1101
|
+
|
|
1076
1102
|
// notebooks API (@stubbed)
|
|
1077
1103
|
// The following implementation is temporarily `@stubbed` and marked as such under `theia.d.ts`
|
|
1078
1104
|
const notebooks: typeof theia.notebooks = {
|
|
@@ -1148,6 +1174,7 @@ export function createAPIFactory(
|
|
|
1148
1174
|
tasks,
|
|
1149
1175
|
scm,
|
|
1150
1176
|
notebooks,
|
|
1177
|
+
l10n,
|
|
1151
1178
|
tests,
|
|
1152
1179
|
// Types
|
|
1153
1180
|
StatusBarAlignment: StatusBarAlignment,
|
|
@@ -1252,6 +1279,7 @@ export function createAPIFactory(
|
|
|
1252
1279
|
WebviewPanelTargetArea,
|
|
1253
1280
|
UIKind,
|
|
1254
1281
|
FileSystemError,
|
|
1282
|
+
CommentThreadState,
|
|
1255
1283
|
CommentThreadCollapsibleState,
|
|
1256
1284
|
QuickInputButtons,
|
|
1257
1285
|
CommentMode,
|
|
@@ -26,7 +26,8 @@ import {
|
|
|
26
26
|
ConfigStorage,
|
|
27
27
|
PluginManagerInitializeParams,
|
|
28
28
|
PluginManagerStartParams,
|
|
29
|
-
TerminalServiceExt
|
|
29
|
+
TerminalServiceExt,
|
|
30
|
+
LocalizationExt
|
|
30
31
|
} from '../common/plugin-api-rpc';
|
|
31
32
|
import { PluginMetadata, PluginJsonValidationContribution } from '../common/plugin-protocol';
|
|
32
33
|
import * as theia from '@theia/plugin';
|
|
@@ -86,6 +87,7 @@ export class PluginManagerExtImpl implements PluginManagerExt, PluginManager {
|
|
|
86
87
|
'onDebugResolve',
|
|
87
88
|
'onDebugAdapterProtocolTracker',
|
|
88
89
|
'onDebugDynamicConfigurations',
|
|
90
|
+
'onTaskType',
|
|
89
91
|
'workspaceContains',
|
|
90
92
|
'onView',
|
|
91
93
|
'onUri',
|
|
@@ -122,6 +124,7 @@ export class PluginManagerExtImpl implements PluginManagerExt, PluginManager {
|
|
|
122
124
|
private readonly secrets: SecretsExtImpl,
|
|
123
125
|
private readonly preferencesManager: PreferenceRegistryExtImpl,
|
|
124
126
|
private readonly webview: WebviewsExtImpl,
|
|
127
|
+
private readonly localization: LocalizationExt,
|
|
125
128
|
private readonly rpc: RPCProtocol
|
|
126
129
|
) {
|
|
127
130
|
this.messageRegistryProxy = this.rpc.getProxy(PLUGIN_RPC_CONTEXT.MESSAGE_REGISTRY_MAIN);
|
|
@@ -398,6 +401,7 @@ export class PluginManagerExtImpl implements PluginManagerExt, PluginManager {
|
|
|
398
401
|
}
|
|
399
402
|
const id = plugin.model.displayName || plugin.model.id;
|
|
400
403
|
if (typeof pluginMain[plugin.lifecycle.startMethod] === 'function') {
|
|
404
|
+
await this.localization.initializeLocalizedMessages(plugin, this.envExt.language);
|
|
401
405
|
const pluginExport = await pluginMain[plugin.lifecycle.startMethod].apply(getGlobal(), [pluginContext]);
|
|
402
406
|
this.activatedPlugins.set(plugin.model.id, new ActivatedPlugin(pluginContext, pluginExport, stopFn));
|
|
403
407
|
} else {
|
|
@@ -264,7 +264,7 @@ export class PreferenceRegistryExtImpl implements PreferenceRegistryExt {
|
|
|
264
264
|
}
|
|
265
265
|
|
|
266
266
|
/**
|
|
267
|
-
* Creates a new object and assigns those keys of raw to it that are not likely to cause prototype
|
|
267
|
+
* Creates a new object and assigns those keys of raw to it that are not likely to cause prototype pollution.
|
|
268
268
|
* Also preprocesses override identifiers so that they take the form [identifier]: {...contents}.
|
|
269
269
|
*/
|
|
270
270
|
private sanitize<T = unknown>(raw: T): T {
|
|
@@ -27,12 +27,14 @@ export const createRunProfile = (
|
|
|
27
27
|
token: CancellationToken
|
|
28
28
|
) => Thenable<void> | void,
|
|
29
29
|
isDefault?: boolean,
|
|
30
|
-
tag?: theia.TestTag
|
|
30
|
+
tag?: theia.TestTag,
|
|
31
|
+
supportsContinuousRun?: boolean
|
|
31
32
|
) => ({
|
|
32
33
|
label,
|
|
33
34
|
kind,
|
|
34
35
|
isDefault: isDefault ?? false,
|
|
35
36
|
tag,
|
|
37
|
+
supportsContinuousRun: supportsContinuousRun ?? false,
|
|
36
38
|
runHandler,
|
|
37
39
|
configureHandler: undefined,
|
|
38
40
|
dispose: () => undefined,
|
|
@@ -58,6 +58,10 @@ export class TreeViewsExtImpl implements TreeViewsExt {
|
|
|
58
58
|
return this.getTreeView(treeViewId).onDragStarted(treeItemIds, token);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
+
$dragEnd(treeViewId: string): Promise<void> {
|
|
62
|
+
return this.getTreeView(treeViewId).dragEnd();
|
|
63
|
+
}
|
|
64
|
+
|
|
61
65
|
$drop(treeViewId: string, treeItemId: string | undefined, dataTransferItems: [string, string | DataTransferFileDTO][], token: CancellationToken): Promise<void> {
|
|
62
66
|
return this.getTreeView(treeViewId).handleDrop!(treeItemId, dataTransferItems, token);
|
|
63
67
|
}
|
|
@@ -389,7 +393,7 @@ class TreeViewExtImpl<T> implements Disposable {
|
|
|
389
393
|
}
|
|
390
394
|
|
|
391
395
|
async getChildren(parentId: string): Promise<TreeViewItem[] | undefined> {
|
|
392
|
-
|
|
396
|
+
let parentNode = this.nodes.get(parentId);
|
|
393
397
|
const parent = parentNode?.value;
|
|
394
398
|
if (parentId && !parent) {
|
|
395
399
|
console.error(`No tree item with id '${parentId}' found.`);
|
|
@@ -398,9 +402,10 @@ class TreeViewExtImpl<T> implements Disposable {
|
|
|
398
402
|
this.clearChildren(parentNode);
|
|
399
403
|
|
|
400
404
|
// place root in the cache
|
|
401
|
-
if (parentId === '') {
|
|
405
|
+
if (parentId === '' && !parentNode) {
|
|
402
406
|
const rootNodeDisposables = new DisposableCollection();
|
|
403
|
-
|
|
407
|
+
parentNode = { id: '', disposables: rootNodeDisposables, dispose: () => { rootNodeDisposables.dispose(); } };
|
|
408
|
+
this.nodes.set(parentId, parentNode);
|
|
404
409
|
}
|
|
405
410
|
// ask data provider for children for cached element
|
|
406
411
|
const result = await this.options.treeDataProvider.getChildren(parent);
|
|
@@ -605,6 +610,10 @@ class TreeViewExtImpl<T> implements Disposable {
|
|
|
605
610
|
return undefined;
|
|
606
611
|
}
|
|
607
612
|
|
|
613
|
+
async dragEnd(): Promise<void> {
|
|
614
|
+
this.localDataTransfer.clear();
|
|
615
|
+
}
|
|
616
|
+
|
|
608
617
|
async handleDrop(treeItemId: string | undefined, dataTransferItems: [string, string | DataTransferFileDTO][], token: CancellationToken): Promise<void> {
|
|
609
618
|
const treeItem = treeItemId ? this.getElement(treeItemId) : undefined;
|
|
610
619
|
const dropTransfer = new DataTransfer();
|
|
@@ -835,10 +835,12 @@ export function fromTask(task: theia.Task): TaskDto | undefined {
|
|
|
835
835
|
if ('detail' in task) {
|
|
836
836
|
taskDto.detail = task.detail;
|
|
837
837
|
}
|
|
838
|
-
if (typeof task.scope === '
|
|
839
|
-
taskDto.scope = task.scope.uri.toString();
|
|
840
|
-
} else if (typeof task.scope === 'number') {
|
|
838
|
+
if (typeof task.scope === 'number') {
|
|
841
839
|
taskDto.scope = task.scope;
|
|
840
|
+
} else if (task.scope !== undefined) {
|
|
841
|
+
taskDto.scope = task.scope.uri.toString();
|
|
842
|
+
} else {
|
|
843
|
+
taskDto.scope = types.TaskScope.Workspace;
|
|
842
844
|
}
|
|
843
845
|
|
|
844
846
|
if (task.presentationOptions) {
|
package/src/plugin/types-impl.ts
CHANGED
|
@@ -1995,6 +1995,11 @@ export class DocumentSymbol {
|
|
|
1995
1995
|
}
|
|
1996
1996
|
}
|
|
1997
1997
|
|
|
1998
|
+
export enum CommentThreadState {
|
|
1999
|
+
Unresolved = 0,
|
|
2000
|
+
Resolved = 1
|
|
2001
|
+
}
|
|
2002
|
+
|
|
1998
2003
|
export enum CommentThreadCollapsibleState {
|
|
1999
2004
|
Collapsed = 0,
|
|
2000
2005
|
Expanded = 1
|
|
@@ -2734,13 +2739,12 @@ export namespace DebugAdapterInlineImplementation {
|
|
|
2734
2739
|
export type DebugAdapterDescriptor = DebugAdapterExecutable | DebugAdapterServer | DebugAdapterNamedPipeServer | DebugAdapterInlineImplementation;
|
|
2735
2740
|
|
|
2736
2741
|
export enum LogLevel {
|
|
2742
|
+
Off = 0,
|
|
2737
2743
|
Trace = 1,
|
|
2738
2744
|
Debug = 2,
|
|
2739
2745
|
Info = 3,
|
|
2740
2746
|
Warning = 4,
|
|
2741
|
-
Error = 5
|
|
2742
|
-
Critical = 6,
|
|
2743
|
-
Off = 7
|
|
2747
|
+
Error = 5
|
|
2744
2748
|
}
|
|
2745
2749
|
|
|
2746
2750
|
/**
|
|
@@ -3111,6 +3115,7 @@ export class TestRunRequest implements theia.TestRunRequest {
|
|
|
3111
3115
|
public readonly include: theia.TestItem[] | undefined = undefined,
|
|
3112
3116
|
public readonly exclude: theia.TestItem[] | undefined = undefined,
|
|
3113
3117
|
public readonly profile: theia.TestRunProfile | undefined = undefined,
|
|
3118
|
+
public readonly continuous: boolean | undefined = undefined,
|
|
3114
3119
|
) { }
|
|
3115
3120
|
}
|
|
3116
3121
|
|