@theia/plugin-ext 1.18.0-next.ed824933 → 1.21.0-next.11
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/LICENSE +642 -0
- package/README.md +5 -0
- package/lib/common/arrays.d.ts +4 -0
- package/lib/common/arrays.d.ts.map +1 -1
- package/lib/common/arrays.js +9 -1
- package/lib/common/arrays.js.map +1 -1
- package/lib/common/connection.d.ts +47 -34
- 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-model.d.ts +4 -0
- package/lib/common/plugin-api-rpc-model.d.ts.map +1 -1
- package/lib/common/plugin-api-rpc-model.js.map +1 -1
- package/lib/common/plugin-api-rpc.d.ts +30 -13
- package/lib/common/plugin-api-rpc.d.ts.map +1 -1
- package/lib/common/plugin-api-rpc.js +21 -1
- package/lib/common/plugin-api-rpc.js.map +1 -1
- package/lib/common/plugin-protocol.d.ts +3 -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.d.ts +5 -6
- package/lib/hosted/browser/hosted-plugin.d.ts.map +1 -1
- package/lib/hosted/browser/hosted-plugin.js +20 -14
- package/lib/hosted/browser/hosted-plugin.js.map +1 -1
- package/lib/hosted/browser/worker/debug-stub.d.ts.map +1 -1
- package/lib/hosted/browser/worker/debug-stub.js +1 -0
- package/lib/hosted/browser/worker/debug-stub.js.map +1 -1
- package/lib/hosted/node/hosted-plugin-deployer-handler.d.ts +1 -1
- package/lib/hosted/node/hosted-plugin-deployer-handler.d.ts.map +1 -1
- package/lib/hosted/node/hosted-plugin-deployer-handler.js +14 -38
- package/lib/hosted/node/hosted-plugin-deployer-handler.js.map +1 -1
- package/lib/hosted/node/hosted-plugin-localization-service.d.ts +37 -0
- package/lib/hosted/node/hosted-plugin-localization-service.d.ts.map +1 -0
- package/lib/hosted/node/hosted-plugin-localization-service.js +197 -0
- package/lib/hosted/node/hosted-plugin-localization-service.js.map +1 -0
- package/lib/hosted/node/hosted-plugin-process.d.ts +2 -2
- package/lib/hosted/node/hosted-plugin-process.d.ts.map +1 -1
- package/lib/hosted/node/hosted-plugin-process.js +5 -7
- package/lib/hosted/node/hosted-plugin-process.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 +2 -0
- package/lib/hosted/node/plugin-ext-hosted-backend-module.js.map +1 -1
- package/lib/hosted/node/plugin-manifest-loader.d.ts +1 -1
- package/lib/hosted/node/plugin-manifest-loader.d.ts.map +1 -1
- package/lib/hosted/node/plugin-manifest-loader.js +4 -52
- package/lib/hosted/node/plugin-manifest-loader.js.map +1 -1
- package/lib/hosted/node/plugin-service.d.ts +3 -6
- package/lib/hosted/node/plugin-service.d.ts.map +1 -1
- package/lib/hosted/node/plugin-service.js +7 -40
- package/lib/hosted/node/plugin-service.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 +6 -2
- package/lib/hosted/node/scanners/scanner-theia.js.map +1 -1
- package/lib/main/browser/callhierarchy/callhierarchy-type-converters.d.ts.map +1 -1
- package/lib/main/browser/callhierarchy/callhierarchy-type-converters.js +6 -2
- package/lib/main/browser/callhierarchy/callhierarchy-type-converters.js.map +1 -1
- package/lib/main/browser/custom-editors/custom-editor-opener.d.ts +2 -2
- package/lib/main/browser/custom-editors/custom-editor-opener.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/custom-editor-opener.js +6 -2
- package/lib/main/browser/custom-editors/custom-editor-opener.js.map +1 -1
- package/lib/main/browser/custom-editors/custom-editors-main.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/custom-editors-main.js +1 -2
- package/lib/main/browser/custom-editors/custom-editors-main.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 +2 -3
- package/lib/main/browser/debug/debug-main.js.map +1 -1
- package/lib/main/browser/debug/plugin-debug-adapter-contribution.d.ts +1 -1
- package/lib/main/browser/debug/plugin-debug-adapter-contribution.d.ts.map +1 -1
- package/lib/main/browser/debug/plugin-debug-adapter-contribution.js +2 -2
- package/lib/main/browser/debug/plugin-debug-adapter-contribution.js.map +1 -1
- package/lib/main/browser/debug/plugin-debug-service.d.ts +8 -0
- package/lib/main/browser/debug/plugin-debug-service.d.ts.map +1 -1
- package/lib/main/browser/debug/plugin-debug-service.js +15 -0
- package/lib/main/browser/debug/plugin-debug-service.js.map +1 -1
- package/lib/main/browser/debug/plugin-debug-session-factory.d.ts +6 -6
- 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/dialogs/modal-notification.d.ts +3 -3
- package/lib/main/browser/dialogs/modal-notification.d.ts.map +1 -1
- package/lib/main/browser/dialogs/modal-notification.js +17 -6
- package/lib/main/browser/dialogs/modal-notification.js.map +1 -1
- package/lib/main/browser/editors-and-documents-main.d.ts.map +1 -1
- package/lib/main/browser/editors-and-documents-main.js +3 -4
- package/lib/main/browser/editors-and-documents-main.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/languages-main.js +1 -1
- package/lib/main/browser/languages-main.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/message-registry-main.js +1 -1
- package/lib/main/browser/message-registry-main.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 -3
- package/lib/main/browser/plugin-ext-frontend-module.js.map +1 -1
- package/lib/main/browser/quick-open-main.d.ts +3 -6
- package/lib/main/browser/quick-open-main.d.ts.map +1 -1
- package/lib/main/browser/quick-open-main.js +48 -100
- package/lib/main/browser/quick-open-main.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/timeline-main.d.ts.map +1 -1
- package/lib/main/browser/timeline-main.js +1 -1
- package/lib/main/browser/timeline-main.js.map +1 -1
- package/lib/main/browser/view/plugin-view-registry.d.ts +3 -2
- package/lib/main/browser/view/plugin-view-registry.d.ts.map +1 -1
- package/lib/main/browser/view/plugin-view-registry.js +77 -26
- package/lib/main/browser/view/plugin-view-registry.js.map +1 -1
- package/lib/main/browser/view/plugin-view-widget.d.ts +2 -0
- package/lib/main/browser/view/plugin-view-widget.d.ts.map +1 -1
- package/lib/main/browser/view/plugin-view-widget.js +3 -1
- package/lib/main/browser/view/plugin-view-widget.js.map +1 -1
- package/lib/main/browser/view/tree-view-widget.d.ts +3 -7
- package/lib/main/browser/view/tree-view-widget.d.ts.map +1 -1
- package/lib/main/browser/view/tree-view-widget.js +26 -39
- package/lib/main/browser/view/tree-view-widget.js.map +1 -1
- package/lib/main/browser/webview/webview-frontend-security-warnings.d.ts.map +1 -1
- package/lib/main/browser/webview/webview-frontend-security-warnings.js +8 -5
- package/lib/main/browser/webview/webview-frontend-security-warnings.js.map +1 -1
- package/lib/main/browser/webview/webview-preferences.d.ts.map +1 -1
- package/lib/main/browser/webview/webview-preferences.js +3 -2
- package/lib/main/browser/webview/webview-preferences.js.map +1 -1
- package/lib/main/browser/webview/webview.d.ts +1 -1
- package/lib/main/browser/webview/webview.d.ts.map +1 -1
- package/lib/main/browser/webview/webview.js +2 -2
- package/lib/main/browser/webview/webview.js.map +1 -1
- package/lib/plugin/comments.d.ts.map +1 -1
- package/lib/plugin/comments.js +2 -3
- package/lib/plugin/comments.js.map +1 -1
- package/lib/plugin/custom-editors.d.ts +1 -2
- package/lib/plugin/custom-editors.d.ts.map +1 -1
- package/lib/plugin/custom-editors.js +2 -3
- package/lib/plugin/custom-editors.js.map +1 -1
- package/lib/plugin/decorations.d.ts.map +1 -1
- package/lib/plugin/decorations.js +2 -3
- package/lib/plugin/decorations.js.map +1 -1
- package/lib/plugin/document-data.d.ts.map +1 -1
- package/lib/plugin/document-data.js +1 -1
- package/lib/plugin/document-data.js.map +1 -1
- package/lib/plugin/documents.d.ts.map +1 -1
- package/lib/plugin/documents.js +1 -2
- package/lib/plugin/documents.js.map +1 -1
- package/lib/plugin/file-system-event-service-ext-impl.d.ts.map +1 -1
- package/lib/plugin/file-system-event-service-ext-impl.js +2 -3
- package/lib/plugin/file-system-event-service-ext-impl.js.map +1 -1
- package/lib/plugin/file-system-ext-impl.d.ts.map +1 -1
- package/lib/plugin/file-system-ext-impl.js +12 -13
- package/lib/plugin/file-system-ext-impl.js.map +1 -1
- package/lib/plugin/known-commands.spec.js +1 -2
- package/lib/plugin/known-commands.spec.js.map +1 -1
- package/lib/plugin/languages/call-hierarchy.d.ts +1 -1
- package/lib/plugin/languages/call-hierarchy.d.ts.map +1 -1
- package/lib/plugin/languages/call-hierarchy.js +8 -3
- package/lib/plugin/languages/call-hierarchy.js.map +1 -1
- package/lib/plugin/languages/rename.d.ts +1 -2
- package/lib/plugin/languages/rename.d.ts.map +1 -1
- package/lib/plugin/languages/rename.js.map +1 -1
- package/lib/plugin/languages.d.ts +1 -1
- package/lib/plugin/languages.d.ts.map +1 -1
- package/lib/plugin/languages.js +2 -1
- package/lib/plugin/languages.js.map +1 -1
- package/lib/plugin/message-registry.d.ts.map +1 -1
- package/lib/plugin/message-registry.js +3 -0
- package/lib/plugin/message-registry.js.map +1 -1
- package/lib/plugin/node/debug/debug.d.ts +7 -6
- package/lib/plugin/node/debug/debug.d.ts.map +1 -1
- package/lib/plugin/node/debug/debug.js +37 -19
- 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 +8 -4
- package/lib/plugin/node/debug/plugin-debug-adapter-starter.d.ts.map +1 -1
- package/lib/plugin/node/debug/plugin-debug-adapter-starter.js +16 -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 +10 -5
- package/lib/plugin/plugin-context.js.map +1 -1
- package/lib/plugin/plugin-manager.d.ts +2 -0
- package/lib/plugin/plugin-manager.d.ts.map +1 -1
- package/lib/plugin/plugin-manager.js +24 -3
- package/lib/plugin/plugin-manager.js.map +1 -1
- package/lib/plugin/plugin-storage.d.ts +4 -0
- package/lib/plugin/plugin-storage.d.ts.map +1 -1
- package/lib/plugin/plugin-storage.js +6 -1
- package/lib/plugin/plugin-storage.js.map +1 -1
- package/lib/plugin/preference-registry.spec.js.map +1 -1
- package/lib/plugin/quick-open.d.ts +2 -4
- package/lib/plugin/quick-open.d.ts.map +1 -1
- package/lib/plugin/quick-open.js +12 -29
- 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/lib/plugin/timeline.d.ts.map +1 -1
- package/lib/plugin/timeline.js +1 -2
- package/lib/plugin/timeline.js.map +1 -1
- package/lib/plugin/type-converters.d.ts.map +1 -1
- package/lib/plugin/type-converters.js +18 -11
- package/lib/plugin/type-converters.js.map +1 -1
- package/lib/plugin/types-impl.d.ts +55 -1
- package/lib/plugin/types-impl.d.ts.map +1 -1
- package/lib/plugin/types-impl.js +81 -1
- package/lib/plugin/types-impl.js.map +1 -1
- package/lib/plugin/webviews.d.ts +1 -2
- package/lib/plugin/webviews.d.ts.map +1 -1
- package/lib/plugin/webviews.js.map +1 -1
- package/package.json +31 -27
- package/src/common/arrays.ts +8 -0
- package/src/common/connection.ts +98 -42
- package/src/common/plugin-api-rpc-model.ts +4 -0
- package/src/common/plugin-api-rpc.ts +31 -12
- package/src/common/plugin-protocol.ts +3 -1
- package/src/hosted/browser/hosted-plugin.ts +20 -13
- package/src/hosted/browser/worker/debug-stub.ts +1 -0
- package/src/hosted/node/hosted-plugin-deployer-handler.ts +13 -40
- package/src/hosted/node/hosted-plugin-localization-service.ts +201 -0
- package/src/hosted/node/hosted-plugin-process.ts +4 -6
- package/src/hosted/node/plugin-ext-hosted-backend-module.ts +2 -0
- package/src/hosted/node/plugin-manifest-loader.ts +4 -56
- package/src/hosted/node/plugin-service.ts +7 -40
- package/src/hosted/node/scanners/scanner-theia.ts +7 -3
- package/src/main/browser/callhierarchy/callhierarchy-type-converters.ts +6 -2
- package/src/main/browser/custom-editors/custom-editor-opener.tsx +8 -4
- package/src/main/browser/custom-editors/custom-editors-main.ts +1 -2
- package/src/main/browser/debug/debug-main.ts +4 -5
- package/src/main/browser/debug/plugin-debug-adapter-contribution.ts +3 -3
- package/src/main/browser/debug/plugin-debug-service.ts +23 -0
- package/src/main/browser/debug/plugin-debug-session-factory.ts +6 -6
- package/src/main/browser/dialogs/modal-notification.ts +18 -7
- package/src/main/browser/dialogs/style/modal-notification.css +17 -2
- package/src/main/browser/editors-and-documents-main.ts +1 -2
- package/src/main/browser/file-system-main-impl.ts +1 -1
- package/src/main/browser/languages-main.ts +1 -1
- package/src/main/browser/main-context.ts +3 -3
- package/src/main/browser/message-registry-main.ts +1 -1
- package/src/main/browser/plugin-ext-frontend-module.ts +6 -4
- package/src/main/browser/quick-open-main.ts +54 -109
- package/src/main/browser/style/tree.css +4 -0
- package/src/main/browser/tasks-main.ts +7 -0
- package/src/main/browser/timeline-main.ts +1 -2
- package/src/main/browser/view/plugin-view-registry.ts +83 -28
- package/src/main/browser/view/plugin-view-widget.ts +7 -2
- package/src/main/browser/view/tree-view-widget.tsx +43 -65
- package/src/main/browser/webview/pre/host.js +20 -12
- package/src/main/browser/webview/pre/main.js +1 -2
- package/src/main/browser/webview/pre/service-worker.js +1 -1
- package/src/main/browser/webview/webview-frontend-security-warnings.ts +8 -7
- package/src/main/browser/webview/webview-preferences.ts +3 -2
- package/src/main/browser/webview/webview.ts +2 -2
- package/src/plugin/comments.ts +1 -2
- package/src/plugin/custom-editors.ts +2 -4
- package/src/plugin/decorations.ts +1 -2
- package/src/plugin/document-data.ts +1 -2
- package/src/plugin/documents.ts +1 -2
- package/src/plugin/file-system-event-service-ext-impl.ts +1 -2
- package/src/plugin/file-system-ext-impl.ts +1 -2
- package/src/plugin/known-commands.spec.ts +1 -2
- package/src/plugin/languages/call-hierarchy.ts +14 -5
- package/src/plugin/languages/rename.ts +1 -2
- package/src/plugin/languages.ts +5 -2
- package/src/plugin/message-registry.ts +3 -1
- package/src/plugin/node/debug/debug.ts +46 -26
- package/src/plugin/node/debug/plugin-debug-adapter-session.ts +9 -9
- package/src/plugin/node/debug/plugin-debug-adapter-starter.ts +17 -14
- package/src/plugin/plugin-context.ts +24 -12
- package/src/plugin/plugin-manager.ts +26 -4
- package/src/plugin/plugin-storage.ts +7 -2
- package/src/plugin/preference-registry.spec.ts +1 -2
- package/src/plugin/quick-open.ts +16 -36
- package/src/plugin/tasks/tasks.ts +4 -18
- package/src/plugin/timeline.ts +1 -2
- package/src/plugin/type-converters.ts +20 -13
- package/src/plugin/types-impl.ts +77 -1
- package/src/plugin/webviews.ts +1 -2
- 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
|
@@ -32,19 +32,17 @@ 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';
|
|
39
38
|
import { TerminalService } from '@theia/terminal/lib/browser/base/terminal-service';
|
|
40
39
|
import { MessageClient } from '@theia/core/lib/common/message-service-protocol';
|
|
41
|
-
import { OutputChannelManager } from '@theia/output/lib/
|
|
40
|
+
import { OutputChannelManager } from '@theia/output/lib/browser/output-channel';
|
|
42
41
|
import { DebugPreferences } from '@theia/debug/lib/browser/debug-preferences';
|
|
43
42
|
import { PluginDebugAdapterContribution } from './plugin-debug-adapter-contribution';
|
|
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,
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
|
|
17
|
-
import { DebugExt
|
|
17
|
+
import { DebugExt } from '../../../common/plugin-api-rpc';
|
|
18
18
|
import { DebugConfiguration } from '@theia/debug/lib/common/debug-configuration';
|
|
19
19
|
import { MaybePromise } from '@theia/core/lib/common/types';
|
|
20
20
|
import { DebuggerDescription } from '@theia/debug/lib/common/debug-service';
|
|
@@ -37,8 +37,8 @@ export class PluginDebugAdapterContribution {
|
|
|
37
37
|
return this.description.label;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
async provideDebugConfigurations(workspaceFolderUri: string | undefined): Promise<DebugConfiguration[]> {
|
|
41
|
-
return this.debugExt.$provideDebugConfigurations(this.type, workspaceFolderUri);
|
|
40
|
+
async provideDebugConfigurations(workspaceFolderUri: string | undefined, dynamic: boolean = false): Promise<DebugConfiguration[]> {
|
|
41
|
+
return this.debugExt.$provideDebugConfigurations(this.type, workspaceFolderUri, dynamic);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
async resolveDebugConfiguration(config: DebugConfiguration, workspaceFolderUri: string | undefined): Promise<DebugConfiguration | undefined> {
|
|
@@ -25,6 +25,7 @@ import { WorkspaceService } from '@theia/workspace/lib/browser';
|
|
|
25
25
|
import { DebuggerContribution } from '../../../common/plugin-protocol';
|
|
26
26
|
import { DebugRequestTypes } from '@theia/debug/lib/browser/debug-session-connection';
|
|
27
27
|
import * as theia from '@theia/plugin';
|
|
28
|
+
|
|
28
29
|
/**
|
|
29
30
|
* Debug adapter contribution registrator.
|
|
30
31
|
*/
|
|
@@ -111,6 +112,28 @@ export class PluginDebugService implements DebugService, PluginDebugAdapterContr
|
|
|
111
112
|
}
|
|
112
113
|
}
|
|
113
114
|
|
|
115
|
+
async provideDynamicDebugConfigurations(): Promise<{ type: string, configurations: DebugConfiguration[] }[]> {
|
|
116
|
+
const result: Promise<{ type: string, configurations: theia.DebugConfiguration[] }>[] = [];
|
|
117
|
+
|
|
118
|
+
for (const [type, contributor] of this.contributors.entries()) {
|
|
119
|
+
const typeConfigurations = this.resolveDynamicConfigurationsForType(type, contributor);
|
|
120
|
+
result.push(typeConfigurations);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
return Promise.all(result);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
protected async resolveDynamicConfigurationsForType(
|
|
127
|
+
type: string,
|
|
128
|
+
contributor: PluginDebugAdapterContribution): Promise<{ type: string, configurations: DebugConfiguration[] }> {
|
|
129
|
+
|
|
130
|
+
const configurations = await contributor.provideDebugConfigurations(undefined, true);
|
|
131
|
+
for (const configuration of configurations) {
|
|
132
|
+
configuration.dynamic = true;
|
|
133
|
+
}
|
|
134
|
+
return { type, configurations };
|
|
135
|
+
}
|
|
136
|
+
|
|
114
137
|
async resolveDebugConfiguration(config: DebugConfiguration, workspaceFolderUri: string | undefined): Promise<DebugConfiguration> {
|
|
115
138
|
let resolved = config;
|
|
116
139
|
|
|
@@ -14,23 +14,23 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
|
|
17
|
-
import { DefaultDebugSessionFactory
|
|
17
|
+
import { DefaultDebugSessionFactory } from '@theia/debug/lib/browser/debug-session-contribution';
|
|
18
18
|
import { TerminalService } from '@theia/terminal/lib/browser/base/terminal-service';
|
|
19
19
|
import { EditorManager } from '@theia/editor/lib/browser/editor-manager';
|
|
20
20
|
import { BreakpointManager } from '@theia/debug/lib/browser/breakpoint/breakpoint-manager';
|
|
21
21
|
import { LabelProvider } from '@theia/core/lib/browser/label-provider';
|
|
22
22
|
import { MessageClient } from '@theia/core/lib/common/message-service-protocol';
|
|
23
|
-
import { OutputChannelManager } from '@theia/output/lib/
|
|
23
|
+
import { OutputChannelManager } from '@theia/output/lib/browser/output-channel';
|
|
24
24
|
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
|
-
import { ContributionProvider } from '@theia/core';
|
|
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>
|
|
@@ -18,7 +18,8 @@ import { Message } from '@theia/core/shared/@phosphor/messaging';
|
|
|
18
18
|
import { codiconArray, Key } from '@theia/core/lib/browser';
|
|
19
19
|
import { AbstractDialog } from '@theia/core/lib/browser/dialogs';
|
|
20
20
|
import '../../../../src/main/browser/dialogs/style/modal-notification.css';
|
|
21
|
-
import { MainMessageItem } from '../../../common/plugin-api-rpc';
|
|
21
|
+
import { MainMessageItem, MainMessageOptions } from '../../../common/plugin-api-rpc';
|
|
22
|
+
import { FrontendApplicationConfigProvider } from '@theia/core/lib/browser/frontend-application-config-provider';
|
|
22
23
|
|
|
23
24
|
export enum MessageType {
|
|
24
25
|
Error = 'error',
|
|
@@ -29,6 +30,7 @@ export enum MessageType {
|
|
|
29
30
|
const NOTIFICATION = 'modal-Notification';
|
|
30
31
|
const ICON = 'icon';
|
|
31
32
|
const TEXT = 'text';
|
|
33
|
+
const DETAIL = 'detail';
|
|
32
34
|
|
|
33
35
|
@injectable()
|
|
34
36
|
export class ModalNotification extends AbstractDialog<string | undefined> {
|
|
@@ -36,7 +38,7 @@ export class ModalNotification extends AbstractDialog<string | undefined> {
|
|
|
36
38
|
protected actionTitle: string | undefined;
|
|
37
39
|
|
|
38
40
|
constructor() {
|
|
39
|
-
super({ title:
|
|
41
|
+
super({ title: FrontendApplicationConfigProvider.get().applicationName });
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
protected onCloseRequest(msg: Message): void {
|
|
@@ -48,12 +50,12 @@ export class ModalNotification extends AbstractDialog<string | undefined> {
|
|
|
48
50
|
return this.actionTitle;
|
|
49
51
|
}
|
|
50
52
|
|
|
51
|
-
showDialog(messageType: MessageType, text: string, actions: MainMessageItem[]): Promise<string | undefined> {
|
|
52
|
-
this.contentNode.appendChild(this.createMessageNode(messageType, text, actions));
|
|
53
|
+
showDialog(messageType: MessageType, text: string, options: MainMessageOptions, actions: MainMessageItem[]): Promise<string | undefined> {
|
|
54
|
+
this.contentNode.appendChild(this.createMessageNode(messageType, text, options, actions));
|
|
53
55
|
return this.open();
|
|
54
56
|
}
|
|
55
57
|
|
|
56
|
-
protected createMessageNode(messageType: MessageType, text: string, actions: MainMessageItem[]): HTMLElement {
|
|
58
|
+
protected createMessageNode(messageType: MessageType, text: string, options: MainMessageOptions, actions: MainMessageItem[]): HTMLElement {
|
|
57
59
|
const messageNode = document.createElement('div');
|
|
58
60
|
messageNode.classList.add(NOTIFICATION);
|
|
59
61
|
|
|
@@ -67,6 +69,13 @@ export class ModalNotification extends AbstractDialog<string | undefined> {
|
|
|
67
69
|
const textElement = textContainer.appendChild(document.createElement('p'));
|
|
68
70
|
textElement.textContent = text;
|
|
69
71
|
|
|
72
|
+
if (options.detail) {
|
|
73
|
+
const detailContainer = textContainer.appendChild(document.createElement('div'));
|
|
74
|
+
detailContainer.classList.add(DETAIL);
|
|
75
|
+
const detailElement = detailContainer.appendChild(document.createElement('p'));
|
|
76
|
+
detailElement.textContent = options.detail;
|
|
77
|
+
}
|
|
78
|
+
|
|
70
79
|
actions.forEach((action: MainMessageItem) => {
|
|
71
80
|
const button = this.createButton(action.title);
|
|
72
81
|
button.classList.add('main');
|
|
@@ -79,8 +88,10 @@ export class ModalNotification extends AbstractDialog<string | undefined> {
|
|
|
79
88
|
},
|
|
80
89
|
'click');
|
|
81
90
|
});
|
|
82
|
-
if (
|
|
83
|
-
this.
|
|
91
|
+
if (actions.length <= 0) {
|
|
92
|
+
this.appendAcceptButton();
|
|
93
|
+
} else if (!actions.some(action => action.isCloseAffordance === true)) {
|
|
94
|
+
this.appendCloseButton('Close');
|
|
84
95
|
}
|
|
85
96
|
|
|
86
97
|
return messageNode;
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
order: 1;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
.modal-Notification .icon .
|
|
45
|
+
.modal-Notification .icon .codicon {
|
|
46
46
|
line-height: inherit;
|
|
47
47
|
vertical-align: middle;
|
|
48
|
-
font-size:
|
|
48
|
+
font-size: calc(var(--theia-ui-padding)*5);
|
|
49
49
|
color: var(--theia-editorInfo-foreground);
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -106,3 +106,18 @@
|
|
|
106
106
|
.modal-Notification .buttons > button:hover {
|
|
107
107
|
background-color: var(--theia-button-hoverBackground);
|
|
108
108
|
}
|
|
109
|
+
|
|
110
|
+
.modal-Notification .detail {
|
|
111
|
+
align-self: center;
|
|
112
|
+
order: 3;
|
|
113
|
+
flex: 1 100%;
|
|
114
|
+
color: var(--theia-descriptionForeground);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.modal-Notification .detail > p {
|
|
118
|
+
margin: calc(var(--theia-ui-padding) * 2) 0px 0px 0px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.modal-Notification .text {
|
|
122
|
+
padding: calc(var(--theia-ui-padding)*1.5);
|
|
123
|
+
}
|
|
@@ -29,8 +29,7 @@ import { EditorModelService } from './text-editor-model-service';
|
|
|
29
29
|
import { MonacoEditorModel } from '@theia/monaco/lib/browser/monaco-editor-model';
|
|
30
30
|
import { MonacoEditor } from '@theia/monaco/lib/browser/monaco-editor';
|
|
31
31
|
import { TextEditorMain } from './text-editor-main';
|
|
32
|
-
import { Emitter } from '@theia/core';
|
|
33
|
-
import { DisposableCollection } from '@theia/core';
|
|
32
|
+
import { DisposableCollection, Emitter } from '@theia/core';
|
|
34
33
|
import { EditorManager, EditorWidget } from '@theia/editor/lib/browser';
|
|
35
34
|
|
|
36
35
|
export class EditorsAndDocumentsMain implements Disposable {
|
|
@@ -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
|
|
|
@@ -774,7 +774,7 @@ export class LanguagesMainImpl implements LanguagesMain, Disposable {
|
|
|
774
774
|
selector: language,
|
|
775
775
|
getRootDefinition: (uri: DocumentUri, position: Position, cancellationToken: CancellationToken) =>
|
|
776
776
|
this.proxy.$provideRootDefinition(handle, toUriComponents(uri), fromPosition(position), cancellationToken)
|
|
777
|
-
.then(def => toDefinition(def)),
|
|
777
|
+
.then(def => Array.isArray(def) ? def.map(item => toDefinition(item)) : toDefinition(def)),
|
|
778
778
|
getCallers: (definition: Definition, cancellationToken: CancellationToken) => this.proxy.$provideCallers(handle, fromDefinition(definition), cancellationToken)
|
|
779
779
|
.then(result => {
|
|
780
780
|
if (!result) {
|
|
@@ -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);
|
|
@@ -40,7 +40,7 @@ export class MessageRegistryMainImpl implements MessageRegistryMain {
|
|
|
40
40
|
type === MainMessageType.Warning ? MessageType.Warning :
|
|
41
41
|
MessageType.Info;
|
|
42
42
|
const modalNotification = new ModalNotification();
|
|
43
|
-
return modalNotification.showDialog(messageType, message, actions);
|
|
43
|
+
return modalNotification.showDialog(messageType, message, options, actions);
|
|
44
44
|
}
|
|
45
45
|
switch (type) {
|
|
46
46
|
case MainMessageType.Info:
|
|
@@ -21,7 +21,7 @@ import '../../../src/main/browser/style/comments.css';
|
|
|
21
21
|
import { ContainerModule } from '@theia/core/shared/inversify';
|
|
22
22
|
import {
|
|
23
23
|
FrontendApplicationContribution, WidgetFactory, bindViewContribution,
|
|
24
|
-
ViewContainerIdentifier, ViewContainer, createTreeContainer, TreeImpl, TreeWidget, TreeModelImpl, LabelProviderContribution
|
|
24
|
+
ViewContainerIdentifier, ViewContainer, createTreeContainer, TreeImpl, TreeWidget, TreeModelImpl, LabelProviderContribution
|
|
25
25
|
} from '@theia/core/lib/browser';
|
|
26
26
|
import { MaybePromise, CommandContribution, ResourceResolver, bindContributionProvider } from '@theia/core/lib/common';
|
|
27
27
|
import { WebSocketConnectionProvider } from '@theia/core/lib/browser/messaging';
|
|
@@ -147,10 +147,12 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
|
147
147
|
createWidget: (identifier: TreeViewWidgetIdentifier) => {
|
|
148
148
|
const child = createTreeContainer(container, {
|
|
149
149
|
contextMenuPath: VIEW_ITEM_CONTEXT_MENU,
|
|
150
|
-
|
|
151
|
-
|
|
150
|
+
expandOnlyOnExpansionToggleClick: true,
|
|
151
|
+
expansionTogglePadding: 22,
|
|
152
|
+
globalSelection: true,
|
|
153
|
+
leftPadding: 8,
|
|
154
|
+
search: true
|
|
152
155
|
});
|
|
153
|
-
child.rebind(TreeProps).toConstantValue({ leftPadding: 8, expansionTogglePadding: 22, expandOnlyOnExpansionToggleClick: true, });
|
|
154
156
|
child.bind(TreeViewWidgetIdentifier).toConstantValue(identifier);
|
|
155
157
|
child.bind(PluginTree).toSelf();
|
|
156
158
|
child.rebind(TreeImpl).toService(PluginTree);
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
17
17
|
|
|
18
|
-
import { InputBoxOptions
|
|
18
|
+
import { InputBoxOptions } from '@theia/plugin';
|
|
19
19
|
import { interfaces } from '@theia/core/shared/inversify';
|
|
20
20
|
import { RPCProtocol } from '../../common/rpc-protocol';
|
|
21
21
|
import {
|
|
@@ -23,15 +23,17 @@ import {
|
|
|
23
23
|
QuickOpenMain,
|
|
24
24
|
MAIN_RPC_CONTEXT,
|
|
25
25
|
TransferInputBox,
|
|
26
|
-
TransferQuickPick,
|
|
27
26
|
TransferQuickPickItems,
|
|
28
27
|
TransferQuickInput,
|
|
29
28
|
TransferQuickInputButton
|
|
30
29
|
} from '../../common/plugin-api-rpc';
|
|
31
30
|
import {
|
|
32
|
-
InputOptions,
|
|
31
|
+
InputOptions,
|
|
32
|
+
PickOptions,
|
|
33
|
+
QuickInputButton,
|
|
34
|
+
QuickInputButtonHandle,
|
|
35
|
+
QuickInputService
|
|
33
36
|
} from '@theia/core/lib/browser';
|
|
34
|
-
import { QuickPickService } from '@theia/core/lib/common/quick-pick-service';
|
|
35
37
|
import { DisposableCollection, Disposable } from '@theia/core/lib/common/disposable';
|
|
36
38
|
import { CancellationToken } from '@theia/core/lib/common/cancellation';
|
|
37
39
|
import { MonacoQuickInputService } from '@theia/monaco/lib/browser/monaco-quick-input-service';
|
|
@@ -47,7 +49,6 @@ export interface QuickInputSession {
|
|
|
47
49
|
export class QuickOpenMainImpl implements QuickOpenMain, Disposable {
|
|
48
50
|
|
|
49
51
|
private quickInputService: QuickInputService;
|
|
50
|
-
private quickPickService: QuickPickService;
|
|
51
52
|
private proxy: QuickOpenExt;
|
|
52
53
|
private delegate: MonacoQuickInputService;
|
|
53
54
|
private readonly items: Record<number, {
|
|
@@ -61,7 +62,6 @@ export class QuickOpenMainImpl implements QuickOpenMain, Disposable {
|
|
|
61
62
|
this.proxy = rpc.getProxy(MAIN_RPC_CONTEXT.QUICK_OPEN_EXT);
|
|
62
63
|
this.delegate = container.get(MonacoQuickInputService);
|
|
63
64
|
this.quickInputService = container.get(QuickInputService);
|
|
64
|
-
this.quickPickService = container.get(QuickPickService);
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
dispose(): void {
|
|
@@ -194,54 +194,55 @@ export class QuickOpenMainImpl implements QuickOpenMain, Disposable {
|
|
|
194
194
|
|
|
195
195
|
private sessions = new Map<number, QuickInputSession>();
|
|
196
196
|
|
|
197
|
-
$createOrUpdate<T extends theia.QuickPickItem>(params: TransferQuickInput
|
|
197
|
+
$createOrUpdate<T extends theia.QuickPickItem>(params: TransferQuickInput): Promise<void> {
|
|
198
198
|
const sessionId = params.id;
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
199
|
+
let session = this.sessions.get(sessionId);
|
|
200
|
+
if (!session) {
|
|
201
|
+
if (params.type === 'quickPick') {
|
|
202
|
+
const quickPick = this.quickInputService.createQuickPick();
|
|
203
|
+
quickPick.onDidAccept(() => {
|
|
204
|
+
this.proxy.$acceptOnDidAccept(sessionId);
|
|
205
|
+
});
|
|
206
|
+
quickPick.onDidChangeActive((items: Array<monaco.quickInput.IQuickPickItem>) => {
|
|
207
|
+
this.proxy.$onDidChangeActive(sessionId, items.map(item => (item as TransferQuickPickItems).handle));
|
|
208
|
+
});
|
|
209
|
+
quickPick.onDidChangeSelection((items: Array<monaco.quickInput.IQuickPickItem>) => {
|
|
210
|
+
this.proxy.$onDidChangeSelection(sessionId, items.map(item => (item as TransferQuickPickItems).handle));
|
|
211
|
+
});
|
|
212
|
+
quickPick.onDidTriggerButton((button: QuickInputButtonHandle) => {
|
|
213
|
+
this.proxy.$acceptOnDidTriggerButton(sessionId, button);
|
|
214
|
+
});
|
|
215
|
+
quickPick.onDidChangeValue((value: string) => {
|
|
216
|
+
this.proxy.$acceptDidChangeValue(sessionId, value);
|
|
217
|
+
});
|
|
218
|
+
quickPick.onDidHide(() => {
|
|
219
|
+
this.proxy.$acceptOnDidHide(sessionId);
|
|
220
|
+
});
|
|
221
|
+
session = {
|
|
222
|
+
input: quickPick,
|
|
223
|
+
handlesToItems: new Map()
|
|
224
|
+
};
|
|
225
|
+
} else {
|
|
226
|
+
const inputBox = this.quickInputService.createInputBox();
|
|
227
|
+
inputBox.onDidAccept(() => {
|
|
228
|
+
this.proxy.$acceptOnDidAccept(sessionId);
|
|
229
|
+
});
|
|
230
|
+
inputBox.onDidTriggerButton((button: QuickInputButtonHandle) => {
|
|
231
|
+
this.proxy.$acceptOnDidTriggerButton(sessionId, button);
|
|
232
|
+
});
|
|
233
|
+
inputBox.onDidChangeValue((value: string) => {
|
|
234
|
+
this.proxy.$acceptDidChangeValue(sessionId, value);
|
|
235
|
+
});
|
|
236
|
+
inputBox.onDidHide(() => {
|
|
237
|
+
this.proxy.$acceptOnDidHide(sessionId);
|
|
238
|
+
});
|
|
239
|
+
session = {
|
|
240
|
+
input: inputBox,
|
|
241
|
+
handlesToItems: new Map()
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
this.sessions.set(sessionId, session);
|
|
245
|
+
}
|
|
245
246
|
if (session) {
|
|
246
247
|
const { input, handlesToItems } = session;
|
|
247
248
|
for (const param in params) {
|
|
@@ -297,47 +298,6 @@ export class QuickOpenMainImpl implements QuickOpenMain, Disposable {
|
|
|
297
298
|
return Promise.resolve(undefined);
|
|
298
299
|
}
|
|
299
300
|
|
|
300
|
-
async $showCustomQuickPick<T extends QuickPickItemExt>(options: TransferQuickPick<T>): Promise<void> {
|
|
301
|
-
const sessionId = options.id;
|
|
302
|
-
const toDispose = new DisposableCollection();
|
|
303
|
-
|
|
304
|
-
toDispose.push(this.quickPickService.onDidAccept(() => {
|
|
305
|
-
this.proxy.$acceptOnDidAccept(sessionId);
|
|
306
|
-
}));
|
|
307
|
-
toDispose.push(this.quickPickService.onDidChangeActive((e: { quickPick: any, activeItems: Array<QuickPickValue<number>> }) => {
|
|
308
|
-
this.proxy.$onDidChangeActive(sessionId, e.activeItems.map(item => item.value!));
|
|
309
|
-
}));
|
|
310
|
-
toDispose.push(this.quickPickService.onDidChangeSelection((e: { quickPick: any, selectedItems: Array<QuickPickValue<number>> }) => {
|
|
311
|
-
this.proxy.$onDidChangeSelection(sessionId, e.selectedItems.map(item => item.value!));
|
|
312
|
-
}));
|
|
313
|
-
toDispose.push(this.quickPickService.onDidChangeValue((e: { quickPick: any, filter: string }) => {
|
|
314
|
-
this.proxy.$acceptDidChangeValue(sessionId, e.filter);
|
|
315
|
-
}));
|
|
316
|
-
toDispose.push(this.quickPickService.onDidTriggerButton(button => {
|
|
317
|
-
this.proxy.$acceptOnDidTriggerButton(sessionId, button);
|
|
318
|
-
}));
|
|
319
|
-
toDispose.push(this.quickPickService.onDidHide(() => {
|
|
320
|
-
this.proxy.$acceptOnDidHide(sessionId);
|
|
321
|
-
if (!toDispose.disposed) {
|
|
322
|
-
toDispose.dispose();
|
|
323
|
-
}
|
|
324
|
-
}));
|
|
325
|
-
this.toDispose.push(toDispose);
|
|
326
|
-
|
|
327
|
-
this.quickPickService.show(this.convertToQuickPickItem(options.items), {
|
|
328
|
-
buttons: options.buttons ? this.convertToQuickInputButtons(options.buttons) : [],
|
|
329
|
-
placeholder: options.placeholder,
|
|
330
|
-
matchOnDescription: options.matchOnDescription,
|
|
331
|
-
step: options.step,
|
|
332
|
-
title: options.title,
|
|
333
|
-
totalSteps: options.totalSteps,
|
|
334
|
-
ignoreFocusOut: options.ignoreFocusOut,
|
|
335
|
-
value: options.value,
|
|
336
|
-
matchOnLabel: true,
|
|
337
|
-
runIfSingle: false,
|
|
338
|
-
});
|
|
339
|
-
}
|
|
340
|
-
|
|
341
301
|
$hide(): void {
|
|
342
302
|
this.delegate.hide();
|
|
343
303
|
}
|
|
@@ -351,21 +311,6 @@ export class QuickOpenMainImpl implements QuickOpenMain, Disposable {
|
|
|
351
311
|
return Promise.resolve(undefined);
|
|
352
312
|
}
|
|
353
313
|
|
|
354
|
-
private convertToQuickPickItem(items: TransferQuickPickItems[] | undefined): Array<QuickPickItem> {
|
|
355
|
-
const convertedItems: QuickPickValue<number>[] = [];
|
|
356
|
-
if (items) {
|
|
357
|
-
for (const i of items) {
|
|
358
|
-
convertedItems.push({
|
|
359
|
-
label: i.label,
|
|
360
|
-
description: i.description,
|
|
361
|
-
detail: i.detail,
|
|
362
|
-
value: i.handle
|
|
363
|
-
});
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
return convertedItems;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
314
|
private convertToQuickInputButtons(buttons: Array<TransferQuickInputButton>): Array<QuickInputButton> {
|
|
370
315
|
return buttons.map((button, i) => ({
|
|
371
316
|
iconPath: getIconUris(button.iconPath),
|
|
@@ -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 {
|
|
@@ -14,12 +14,11 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import { interfaces } from '@theia/core/shared/inversify';
|
|
17
|
-
import { TimelineMain } from '../../common/plugin-api-rpc';
|
|
17
|
+
import { MAIN_RPC_CONTEXT, TimelineExt, TimelineMain } from '../../common/plugin-api-rpc';
|
|
18
18
|
import { RPCProtocol } from '../../common/rpc-protocol';
|
|
19
19
|
import { TimelineService } from '@theia/timeline/lib/browser/timeline-service';
|
|
20
20
|
import { Emitter } from '@theia/core/lib/common';
|
|
21
21
|
import { URI } from '@theia/core/shared/vscode-uri';
|
|
22
|
-
import { MAIN_RPC_CONTEXT, TimelineExt } from '../../common/plugin-api-rpc';
|
|
23
22
|
import {
|
|
24
23
|
InternalTimelineOptions,
|
|
25
24
|
Timeline,
|