@codingame/monaco-vscode-debug-service-override 4.0.0 → 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.
Files changed (60) hide show
  1. package/debug.js +4 -4
  2. package/package.json +2 -2
  3. package/external/rollup-plugin-styles/dist/runtime/inject-css.js +0 -3
  4. package/external/tslib/tslib.es6.js +0 -11
  5. package/override/vs/platform/dialogs/common/dialogs.js +0 -10
  6. package/vscode/src/vs/platform/debug/common/extensionHostDebugIpc.js +0 -73
  7. package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +0 -1026
  8. package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +0 -1004
  9. package/vscode/src/vs/workbench/contrib/debug/browser/debugANSIHandling.js +0 -347
  10. package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +0 -337
  11. package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +0 -432
  12. package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +0 -1039
  13. package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +0 -649
  14. package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +0 -64
  15. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +0 -636
  16. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +0 -740
  17. package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +0 -408
  18. package/vscode/src/vs/workbench/contrib/debug/browser/debugMemory.js +0 -206
  19. package/vscode/src/vs/workbench/contrib/debug/browser/debugProgress.js +0 -80
  20. package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +0 -169
  21. package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +0 -1271
  22. package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +0 -1330
  23. package/vscode/src/vs/workbench/contrib/debug/browser/debugSessionPicker.js +0 -115
  24. package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.js +0 -77
  25. package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +0 -307
  26. package/vscode/src/vs/workbench/contrib/debug/browser/debugTitle.js +0 -31
  27. package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +0 -387
  28. package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +0 -267
  29. package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +0 -817
  30. package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +0 -131
  31. package/vscode/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.js +0 -142
  32. package/vscode/src/vs/workbench/contrib/debug/browser/linkDetector.js +0 -262
  33. package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +0 -669
  34. package/vscode/src/vs/workbench/contrib/debug/browser/media/debug.contribution.css.js +0 -6
  35. package/vscode/src/vs/workbench/contrib/debug/browser/media/debugHover.css.js +0 -6
  36. package/vscode/src/vs/workbench/contrib/debug/browser/media/debugToolBar.css.js +0 -6
  37. package/vscode/src/vs/workbench/contrib/debug/browser/media/debugViewlet.css.js +0 -6
  38. package/vscode/src/vs/workbench/contrib/debug/browser/media/exceptionWidget.css.js +0 -6
  39. package/vscode/src/vs/workbench/contrib/debug/browser/media/repl.css.js +0 -6
  40. package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.js +0 -709
  41. package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +0 -1002
  42. package/vscode/src/vs/workbench/contrib/debug/browser/replFilter.js +0 -48
  43. package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.js +0 -352
  44. package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +0 -129
  45. package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +0 -734
  46. package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +0 -501
  47. package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +0 -162
  48. package/vscode/src/vs/workbench/contrib/debug/common/breakpoints.js +0 -21
  49. package/vscode/src/vs/workbench/contrib/debug/common/debugCompoundRoot.js +0 -17
  50. package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.js +0 -110
  51. package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.js +0 -62
  52. package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +0 -460
  53. package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +0 -166
  54. package/vscode/src/vs/workbench/contrib/debug/common/debugTelemetry.js +0 -36
  55. package/vscode/src/vs/workbench/contrib/debug/common/debugViewModel.js +0 -150
  56. package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +0 -289
  57. package/vscode/src/vs/workbench/contrib/debug/common/loadedScriptsPicker.js +0 -87
  58. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands.js +0 -64
  59. package/vscode/src/vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService.js +0 -311
  60. package/vscode/src/vs/workbench/services/configurationResolver/browser/configurationResolverService.js +0 -29
@@ -1,87 +0,0 @@
1
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
2
- import { matchesFuzzy } from 'vscode/vscode/vs/base/common/filters';
3
- import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput';
4
- import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
5
- import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
6
- import { getIconClasses } from 'vscode/vscode/vs/editor/common/services/getIconClasses';
7
- import { IModelService } from 'vscode/vscode/vs/editor/common/services/model';
8
- import { ILanguageService } from 'vscode/vscode/vs/editor/common/languages/language';
9
- import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
10
- import { dirname } from 'vscode/vscode/vs/base/common/resources';
11
- import { ILabelService } from 'vscode/vscode/vs/platform/label/common/label';
12
-
13
- async function showLoadedScriptMenu(accessor) {
14
- const quickInputService = accessor.get(IQuickInputService);
15
- const debugService = accessor.get(IDebugService);
16
- const editorService = accessor.get(IEditorService);
17
- const sessions = debugService.getModel().getSessions(false);
18
- const modelService = accessor.get(IModelService);
19
- const languageService = accessor.get(ILanguageService);
20
- const labelService = accessor.get(ILabelService);
21
- const localDisposableStore = ( new DisposableStore());
22
- const quickPick = quickInputService.createQuickPick();
23
- localDisposableStore.add(quickPick);
24
- quickPick.matchOnLabel = quickPick.matchOnDescription = quickPick.matchOnDetail = quickPick.sortByLabel = false;
25
- quickPick.placeholder = ( localizeWithPath(
26
- 'vs/workbench/contrib/debug/common/loadedScriptsPicker',
27
- 'moveFocusedView.selectView',
28
- "Search loaded scripts by name"
29
- ));
30
- quickPick.items = await _getPicks(quickPick.value, sessions, editorService, modelService, languageService, labelService);
31
- localDisposableStore.add(quickPick.onDidChangeValue(async () => {
32
- quickPick.items = await _getPicks(quickPick.value, sessions, editorService, modelService, languageService, labelService);
33
- }));
34
- localDisposableStore.add(quickPick.onDidAccept(() => {
35
- const selectedItem = quickPick.selectedItems[0];
36
- selectedItem.accept();
37
- quickPick.hide();
38
- localDisposableStore.dispose();
39
- }));
40
- quickPick.show();
41
- }
42
- async function _getPicksFromSession(session, filter, editorService, modelService, languageService, labelService) {
43
- const items = [];
44
- items.push({ type: 'separator', label: session.name });
45
- const sources = await session.getLoadedSources();
46
- sources.forEach((element) => {
47
- const pick = _createPick(element, filter, editorService, modelService, languageService, labelService);
48
- if (pick) {
49
- items.push(pick);
50
- }
51
- });
52
- return items;
53
- }
54
- async function _getPicks(filter, sessions, editorService, modelService, languageService, labelService) {
55
- const loadedScriptPicks = [];
56
- const picks = await Promise.all(( sessions.map(
57
- (session) => _getPicksFromSession(session, filter, editorService, modelService, languageService, labelService)
58
- )));
59
- for (const row of picks) {
60
- for (const elem of row) {
61
- loadedScriptPicks.push(elem);
62
- }
63
- }
64
- return loadedScriptPicks;
65
- }
66
- function _createPick(source, filter, editorService, modelService, languageService, labelService) {
67
- const label = labelService.getUriBasenameLabel(source.uri);
68
- const desc = labelService.getUriLabel(dirname(source.uri));
69
- const labelHighlights = matchesFuzzy(filter, label, true);
70
- const descHighlights = matchesFuzzy(filter, desc, true);
71
- if (labelHighlights || descHighlights) {
72
- return {
73
- label,
74
- description: desc === '.' ? undefined : desc,
75
- highlights: { label: labelHighlights ?? undefined, description: descHighlights ?? undefined },
76
- iconClasses: getIconClasses(modelService, languageService, source.uri),
77
- accept: () => {
78
- if (source.available) {
79
- source.openInEditor(editorService, { startLineNumber: 0, startColumn: 0, endLineNumber: 0, endColumn: 0 });
80
- }
81
- }
82
- };
83
- }
84
- return undefined;
85
- }
86
-
87
- export { showLoadedScriptMenu };
@@ -1,64 +0,0 @@
1
- import { CancellationToken } from 'vscode/vscode/vs/base/common/cancellation';
2
- import { URI } from 'vscode/vscode/vs/base/common/uri';
3
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
4
- import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
5
- import { IClipboardService } from 'vscode/vscode/vs/platform/clipboard/common/clipboardService';
6
- import { INotebookKernelService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookKernelService';
7
- import { INotebookService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookService';
8
-
9
- const COPY_NOTEBOOK_VARIABLE_VALUE_ID = 'workbench.debug.viewlet.action.copyWorkspaceVariableValue';
10
- const COPY_NOTEBOOK_VARIABLE_VALUE_LABEL = ( localizeWithPath(
11
- 'vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands',
12
- 'copyWorkspaceVariableValue',
13
- "Copy Value"
14
- ));
15
- registerAction2(class extends Action2 {
16
- constructor() {
17
- super({
18
- id: COPY_NOTEBOOK_VARIABLE_VALUE_ID,
19
- title: COPY_NOTEBOOK_VARIABLE_VALUE_LABEL,
20
- f1: false,
21
- });
22
- }
23
- run(accessor, context) {
24
- const clipboardService = accessor.get(IClipboardService);
25
- if (context.value) {
26
- clipboardService.writeText(context.value);
27
- }
28
- }
29
- });
30
- registerAction2(class extends Action2 {
31
- constructor() {
32
- super({
33
- id: '_executeNotebookVariableProvider',
34
- title: ( localizeWithPath(
35
- 'vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands',
36
- 'executeNotebookVariableProvider',
37
- "Execute Notebook Variable Provider"
38
- )),
39
- f1: false,
40
- });
41
- }
42
- async run(accessor, resource) {
43
- if (!resource) {
44
- return [];
45
- }
46
- const uri = URI.revive(resource);
47
- const notebookKernelService = accessor.get(INotebookKernelService);
48
- const notebookService = accessor.get(INotebookService);
49
- const notebookTextModel = notebookService.getNotebookTextModel(uri);
50
- if (!notebookTextModel) {
51
- return [];
52
- }
53
- const selectedKernel = notebookKernelService.getMatchingKernel(notebookTextModel).selected;
54
- if (selectedKernel && selectedKernel.hasVariableProvider) {
55
- const variables = selectedKernel.provideVariables(notebookTextModel.uri, undefined, 'named', 0, CancellationToken.None);
56
- return await ( variables
57
- .map(variable => { return variable; }))
58
- .toPromise();
59
- }
60
- return [];
61
- }
62
- });
63
-
64
- export { COPY_NOTEBOOK_VARIABLE_VALUE_ID, COPY_NOTEBOOK_VARIABLE_VALUE_LABEL };
@@ -1,311 +0,0 @@
1
- import { Queue } from 'vscode/vscode/vs/base/common/async';
2
- import { Schemas } from 'vscode/vscode/vs/base/common/network';
3
- import { isUndefinedOrNull, isString } from 'vscode/vscode/vs/base/common/types';
4
- import { isCodeEditor, isDiffEditor } from 'vscode/vscode/vs/editor/browser/editorBrowser';
5
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
6
- import { EditorResourceAccessor, SideBySideEditor } from 'vscode/vscode/vs/workbench/common/editor';
7
- import { AbstractVariableResolverService } from 'vscode/vscode/vs/workbench/services/configurationResolver/common/variableResolver';
8
-
9
- class BaseConfigurationResolverService extends AbstractVariableResolverService {
10
- static { this.INPUT_OR_COMMAND_VARIABLES_PATTERN = /\${((input|command):(.*?))}/g; }
11
- constructor(context, envVariablesPromise, editorService, configurationService, commandService, workspaceContextService, quickInputService, labelService, pathService, extensionService) {
12
- super({
13
- getFolderUri: (folderName) => {
14
- const folder = workspaceContextService.getWorkspace().folders.filter(f => f.name === folderName).pop();
15
- return folder ? folder.uri : undefined;
16
- },
17
- getWorkspaceFolderCount: () => {
18
- return workspaceContextService.getWorkspace().folders.length;
19
- },
20
- getConfigurationValue: (folderUri, suffix) => {
21
- return configurationService.getValue(suffix, folderUri ? { resource: folderUri } : {});
22
- },
23
- getAppRoot: () => {
24
- return context.getAppRoot();
25
- },
26
- getExecPath: () => {
27
- return context.getExecPath();
28
- },
29
- getFilePath: () => {
30
- const fileResource = EditorResourceAccessor.getOriginalUri(editorService.activeEditor, {
31
- supportSideBySide: SideBySideEditor.PRIMARY,
32
- filterByScheme: [Schemas.file, Schemas.vscodeUserData, this.pathService.defaultUriScheme]
33
- });
34
- if (!fileResource) {
35
- return undefined;
36
- }
37
- return this.labelService.getUriLabel(fileResource, { noPrefix: true });
38
- },
39
- getWorkspaceFolderPathForFile: () => {
40
- const fileResource = EditorResourceAccessor.getOriginalUri(editorService.activeEditor, {
41
- supportSideBySide: SideBySideEditor.PRIMARY,
42
- filterByScheme: [Schemas.file, Schemas.vscodeUserData, this.pathService.defaultUriScheme]
43
- });
44
- if (!fileResource) {
45
- return undefined;
46
- }
47
- const wsFolder = workspaceContextService.getWorkspaceFolder(fileResource);
48
- if (!wsFolder) {
49
- return undefined;
50
- }
51
- return this.labelService.getUriLabel(wsFolder.uri, { noPrefix: true });
52
- },
53
- getSelectedText: () => {
54
- const activeTextEditorControl = editorService.activeTextEditorControl;
55
- let activeControl = null;
56
- if (isCodeEditor(activeTextEditorControl)) {
57
- activeControl = activeTextEditorControl;
58
- }
59
- else if (isDiffEditor(activeTextEditorControl)) {
60
- const original = activeTextEditorControl.getOriginalEditor();
61
- const modified = activeTextEditorControl.getModifiedEditor();
62
- activeControl = original.hasWidgetFocus() ? original : modified;
63
- }
64
- const activeModel = activeControl?.getModel();
65
- const activeSelection = activeControl?.getSelection();
66
- if (activeModel && activeSelection) {
67
- return activeModel.getValueInRange(activeSelection);
68
- }
69
- return undefined;
70
- },
71
- getLineNumber: () => {
72
- const activeTextEditorControl = editorService.activeTextEditorControl;
73
- if (isCodeEditor(activeTextEditorControl)) {
74
- const selection = activeTextEditorControl.getSelection();
75
- if (selection) {
76
- const lineNumber = selection.positionLineNumber;
77
- return String(lineNumber);
78
- }
79
- }
80
- return undefined;
81
- },
82
- getExtension: id => {
83
- return extensionService.getExtension(id);
84
- },
85
- }, labelService, pathService.userHome().then(home => home.path), envVariablesPromise);
86
- this.configurationService = configurationService;
87
- this.commandService = commandService;
88
- this.workspaceContextService = workspaceContextService;
89
- this.quickInputService = quickInputService;
90
- this.labelService = labelService;
91
- this.pathService = pathService;
92
- this.userInputAccessQueue = ( new Queue());
93
- }
94
- async resolveWithInteractionReplace(folder, config, section, variables, target) {
95
- config = await this.resolveAnyAsync(folder, config);
96
- return this.resolveWithInteraction(folder, config, section, variables, target).then(mapping => {
97
- if (!mapping) {
98
- return null;
99
- }
100
- else if (mapping.size > 0) {
101
- return this.resolveAnyAsync(folder, config, Object.fromEntries(mapping));
102
- }
103
- else {
104
- return config;
105
- }
106
- });
107
- }
108
- async resolveWithInteraction(folder, config, section, variables, target) {
109
- const resolved = await this.resolveAnyMap(folder, config);
110
- config = resolved.newConfig;
111
- const allVariableMapping = resolved.resolvedVariables;
112
- return this.resolveWithInputAndCommands(folder, config, variables, section, target).then(inputOrCommandMapping => {
113
- if (this.updateMapping(inputOrCommandMapping, allVariableMapping)) {
114
- return allVariableMapping;
115
- }
116
- return undefined;
117
- });
118
- }
119
- updateMapping(newMapping, fullMapping) {
120
- if (!newMapping) {
121
- return false;
122
- }
123
- for (const [key, value] of Object.entries(newMapping)) {
124
- fullMapping.set(key, value);
125
- }
126
- return true;
127
- }
128
- async resolveWithInputAndCommands(folder, configuration, variableToCommandMap, section, target) {
129
- if (!configuration) {
130
- return Promise.resolve(undefined);
131
- }
132
- let inputs = [];
133
- if (this.workspaceContextService.getWorkbenchState() !== 1 && section) {
134
- const overrides = folder ? { resource: folder.uri } : {};
135
- const result = this.configurationService.inspect(section, overrides);
136
- if (result && (result.userValue || result.workspaceValue || result.workspaceFolderValue)) {
137
- switch (target) {
138
- case 2 :
139
- inputs = result.userValue?.inputs;
140
- break;
141
- case 5 :
142
- inputs = result.workspaceValue?.inputs;
143
- break;
144
- default: inputs = result.workspaceFolderValue?.inputs;
145
- }
146
- }
147
- else {
148
- const valueResult = this.configurationService.getValue(section, overrides);
149
- if (valueResult) {
150
- inputs = valueResult.inputs;
151
- }
152
- }
153
- }
154
- const variables = [];
155
- this.findVariables(configuration, variables);
156
- const variableValues = Object.create(null);
157
- for (const variable of variables) {
158
- const [type, name] = variable.split(':', 2);
159
- let result;
160
- switch (type) {
161
- case 'input':
162
- result = await this.showUserInput(name, inputs);
163
- break;
164
- case 'command': {
165
- const commandId = (variableToCommandMap ? variableToCommandMap[name] : undefined) || name;
166
- result = await this.commandService.executeCommand(commandId, configuration);
167
- if (typeof result !== 'string' && !isUndefinedOrNull(result)) {
168
- throw new Error(localizeWithPath('vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService', 'commandVariable.noStringType', "Cannot substitute command variable '{0}' because command did not return a result of type string.", commandId));
169
- }
170
- break;
171
- }
172
- default:
173
- if (( this._contributedVariables.has(variable))) {
174
- result = await this._contributedVariables.get(variable)();
175
- }
176
- }
177
- if (typeof result === 'string') {
178
- variableValues[variable] = result;
179
- }
180
- else {
181
- return undefined;
182
- }
183
- }
184
- return variableValues;
185
- }
186
- findVariables(object, variables) {
187
- if (typeof object === 'string') {
188
- let matches;
189
- while ((matches = BaseConfigurationResolverService.INPUT_OR_COMMAND_VARIABLES_PATTERN.exec(object)) !== null) {
190
- if (matches.length === 4) {
191
- const command = matches[1];
192
- if (variables.indexOf(command) < 0) {
193
- variables.push(command);
194
- }
195
- }
196
- }
197
- for (const contributed of ( this._contributedVariables.keys())) {
198
- if ((variables.indexOf(contributed) < 0) && (object.indexOf('${' + contributed + '}') >= 0)) {
199
- variables.push(contributed);
200
- }
201
- }
202
- }
203
- else if (Array.isArray(object)) {
204
- for (const value of object) {
205
- this.findVariables(value, variables);
206
- }
207
- }
208
- else if (object) {
209
- for (const value of ( Object.values(object))) {
210
- this.findVariables(value, variables);
211
- }
212
- }
213
- }
214
- showUserInput(variable, inputInfos) {
215
- if (!inputInfos) {
216
- return Promise.reject(( new Error(( localizeWithPath(
217
- 'vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService',
218
- 'inputVariable.noInputSection',
219
- "Variable '{0}' must be defined in an '{1}' section of the debug or task configuration.",
220
- variable,
221
- 'input'
222
- )))));
223
- }
224
- const info = inputInfos.filter(item => item.id === variable).pop();
225
- if (info) {
226
- const missingAttribute = (attrName) => {
227
- throw new Error(localizeWithPath('vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService', 'inputVariable.missingAttribute', "Input variable '{0}' is of type '{1}' and must include '{2}'.", variable, info.type, attrName));
228
- };
229
- switch (info.type) {
230
- case 'promptString': {
231
- if (!isString(info.description)) {
232
- missingAttribute('description');
233
- }
234
- const inputOptions = { prompt: info.description, ignoreFocusLost: true };
235
- if (info.default) {
236
- inputOptions.value = info.default;
237
- }
238
- if (info.password) {
239
- inputOptions.password = info.password;
240
- }
241
- return this.userInputAccessQueue.queue(() => this.quickInputService.input(inputOptions)).then(resolvedInput => {
242
- return resolvedInput;
243
- });
244
- }
245
- case 'pickString': {
246
- if (!isString(info.description)) {
247
- missingAttribute('description');
248
- }
249
- if (Array.isArray(info.options)) {
250
- for (const pickOption of info.options) {
251
- if (!isString(pickOption) && !isString(pickOption.value)) {
252
- missingAttribute('value');
253
- }
254
- }
255
- }
256
- else {
257
- missingAttribute('options');
258
- }
259
- const picks = ( new Array());
260
- for (const pickOption of info.options) {
261
- const value = isString(pickOption) ? pickOption : pickOption.value;
262
- const label = isString(pickOption) ? undefined : pickOption.label;
263
- const item = {
264
- label: label ? `${label}: ${value}` : value,
265
- value: value
266
- };
267
- if (value === info.default) {
268
- item.description = ( localizeWithPath(
269
- 'vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService',
270
- 'inputVariable.defaultInputValue',
271
- "(Default)"
272
- ));
273
- picks.unshift(item);
274
- }
275
- else {
276
- picks.push(item);
277
- }
278
- }
279
- const pickOptions = { placeHolder: info.description, matchOnDetail: true, ignoreFocusLost: true };
280
- return this.userInputAccessQueue.queue(() => this.quickInputService.pick(picks, pickOptions, undefined)).then(resolvedInput => {
281
- if (resolvedInput) {
282
- return resolvedInput.value;
283
- }
284
- return undefined;
285
- });
286
- }
287
- case 'command': {
288
- if (!isString(info.command)) {
289
- missingAttribute('command');
290
- }
291
- return this.userInputAccessQueue.queue(() => this.commandService.executeCommand(info.command, info.args)).then(result => {
292
- if (typeof result === 'string' || isUndefinedOrNull(result)) {
293
- return result;
294
- }
295
- throw new Error(localizeWithPath('vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService', 'inputVariable.command.noStringType', "Cannot substitute input variable '{0}' because command '{1}' did not return a result of type string.", variable, info.command));
296
- });
297
- }
298
- default:
299
- throw new Error(localizeWithPath('vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService', 'inputVariable.unknownType', "Input variable '{0}' can only be of type 'promptString', 'pickString', or 'command'.", variable));
300
- }
301
- }
302
- return Promise.reject(( new Error(( localizeWithPath(
303
- 'vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService',
304
- 'inputVariable.undefinedVariable',
305
- "Undefined input variable '{0}' encountered. Remove or define '{0}' to continue.",
306
- variable
307
- )))));
308
- }
309
- }
310
-
311
- export { BaseConfigurationResolverService };
@@ -1,29 +0,0 @@
1
- import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
- import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands';
3
- import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
4
- import { ILabelService } from 'vscode/vscode/vs/platform/label/common/label';
5
- import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput';
6
- import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace';
7
- import { BaseConfigurationResolverService } from './baseConfigurationResolverService.js';
8
- import 'vscode/vscode/vs/workbench/services/configurationResolver/common/configurationResolver';
9
- import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
10
- import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
11
- import { IPathService } from 'vscode/vscode/vs/workbench/services/path/common/pathService';
12
-
13
- let ConfigurationResolverService = class ConfigurationResolverService extends BaseConfigurationResolverService {
14
- constructor(editorService, configurationService, commandService, workspaceContextService, quickInputService, labelService, pathService, extensionService) {
15
- super({ getAppRoot: () => undefined, getExecPath: () => undefined }, Promise.resolve(Object.create(null)), editorService, configurationService, commandService, workspaceContextService, quickInputService, labelService, pathService, extensionService);
16
- }
17
- };
18
- ConfigurationResolverService = ( __decorate([
19
- ( __param(0, IEditorService)),
20
- ( __param(1, IConfigurationService)),
21
- ( __param(2, ICommandService)),
22
- ( __param(3, IWorkspaceContextService)),
23
- ( __param(4, IQuickInputService)),
24
- ( __param(5, ILabelService)),
25
- ( __param(6, IPathService)),
26
- ( __param(7, IExtensionService))
27
- ], ConfigurationResolverService));
28
-
29
- export { ConfigurationResolverService };