@codingame/monaco-vscode-extensions-service-override 3.2.3 → 4.1.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/extensions.js +6 -87
- package/override/vs/platform/dialogs/common/dialogs.js +2 -0
- package/package.json +9 -9
- package/_virtual/semver.js +0 -3
- package/external/vscode-semver/semver.js +0 -985
- package/override/vs/workbench/browser/parts/editor/textEditor.weak.js +0 -8
- package/vscode/src/vs/base/common/console.js +0 -59
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +0 -497
- package/vscode/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.js +0 -44
- package/vscode/src/vs/platform/lifecycle/common/lifecycle.js +0 -27
- package/vscode/src/vs/platform/remote/common/managedSocket.js +0 -98
- package/vscode/src/vs/workbench/api/browser/mainThreadAiEmbeddingVector.js +0 -31
- package/vscode/src/vs/workbench/api/browser/mainThreadAiRelatedInformation.js +0 -35
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +0 -227
- package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js +0 -68
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +0 -103
- package/vscode/src/vs/workbench/api/browser/mainThreadChat.js +0 -83
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +0 -203
- package/vscode/src/vs/workbench/api/browser/mainThreadChatProvider.js +0 -201
- package/vscode/src/vs/workbench/api/browser/mainThreadChatVariables.js +0 -41
- package/vscode/src/vs/workbench/api/browser/mainThreadClipboard.js +0 -24
- package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.js +0 -107
- package/vscode/src/vs/workbench/api/browser/mainThreadCommands.js +0 -98
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +0 -545
- package/vscode/src/vs/workbench/api/browser/mainThreadConfiguration.js +0 -80
- package/vscode/src/vs/workbench/api/browser/mainThreadConsole.js +0 -35
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +0 -578
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +0 -424
- package/vscode/src/vs/workbench/api/browser/mainThreadDecorations.js +0 -102
- package/vscode/src/vs/workbench/api/browser/mainThreadDiagnostics.js +0 -69
- package/vscode/src/vs/workbench/api/browser/mainThreadDialogs.js +0 -68
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentContentProviders.js +0 -79
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +0 -253
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +0 -370
- package/vscode/src/vs/workbench/api/browser/mainThreadDownloadService.js +0 -22
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +0 -41
- package/vscode/src/vs/workbench/api/browser/mainThreadEditor.js +0 -414
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +0 -482
- package/vscode/src/vs/workbench/api/browser/mainThreadEditors.js +0 -227
- package/vscode/src/vs/workbench/api/browser/mainThreadErrors.js +0 -24
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +0 -317
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.js +0 -208
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +0 -374
- package/vscode/src/vs/workbench/api/browser/mainThreadInlineChat.js +0 -72
- package/vscode/src/vs/workbench/api/browser/mainThreadInteractive.js +0 -28
- package/vscode/src/vs/workbench/api/browser/mainThreadIssueReporter.js +0 -50
- package/vscode/src/vs/workbench/api/browser/mainThreadLabelService.js +0 -27
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +0 -991
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.js +0 -78
- package/vscode/src/vs/workbench/api/browser/mainThreadLocalization.js +0 -35
- package/vscode/src/vs/workbench/api/browser/mainThreadLogService.js +0 -78
- package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.js +0 -93
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +0 -137
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.js +0 -194
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocuments.js +0 -123
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.js +0 -188
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDto.js +0 -129
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.js +0 -131
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.js +0 -374
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookRenderers.js +0 -25
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +0 -48
- package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +0 -76
- package/vscode/src/vs/workbench/api/browser/mainThreadProfilContentHandlers.js +0 -38
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +0 -68
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.js +0 -42
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.js +0 -185
- package/vscode/src/vs/workbench/api/browser/mainThreadRemoteConnectionData.js +0 -30
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +0 -493
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +0 -49
- package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +0 -146
- package/vscode/src/vs/workbench/api/browser/mainThreadSecretState.js +0 -70
- package/vscode/src/vs/workbench/api/browser/mainThreadShare.js +0 -50
- package/vscode/src/vs/workbench/api/browser/mainThreadSpeech.js +0 -99
- package/vscode/src/vs/workbench/api/browser/mainThreadStatusBar.js +0 -53
- package/vscode/src/vs/workbench/api/browser/mainThreadStorage.js +0 -72
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +0 -731
- package/vscode/src/vs/workbench/api/browser/mainThreadTelemetry.js +0 -53
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +0 -408
- package/vscode/src/vs/workbench/api/browser/mainThreadTesting.js +0 -195
- package/vscode/src/vs/workbench/api/browser/mainThreadTheming.js +0 -24
- package/vscode/src/vs/workbench/api/browser/mainThreadTimeline.js +0 -55
- package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.js +0 -312
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +0 -223
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +0 -110
- package/vscode/src/vs/workbench/api/browser/mainThreadUrls.js +0 -61
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewManager.js +0 -29
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +0 -283
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewViews.js +0 -100
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +0 -135
- package/vscode/src/vs/workbench/api/browser/mainThreadWindow.js +0 -57
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +0 -268
- package/vscode/src/vs/workbench/api/common/shared/dataTransferCache.js +0 -35
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +0 -73
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.js +0 -83
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +0 -284
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +0 -276
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerFileSystemProvider.js +0 -52
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +0 -1138
- package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.js +0 -41
- package/vscode/src/vs/workbench/services/extensions/common/extensionDevOptions.js +0 -25
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +0 -512
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.js +0 -274
- package/vscode/src/vs/workbench/services/extensions/common/extensionStorageMigration.js +0 -58
- package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +0 -80
- package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +0 -64
- package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.js +0 -161
- package/vscode/src/vs/workbench/services/extensions/common/remoteConsoleUtil.js +0 -49
- package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.js +0 -222
|
@@ -1,424 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { DisposableStore, DisposableMap, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
|
-
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
4
|
-
import { IDebugService, IDebugVisualization } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
5
|
-
import { MainContext, ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
6
|
-
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
7
|
-
import Severity from 'vscode/vscode/vs/base/common/severity';
|
|
8
|
-
import { AbstractDebugAdapter } from 'vscode/vscode/vs/workbench/contrib/debug/common/abstractDebugAdapter';
|
|
9
|
-
import { isSessionAttach, convertToVSCPaths, convertToDAPaths } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugUtils';
|
|
10
|
-
import { ErrorNoTelemetry } from 'vscode/vscode/vs/base/common/errors';
|
|
11
|
-
import { IDebugVisualizerService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugVisualizers';
|
|
12
|
-
import { ExtensionIdentifier } from 'vscode/vscode/vs/platform/extensions/common/extensions';
|
|
13
|
-
|
|
14
|
-
let MainThreadDebugService = class MainThreadDebugService {
|
|
15
|
-
constructor(extHostContext, debugService, visualizerService) {
|
|
16
|
-
this.debugService = debugService;
|
|
17
|
-
this.visualizerService = visualizerService;
|
|
18
|
-
this._toDispose = ( new DisposableStore());
|
|
19
|
-
this._debugAdaptersHandleCounter = 1;
|
|
20
|
-
this._visualizerHandles = ( new Map());
|
|
21
|
-
this._visualizerTreeHandles = ( new Map());
|
|
22
|
-
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostDebugService));
|
|
23
|
-
const sessionListeners = ( new DisposableMap());
|
|
24
|
-
this._toDispose.add(sessionListeners);
|
|
25
|
-
this._toDispose.add(debugService.onDidNewSession(session => {
|
|
26
|
-
this._proxy.$acceptDebugSessionStarted(this.getSessionDto(session));
|
|
27
|
-
const store = sessionListeners.get(session);
|
|
28
|
-
store.add(session.onDidChangeName(name => {
|
|
29
|
-
this._proxy.$acceptDebugSessionNameChanged(this.getSessionDto(session), name);
|
|
30
|
-
}));
|
|
31
|
-
}));
|
|
32
|
-
this._toDispose.add(debugService.onWillNewSession(session => {
|
|
33
|
-
let store = sessionListeners.get(session);
|
|
34
|
-
if (!store) {
|
|
35
|
-
store = ( new DisposableStore());
|
|
36
|
-
sessionListeners.set(session, store);
|
|
37
|
-
}
|
|
38
|
-
store.add(session.onDidCustomEvent(event => this._proxy.$acceptDebugSessionCustomEvent(this.getSessionDto(session), event)));
|
|
39
|
-
}));
|
|
40
|
-
this._toDispose.add(debugService.onDidEndSession(({ session, restart }) => {
|
|
41
|
-
this._proxy.$acceptDebugSessionTerminated(this.getSessionDto(session));
|
|
42
|
-
this._extHostKnownSessions.delete(session.getId());
|
|
43
|
-
if (!restart) {
|
|
44
|
-
sessionListeners.deleteAndDispose(session);
|
|
45
|
-
}
|
|
46
|
-
for (const [handle, value] of this._debugAdapters) {
|
|
47
|
-
if (value.session === session) {
|
|
48
|
-
this._debugAdapters.delete(handle);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}));
|
|
52
|
-
this._toDispose.add(debugService.getViewModel().onDidFocusSession(session => {
|
|
53
|
-
this._proxy.$acceptDebugSessionActiveChanged(this.getSessionDto(session));
|
|
54
|
-
}));
|
|
55
|
-
this._toDispose.add(toDisposable(() => {
|
|
56
|
-
for (const [handle, da] of this._debugAdapters) {
|
|
57
|
-
da.fireError(handle, ( new Error('Extension host shut down')));
|
|
58
|
-
}
|
|
59
|
-
}));
|
|
60
|
-
this._debugAdapters = ( new Map());
|
|
61
|
-
this._debugConfigurationProviders = ( new Map());
|
|
62
|
-
this._debugAdapterDescriptorFactories = ( new Map());
|
|
63
|
-
this._extHostKnownSessions = ( new Set());
|
|
64
|
-
this._toDispose.add(this.debugService.getViewModel().onDidFocusThread(({ thread, explicit, session }) => {
|
|
65
|
-
if (session) {
|
|
66
|
-
const dto = {
|
|
67
|
-
kind: 'thread',
|
|
68
|
-
threadId: thread?.threadId,
|
|
69
|
-
sessionId: session.getId(),
|
|
70
|
-
};
|
|
71
|
-
this._proxy.$acceptStackFrameFocus(dto);
|
|
72
|
-
}
|
|
73
|
-
}));
|
|
74
|
-
this._toDispose.add(this.debugService.getViewModel().onDidFocusStackFrame(({ stackFrame, explicit, session }) => {
|
|
75
|
-
if (session) {
|
|
76
|
-
const dto = {
|
|
77
|
-
kind: 'stackFrame',
|
|
78
|
-
threadId: stackFrame?.thread.threadId,
|
|
79
|
-
frameId: stackFrame?.frameId,
|
|
80
|
-
sessionId: session.getId(),
|
|
81
|
-
};
|
|
82
|
-
this._proxy.$acceptStackFrameFocus(dto);
|
|
83
|
-
}
|
|
84
|
-
}));
|
|
85
|
-
this.sendBreakpointsAndListen();
|
|
86
|
-
}
|
|
87
|
-
$registerDebugVisualizerTree(treeId, canEdit) {
|
|
88
|
-
this.visualizerService.registerTree(treeId, {
|
|
89
|
-
disposeItem: id => this._proxy.$disposeVisualizedTree(id),
|
|
90
|
-
getChildren: e => this._proxy.$getVisualizerTreeItemChildren(treeId, e),
|
|
91
|
-
getTreeItem: e => this._proxy.$getVisualizerTreeItem(treeId, e),
|
|
92
|
-
editItem: canEdit ? ((e, v) => this._proxy.$editVisualizerTreeItem(e, v)) : undefined
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
$unregisterDebugVisualizerTree(treeId) {
|
|
96
|
-
this._visualizerTreeHandles.get(treeId)?.dispose();
|
|
97
|
-
this._visualizerTreeHandles.delete(treeId);
|
|
98
|
-
}
|
|
99
|
-
$registerDebugVisualizer(extensionId, id) {
|
|
100
|
-
const handle = this.visualizerService.register({
|
|
101
|
-
extensionId: ( new ExtensionIdentifier(extensionId)),
|
|
102
|
-
id,
|
|
103
|
-
disposeDebugVisualizers: ids => this._proxy.$disposeDebugVisualizers(ids),
|
|
104
|
-
executeDebugVisualizerCommand: id => this._proxy.$executeDebugVisualizerCommand(id),
|
|
105
|
-
provideDebugVisualizers: (context, token) => this._proxy.$provideDebugVisualizers(extensionId, id, context, token).then(r => ( r.map(IDebugVisualization.deserialize))),
|
|
106
|
-
resolveDebugVisualizer: (viz, token) => this._proxy.$resolveDebugVisualizer(viz.id, token),
|
|
107
|
-
});
|
|
108
|
-
this._visualizerHandles.set(`${extensionId}/${id}`, handle);
|
|
109
|
-
}
|
|
110
|
-
$unregisterDebugVisualizer(extensionId, id) {
|
|
111
|
-
const key = `${extensionId}/${id}`;
|
|
112
|
-
this._visualizerHandles.get(key)?.dispose();
|
|
113
|
-
this._visualizerHandles.delete(key);
|
|
114
|
-
}
|
|
115
|
-
sendBreakpointsAndListen() {
|
|
116
|
-
this._toDispose.add(this.debugService.getModel().onDidChangeBreakpoints(e => {
|
|
117
|
-
if (e && !e.sessionOnly) {
|
|
118
|
-
const delta = {};
|
|
119
|
-
if (e.added) {
|
|
120
|
-
delta.added = this.convertToDto(e.added);
|
|
121
|
-
}
|
|
122
|
-
if (e.removed) {
|
|
123
|
-
delta.removed = ( e.removed.map(x => x.getId()));
|
|
124
|
-
}
|
|
125
|
-
if (e.changed) {
|
|
126
|
-
delta.changed = this.convertToDto(e.changed);
|
|
127
|
-
}
|
|
128
|
-
if (delta.added || delta.removed || delta.changed) {
|
|
129
|
-
this._proxy.$acceptBreakpointsDelta(delta);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}));
|
|
133
|
-
const bps = this.debugService.getModel().getBreakpoints();
|
|
134
|
-
const fbps = this.debugService.getModel().getFunctionBreakpoints();
|
|
135
|
-
const dbps = this.debugService.getModel().getDataBreakpoints();
|
|
136
|
-
if (bps.length > 0 || fbps.length > 0) {
|
|
137
|
-
this._proxy.$acceptBreakpointsDelta({
|
|
138
|
-
added: this.convertToDto(bps).concat(this.convertToDto(fbps)).concat(this.convertToDto(dbps))
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
dispose() {
|
|
143
|
-
this._toDispose.dispose();
|
|
144
|
-
}
|
|
145
|
-
createDebugAdapter(session) {
|
|
146
|
-
const handle = this._debugAdaptersHandleCounter++;
|
|
147
|
-
const da = ( new ExtensionHostDebugAdapter(this, handle, this._proxy, session));
|
|
148
|
-
this._debugAdapters.set(handle, da);
|
|
149
|
-
return da;
|
|
150
|
-
}
|
|
151
|
-
substituteVariables(folder, config) {
|
|
152
|
-
return Promise.resolve(this._proxy.$substituteVariables(folder ? folder.uri : undefined, config));
|
|
153
|
-
}
|
|
154
|
-
runInTerminal(args, sessionId) {
|
|
155
|
-
return this._proxy.$runInTerminal(args, sessionId);
|
|
156
|
-
}
|
|
157
|
-
$registerDebugTypes(debugTypes) {
|
|
158
|
-
this._toDispose.add(this.debugService.getAdapterManager().registerDebugAdapterFactory(debugTypes, this));
|
|
159
|
-
}
|
|
160
|
-
$registerBreakpoints(DTOs) {
|
|
161
|
-
for (const dto of DTOs) {
|
|
162
|
-
if (dto.type === 'sourceMulti') {
|
|
163
|
-
const rawbps = ( dto.lines.map(l => ({
|
|
164
|
-
id: l.id,
|
|
165
|
-
enabled: l.enabled,
|
|
166
|
-
lineNumber: l.line + 1,
|
|
167
|
-
column: l.character > 0 ? l.character + 1 : undefined,
|
|
168
|
-
condition: l.condition,
|
|
169
|
-
hitCondition: l.hitCondition,
|
|
170
|
-
logMessage: l.logMessage,
|
|
171
|
-
mode: l.mode,
|
|
172
|
-
})));
|
|
173
|
-
this.debugService.addBreakpoints(URI.revive(dto.uri), rawbps);
|
|
174
|
-
}
|
|
175
|
-
else if (dto.type === 'function') {
|
|
176
|
-
this.debugService.addFunctionBreakpoint(dto.functionName, dto.id, dto.mode);
|
|
177
|
-
}
|
|
178
|
-
else if (dto.type === 'data') {
|
|
179
|
-
this.debugService.addDataBreakpoint(dto.label, dto.dataId, dto.canPersist, dto.accessTypes, dto.accessType, dto.mode);
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
return Promise.resolve();
|
|
183
|
-
}
|
|
184
|
-
$unregisterBreakpoints(breakpointIds, functionBreakpointIds, dataBreakpointIds) {
|
|
185
|
-
breakpointIds.forEach(id => this.debugService.removeBreakpoints(id));
|
|
186
|
-
functionBreakpointIds.forEach(id => this.debugService.removeFunctionBreakpoints(id));
|
|
187
|
-
dataBreakpointIds.forEach(id => this.debugService.removeDataBreakpoints(id));
|
|
188
|
-
return Promise.resolve();
|
|
189
|
-
}
|
|
190
|
-
$registerDebugConfigurationProvider(debugType, providerTriggerKind, hasProvide, hasResolve, hasResolve2, handle) {
|
|
191
|
-
const provider = {
|
|
192
|
-
type: debugType,
|
|
193
|
-
triggerKind: providerTriggerKind
|
|
194
|
-
};
|
|
195
|
-
if (hasProvide) {
|
|
196
|
-
provider.provideDebugConfigurations = (folder, token) => {
|
|
197
|
-
return this._proxy.$provideDebugConfigurations(handle, folder, token);
|
|
198
|
-
};
|
|
199
|
-
}
|
|
200
|
-
if (hasResolve) {
|
|
201
|
-
provider.resolveDebugConfiguration = (folder, config, token) => {
|
|
202
|
-
return this._proxy.$resolveDebugConfiguration(handle, folder, config, token);
|
|
203
|
-
};
|
|
204
|
-
}
|
|
205
|
-
if (hasResolve2) {
|
|
206
|
-
provider.resolveDebugConfigurationWithSubstitutedVariables = (folder, config, token) => {
|
|
207
|
-
return this._proxy.$resolveDebugConfigurationWithSubstitutedVariables(handle, folder, config, token);
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
this._debugConfigurationProviders.set(handle, provider);
|
|
211
|
-
this._toDispose.add(this.debugService.getConfigurationManager().registerDebugConfigurationProvider(provider));
|
|
212
|
-
return Promise.resolve(undefined);
|
|
213
|
-
}
|
|
214
|
-
$unregisterDebugConfigurationProvider(handle) {
|
|
215
|
-
const provider = this._debugConfigurationProviders.get(handle);
|
|
216
|
-
if (provider) {
|
|
217
|
-
this._debugConfigurationProviders.delete(handle);
|
|
218
|
-
this.debugService.getConfigurationManager().unregisterDebugConfigurationProvider(provider);
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
$registerDebugAdapterDescriptorFactory(debugType, handle) {
|
|
222
|
-
const provider = {
|
|
223
|
-
type: debugType,
|
|
224
|
-
createDebugAdapterDescriptor: session => {
|
|
225
|
-
return Promise.resolve(this._proxy.$provideDebugAdapter(handle, this.getSessionDto(session)));
|
|
226
|
-
}
|
|
227
|
-
};
|
|
228
|
-
this._debugAdapterDescriptorFactories.set(handle, provider);
|
|
229
|
-
this._toDispose.add(this.debugService.getAdapterManager().registerDebugAdapterDescriptorFactory(provider));
|
|
230
|
-
return Promise.resolve(undefined);
|
|
231
|
-
}
|
|
232
|
-
$unregisterDebugAdapterDescriptorFactory(handle) {
|
|
233
|
-
const provider = this._debugAdapterDescriptorFactories.get(handle);
|
|
234
|
-
if (provider) {
|
|
235
|
-
this._debugAdapterDescriptorFactories.delete(handle);
|
|
236
|
-
this.debugService.getAdapterManager().unregisterDebugAdapterDescriptorFactory(provider);
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
getSession(sessionId) {
|
|
240
|
-
if (sessionId) {
|
|
241
|
-
return this.debugService.getModel().getSession(sessionId, true);
|
|
242
|
-
}
|
|
243
|
-
return undefined;
|
|
244
|
-
}
|
|
245
|
-
async $startDebugging(folder, nameOrConfig, options) {
|
|
246
|
-
const folderUri = folder ? URI.revive(folder) : undefined;
|
|
247
|
-
const launch = this.debugService.getConfigurationManager().getLaunch(folderUri);
|
|
248
|
-
const parentSession = this.getSession(options.parentSessionID);
|
|
249
|
-
const saveBeforeStart = typeof options.suppressSaveBeforeStart === 'boolean' ? !options.suppressSaveBeforeStart : undefined;
|
|
250
|
-
const debugOptions = {
|
|
251
|
-
noDebug: options.noDebug,
|
|
252
|
-
parentSession,
|
|
253
|
-
lifecycleManagedByParent: options.lifecycleManagedByParent,
|
|
254
|
-
repl: options.repl,
|
|
255
|
-
compact: options.compact,
|
|
256
|
-
compoundRoot: parentSession?.compoundRoot,
|
|
257
|
-
saveBeforeRestart: saveBeforeStart,
|
|
258
|
-
suppressDebugStatusbar: options.suppressDebugStatusbar,
|
|
259
|
-
suppressDebugToolbar: options.suppressDebugToolbar,
|
|
260
|
-
suppressDebugView: options.suppressDebugView,
|
|
261
|
-
};
|
|
262
|
-
try {
|
|
263
|
-
return this.debugService.startDebugging(launch, nameOrConfig, debugOptions, saveBeforeStart);
|
|
264
|
-
}
|
|
265
|
-
catch (err) {
|
|
266
|
-
throw new ErrorNoTelemetry(err && err.message ? err.message : 'cannot start debugging');
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
$setDebugSessionName(sessionId, name) {
|
|
270
|
-
const session = this.debugService.getModel().getSession(sessionId);
|
|
271
|
-
session?.setName(name);
|
|
272
|
-
}
|
|
273
|
-
$customDebugAdapterRequest(sessionId, request, args) {
|
|
274
|
-
const session = this.debugService.getModel().getSession(sessionId, true);
|
|
275
|
-
if (session) {
|
|
276
|
-
return session.customRequest(request, args).then(response => {
|
|
277
|
-
if (response && response.success) {
|
|
278
|
-
return response.body;
|
|
279
|
-
}
|
|
280
|
-
else {
|
|
281
|
-
return Promise.reject(( new ErrorNoTelemetry(response ? response.message : 'custom request failed')));
|
|
282
|
-
}
|
|
283
|
-
});
|
|
284
|
-
}
|
|
285
|
-
return Promise.reject(( new ErrorNoTelemetry('debug session not found')));
|
|
286
|
-
}
|
|
287
|
-
$getDebugProtocolBreakpoint(sessionId, breakpoinId) {
|
|
288
|
-
const session = this.debugService.getModel().getSession(sessionId, true);
|
|
289
|
-
if (session) {
|
|
290
|
-
return Promise.resolve(session.getDebugProtocolBreakpoint(breakpoinId));
|
|
291
|
-
}
|
|
292
|
-
return Promise.reject(( new ErrorNoTelemetry('debug session not found')));
|
|
293
|
-
}
|
|
294
|
-
$stopDebugging(sessionId) {
|
|
295
|
-
if (sessionId) {
|
|
296
|
-
const session = this.debugService.getModel().getSession(sessionId, true);
|
|
297
|
-
if (session) {
|
|
298
|
-
return this.debugService.stopSession(session, isSessionAttach(session));
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
else {
|
|
302
|
-
return this.debugService.stopSession(undefined);
|
|
303
|
-
}
|
|
304
|
-
return Promise.reject(( new ErrorNoTelemetry('debug session not found')));
|
|
305
|
-
}
|
|
306
|
-
$appendDebugConsole(value) {
|
|
307
|
-
const session = this.debugService.getViewModel().focusedSession;
|
|
308
|
-
session?.appendToRepl({ output: value, sev: Severity.Warning });
|
|
309
|
-
}
|
|
310
|
-
$acceptDAMessage(handle, message) {
|
|
311
|
-
this.getDebugAdapter(handle).acceptMessage(convertToVSCPaths(message, false));
|
|
312
|
-
}
|
|
313
|
-
$acceptDAError(handle, name, message, stack) {
|
|
314
|
-
this.getDebugAdapter(handle).fireError(handle, ( new Error(`${name}: ${message}\n${stack}`)));
|
|
315
|
-
}
|
|
316
|
-
$acceptDAExit(handle, code, signal) {
|
|
317
|
-
this.getDebugAdapter(handle).fireExit(handle, code, signal);
|
|
318
|
-
}
|
|
319
|
-
getDebugAdapter(handle) {
|
|
320
|
-
const adapter = this._debugAdapters.get(handle);
|
|
321
|
-
if (!adapter) {
|
|
322
|
-
throw new Error('Invalid debug adapter');
|
|
323
|
-
}
|
|
324
|
-
return adapter;
|
|
325
|
-
}
|
|
326
|
-
$sessionCached(sessionID) {
|
|
327
|
-
this._extHostKnownSessions.add(sessionID);
|
|
328
|
-
}
|
|
329
|
-
getSessionDto(session) {
|
|
330
|
-
if (session) {
|
|
331
|
-
const sessionID = session.getId();
|
|
332
|
-
if (( this._extHostKnownSessions.has(sessionID))) {
|
|
333
|
-
return sessionID;
|
|
334
|
-
}
|
|
335
|
-
else {
|
|
336
|
-
return {
|
|
337
|
-
id: sessionID,
|
|
338
|
-
type: session.configuration.type,
|
|
339
|
-
name: session.name,
|
|
340
|
-
folderUri: session.root ? session.root.uri : undefined,
|
|
341
|
-
configuration: session.configuration,
|
|
342
|
-
parent: session.parentSession?.getId(),
|
|
343
|
-
};
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
return undefined;
|
|
347
|
-
}
|
|
348
|
-
convertToDto(bps) {
|
|
349
|
-
return ( bps.map(bp => {
|
|
350
|
-
if ('name' in bp) {
|
|
351
|
-
const fbp = bp;
|
|
352
|
-
return {
|
|
353
|
-
type: 'function',
|
|
354
|
-
id: fbp.getId(),
|
|
355
|
-
enabled: fbp.enabled,
|
|
356
|
-
condition: fbp.condition,
|
|
357
|
-
hitCondition: fbp.hitCondition,
|
|
358
|
-
logMessage: fbp.logMessage,
|
|
359
|
-
functionName: fbp.name
|
|
360
|
-
};
|
|
361
|
-
}
|
|
362
|
-
else if ('dataId' in bp) {
|
|
363
|
-
const dbp = bp;
|
|
364
|
-
return {
|
|
365
|
-
type: 'data',
|
|
366
|
-
id: dbp.getId(),
|
|
367
|
-
dataId: dbp.dataId,
|
|
368
|
-
enabled: dbp.enabled,
|
|
369
|
-
condition: dbp.condition,
|
|
370
|
-
hitCondition: dbp.hitCondition,
|
|
371
|
-
logMessage: dbp.logMessage,
|
|
372
|
-
label: dbp.description,
|
|
373
|
-
canPersist: dbp.canPersist
|
|
374
|
-
};
|
|
375
|
-
}
|
|
376
|
-
else {
|
|
377
|
-
const sbp = bp;
|
|
378
|
-
return {
|
|
379
|
-
type: 'source',
|
|
380
|
-
id: sbp.getId(),
|
|
381
|
-
enabled: sbp.enabled,
|
|
382
|
-
condition: sbp.condition,
|
|
383
|
-
hitCondition: sbp.hitCondition,
|
|
384
|
-
logMessage: sbp.logMessage,
|
|
385
|
-
uri: sbp.uri,
|
|
386
|
-
line: sbp.lineNumber > 0 ? sbp.lineNumber - 1 : 0,
|
|
387
|
-
character: (typeof sbp.column === 'number' && sbp.column > 0) ? sbp.column - 1 : 0,
|
|
388
|
-
};
|
|
389
|
-
}
|
|
390
|
-
}));
|
|
391
|
-
}
|
|
392
|
-
};
|
|
393
|
-
MainThreadDebugService = __decorate([
|
|
394
|
-
extHostNamedCustomer(MainContext.MainThreadDebugService),
|
|
395
|
-
( __param(1, IDebugService)),
|
|
396
|
-
( __param(2, IDebugVisualizerService))
|
|
397
|
-
], MainThreadDebugService);
|
|
398
|
-
class ExtensionHostDebugAdapter extends AbstractDebugAdapter {
|
|
399
|
-
constructor(_ds, _handle, _proxy, session) {
|
|
400
|
-
super();
|
|
401
|
-
this._ds = _ds;
|
|
402
|
-
this._handle = _handle;
|
|
403
|
-
this._proxy = _proxy;
|
|
404
|
-
this.session = session;
|
|
405
|
-
}
|
|
406
|
-
fireError(handle, err) {
|
|
407
|
-
this._onError.fire(err);
|
|
408
|
-
}
|
|
409
|
-
fireExit(handle, code, signal) {
|
|
410
|
-
this._onExit.fire(code);
|
|
411
|
-
}
|
|
412
|
-
startSession() {
|
|
413
|
-
return Promise.resolve(this._proxy.$startDASession(this._handle, this._ds.getSessionDto(this.session)));
|
|
414
|
-
}
|
|
415
|
-
sendMessage(message) {
|
|
416
|
-
this._proxy.$sendDAMessage(this._handle, convertToDAPaths(message, true));
|
|
417
|
-
}
|
|
418
|
-
async stopSession() {
|
|
419
|
-
await this.cancelPendingRequests();
|
|
420
|
-
return Promise.resolve(this._proxy.$stopDASession(this._handle));
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
export { MainThreadDebugService };
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
3
|
-
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
4
|
-
import { dispose } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
|
-
import { MainContext, ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
6
|
-
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
7
|
-
import { IDecorationsService } from 'vscode/vscode/vs/workbench/services/decorations/common/decorations';
|
|
8
|
-
import { CancellationToken } from 'vscode/vscode/vs/base/common/cancellation';
|
|
9
|
-
|
|
10
|
-
class DecorationRequestsQueue {
|
|
11
|
-
constructor(_proxy, _handle) {
|
|
12
|
-
this._proxy = _proxy;
|
|
13
|
-
this._handle = _handle;
|
|
14
|
-
this._idPool = 0;
|
|
15
|
-
this._requests = ( new Map());
|
|
16
|
-
this._resolver = ( new Map());
|
|
17
|
-
}
|
|
18
|
-
enqueue(uri, token) {
|
|
19
|
-
const id = ++this._idPool;
|
|
20
|
-
const result = ( new Promise(resolve => {
|
|
21
|
-
this._requests.set(id, { id, uri });
|
|
22
|
-
this._resolver.set(id, resolve);
|
|
23
|
-
this._processQueue();
|
|
24
|
-
}));
|
|
25
|
-
const sub = token.onCancellationRequested(() => {
|
|
26
|
-
this._requests.delete(id);
|
|
27
|
-
this._resolver.delete(id);
|
|
28
|
-
});
|
|
29
|
-
return result.finally(() => sub.dispose());
|
|
30
|
-
}
|
|
31
|
-
_processQueue() {
|
|
32
|
-
if (typeof this._timer === 'number') {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
this._timer = setTimeout(() => {
|
|
36
|
-
const requests = this._requests;
|
|
37
|
-
const resolver = this._resolver;
|
|
38
|
-
this._proxy.$provideDecorations(this._handle, [...( requests.values())], CancellationToken.None).then(data => {
|
|
39
|
-
for (const [id, resolve] of resolver) {
|
|
40
|
-
resolve(data[id]);
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
this._requests = ( new Map());
|
|
44
|
-
this._resolver = ( new Map());
|
|
45
|
-
this._timer = undefined;
|
|
46
|
-
}, 0);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
let MainThreadDecorations = class MainThreadDecorations {
|
|
50
|
-
constructor(context, _decorationsService) {
|
|
51
|
-
this._decorationsService = _decorationsService;
|
|
52
|
-
this._provider = ( new Map());
|
|
53
|
-
this._proxy = ( context.getProxy(ExtHostContext.ExtHostDecorations));
|
|
54
|
-
}
|
|
55
|
-
dispose() {
|
|
56
|
-
this._provider.forEach(value => dispose(value));
|
|
57
|
-
this._provider.clear();
|
|
58
|
-
}
|
|
59
|
-
$registerDecorationProvider(handle, label) {
|
|
60
|
-
const emitter = ( new Emitter());
|
|
61
|
-
const queue = ( new DecorationRequestsQueue(this._proxy, handle));
|
|
62
|
-
const registration = this._decorationsService.registerDecorationsProvider({
|
|
63
|
-
label,
|
|
64
|
-
onDidChange: emitter.event,
|
|
65
|
-
provideDecorations: async (uri, token) => {
|
|
66
|
-
const data = await queue.enqueue(uri, token);
|
|
67
|
-
if (!data) {
|
|
68
|
-
return undefined;
|
|
69
|
-
}
|
|
70
|
-
const [bubble, tooltip, letter, themeColor] = data;
|
|
71
|
-
return {
|
|
72
|
-
weight: 10,
|
|
73
|
-
bubble: bubble ?? false,
|
|
74
|
-
color: themeColor?.id,
|
|
75
|
-
tooltip,
|
|
76
|
-
letter
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
this._provider.set(handle, [emitter, registration]);
|
|
81
|
-
}
|
|
82
|
-
$onDidChange(handle, resources) {
|
|
83
|
-
const provider = this._provider.get(handle);
|
|
84
|
-
if (provider) {
|
|
85
|
-
const [emitter] = provider;
|
|
86
|
-
emitter.fire(resources && ( resources.map(r => URI.revive(r))));
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
$unregisterDecorationProvider(handle) {
|
|
90
|
-
const provider = this._provider.get(handle);
|
|
91
|
-
if (provider) {
|
|
92
|
-
dispose(provider);
|
|
93
|
-
this._provider.delete(handle);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
MainThreadDecorations = __decorate([
|
|
98
|
-
extHostNamedCustomer(MainContext.MainThreadDecorations),
|
|
99
|
-
( __param(1, IDecorationsService))
|
|
100
|
-
], MainThreadDecorations);
|
|
101
|
-
|
|
102
|
-
export { MainThreadDecorations };
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { IMarkerService } from 'vscode/vscode/vs/platform/markers/common/markers';
|
|
3
|
-
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
4
|
-
import { MainContext, ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
5
|
-
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
6
|
-
import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity';
|
|
7
|
-
|
|
8
|
-
let MainThreadDiagnostics = class MainThreadDiagnostics {
|
|
9
|
-
constructor(extHostContext, _markerService, _uriIdentService) {
|
|
10
|
-
this._markerService = _markerService;
|
|
11
|
-
this._uriIdentService = _uriIdentService;
|
|
12
|
-
this._activeOwners = ( new Set());
|
|
13
|
-
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostDiagnostics));
|
|
14
|
-
this._markerListener = this._markerService.onMarkerChanged(this._forwardMarkers, this);
|
|
15
|
-
}
|
|
16
|
-
dispose() {
|
|
17
|
-
this._markerListener.dispose();
|
|
18
|
-
this._activeOwners.forEach(owner => this._markerService.changeAll(owner, []));
|
|
19
|
-
this._activeOwners.clear();
|
|
20
|
-
}
|
|
21
|
-
_forwardMarkers(resources) {
|
|
22
|
-
const data = [];
|
|
23
|
-
for (const resource of resources) {
|
|
24
|
-
const allMarkerData = this._markerService.read({ resource });
|
|
25
|
-
if (allMarkerData.length === 0) {
|
|
26
|
-
data.push([resource, []]);
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
const forgeinMarkerData = allMarkerData.filter(marker => !( this._activeOwners.has(marker.owner)));
|
|
30
|
-
if (forgeinMarkerData.length > 0) {
|
|
31
|
-
data.push([resource, forgeinMarkerData]);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
if (data.length > 0) {
|
|
36
|
-
this._proxy.$acceptMarkersChange(data);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
$changeMany(owner, entries) {
|
|
40
|
-
for (const entry of entries) {
|
|
41
|
-
const [uri, markers] = entry;
|
|
42
|
-
if (markers) {
|
|
43
|
-
for (const marker of markers) {
|
|
44
|
-
if (marker.relatedInformation) {
|
|
45
|
-
for (const relatedInformation of marker.relatedInformation) {
|
|
46
|
-
relatedInformation.resource = URI.revive(relatedInformation.resource);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
if (marker.code && typeof marker.code !== 'string') {
|
|
50
|
-
marker.code.target = URI.revive(marker.code.target);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
this._markerService.changeOne(owner, this._uriIdentService.asCanonicalUri(URI.revive(uri)), markers);
|
|
55
|
-
}
|
|
56
|
-
this._activeOwners.add(owner);
|
|
57
|
-
}
|
|
58
|
-
$clear(owner) {
|
|
59
|
-
this._markerService.changeAll(owner, []);
|
|
60
|
-
this._activeOwners.delete(owner);
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
MainThreadDiagnostics = __decorate([
|
|
64
|
-
extHostNamedCustomer(MainContext.MainThreadDiagnostics),
|
|
65
|
-
( __param(1, IMarkerService)),
|
|
66
|
-
( __param(2, IUriIdentityService))
|
|
67
|
-
], MainThreadDiagnostics);
|
|
68
|
-
|
|
69
|
-
export { MainThreadDiagnostics };
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
3
|
-
import { MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
4
|
-
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
5
|
-
import '../../../../../../override/vs/platform/dialogs/common/dialogs.js';
|
|
6
|
-
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
7
|
-
import { IFileDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs';
|
|
8
|
-
|
|
9
|
-
var MainThreadDialogs_1;
|
|
10
|
-
let MainThreadDialogs = MainThreadDialogs_1 = class MainThreadDialogs {
|
|
11
|
-
constructor(context, _fileDialogService) {
|
|
12
|
-
this._fileDialogService = _fileDialogService;
|
|
13
|
-
}
|
|
14
|
-
dispose() {
|
|
15
|
-
}
|
|
16
|
-
async $showOpenDialog(options) {
|
|
17
|
-
const convertedOptions = MainThreadDialogs_1._convertOpenOptions(options);
|
|
18
|
-
if (!convertedOptions.defaultUri) {
|
|
19
|
-
convertedOptions.defaultUri = await this._fileDialogService.defaultFilePath();
|
|
20
|
-
}
|
|
21
|
-
return Promise.resolve(this._fileDialogService.showOpenDialog(convertedOptions));
|
|
22
|
-
}
|
|
23
|
-
async $showSaveDialog(options) {
|
|
24
|
-
const convertedOptions = MainThreadDialogs_1._convertSaveOptions(options);
|
|
25
|
-
if (!convertedOptions.defaultUri) {
|
|
26
|
-
convertedOptions.defaultUri = await this._fileDialogService.defaultFilePath();
|
|
27
|
-
}
|
|
28
|
-
return Promise.resolve(this._fileDialogService.showSaveDialog(convertedOptions));
|
|
29
|
-
}
|
|
30
|
-
static _convertOpenOptions(options) {
|
|
31
|
-
const result = {
|
|
32
|
-
openLabel: options?.openLabel || undefined,
|
|
33
|
-
canSelectFiles: options?.canSelectFiles || (!options?.canSelectFiles && !options?.canSelectFolders),
|
|
34
|
-
canSelectFolders: options?.canSelectFolders,
|
|
35
|
-
canSelectMany: options?.canSelectMany,
|
|
36
|
-
defaultUri: options?.defaultUri ? URI.revive(options.defaultUri) : undefined,
|
|
37
|
-
title: options?.title || undefined,
|
|
38
|
-
availableFileSystems: options?.allowUIResources ? [Schemas.vscodeRemote, Schemas.file] : []
|
|
39
|
-
};
|
|
40
|
-
if (options?.filters) {
|
|
41
|
-
result.filters = [];
|
|
42
|
-
for (const [key, value] of Object.entries(options.filters)) {
|
|
43
|
-
result.filters.push({ name: key, extensions: value });
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return result;
|
|
47
|
-
}
|
|
48
|
-
static _convertSaveOptions(options) {
|
|
49
|
-
const result = {
|
|
50
|
-
defaultUri: options?.defaultUri ? URI.revive(options.defaultUri) : undefined,
|
|
51
|
-
saveLabel: options?.saveLabel || undefined,
|
|
52
|
-
title: options?.title || undefined
|
|
53
|
-
};
|
|
54
|
-
if (options?.filters) {
|
|
55
|
-
result.filters = [];
|
|
56
|
-
for (const [key, value] of Object.entries(options.filters)) {
|
|
57
|
-
result.filters.push({ name: key, extensions: value });
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
return result;
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
MainThreadDialogs = MainThreadDialogs_1 = __decorate([
|
|
64
|
-
extHostNamedCustomer(MainContext.MainThreadDialogs),
|
|
65
|
-
( __param(1, IFileDialogService))
|
|
66
|
-
], MainThreadDialogs);
|
|
67
|
-
|
|
68
|
-
export { MainThreadDialogs };
|