@codingame/monaco-vscode-configuration-service-override 24.3.0 → 25.0.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/package.json +3 -3
- package/vscode/src/vs/workbench/api/common/configurationExtensionPoint.js +104 -54
- package/vscode/src/vs/workbench/contrib/workspaces/browser/workspaces.contribution.js +7 -7
- package/vscode/src/vs/workbench/services/configuration/browser/configurationService.js +2 -2
- package/vscode/src/vs/workbench/services/configuration/common/configurationEditing.js +46 -46
- package/vscode/src/vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService.js +7 -7
- package/vscode/src/vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService.js +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-configuration-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "25.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - configuration service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "
|
|
19
|
-
"@codingame/monaco-vscode-files-service-override": "
|
|
18
|
+
"@codingame/monaco-vscode-api": "25.0.0",
|
|
19
|
+
"@codingame/monaco-vscode-files-service-override": "25.0.0"
|
|
20
20
|
},
|
|
21
21
|
"main": "index.js",
|
|
22
22
|
"module": "index.js",
|
|
@@ -3,7 +3,7 @@ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
|
3
3
|
import { deepClone } from '@codingame/monaco-vscode-api/vscode/vs/base/common/objects';
|
|
4
4
|
import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
|
|
5
5
|
import { ExtensionsRegistry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensionsRegistry';
|
|
6
|
-
import { Extensions as Extensions$1, configurationDefaultsSchemaId, ConfigurationScope, OVERRIDE_PROPERTY_REGEX, validateProperty, EXTENSION_UNIFICATION_EXTENSION_IDS, parseScope, getAllConfigurationProperties, getDefaultValue } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
6
|
+
import { Extensions as Extensions$1, configurationDefaultsSchemaId, ConfigurationScope, OVERRIDE_PROPERTY_REGEX, validateProperty, EXTENSION_UNIFICATION_EXTENSION_IDS, parseScope, getAllConfigurationProperties, getDefaultValue, overrideIdentifiersFromKey } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
7
7
|
import { Extensions } from '@codingame/monaco-vscode-api/vscode/vs/platform/jsonschemas/common/jsonContributionRegistry';
|
|
8
8
|
import { mcpSchemaId, tasksSchemaId, launchSchemaId, workspaceSettingsSchemaId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/configuration/common/configuration';
|
|
9
9
|
import { isObject, isUndefined } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
@@ -22,29 +22,29 @@ const configurationEntrySchema = {
|
|
|
22
22
|
properties: {
|
|
23
23
|
title: {
|
|
24
24
|
description: ( localize(
|
|
25
|
-
|
|
25
|
+
2626,
|
|
26
26
|
'A title for the current category of settings. This label will be rendered in the Settings editor as a subheading. If the title is the same as the extension display name, then the category will be grouped under the main extension heading.'
|
|
27
27
|
)),
|
|
28
28
|
type: 'string'
|
|
29
29
|
},
|
|
30
30
|
order: {
|
|
31
31
|
description: ( localize(
|
|
32
|
-
|
|
32
|
+
2627,
|
|
33
33
|
'When specified, gives the order of this category of settings relative to other categories.'
|
|
34
34
|
)),
|
|
35
35
|
type: 'integer'
|
|
36
36
|
},
|
|
37
37
|
properties: {
|
|
38
|
-
description: ( localize(
|
|
38
|
+
description: ( localize(2628, 'Description of the configuration properties.')),
|
|
39
39
|
type: 'object',
|
|
40
40
|
propertyNames: {
|
|
41
41
|
pattern: '\\S+',
|
|
42
|
-
patternErrorMessage: ( localize(
|
|
42
|
+
patternErrorMessage: ( localize(2629, 'Property should not be empty.')),
|
|
43
43
|
},
|
|
44
44
|
additionalProperties: {
|
|
45
45
|
anyOf: [
|
|
46
46
|
{
|
|
47
|
-
title: ( localize(
|
|
47
|
+
title: ( localize(2630, 'Schema of the configuration property.')),
|
|
48
48
|
$ref: 'http://json-schema.org/draft-07/schema#'
|
|
49
49
|
},
|
|
50
50
|
{
|
|
@@ -55,30 +55,30 @@ const configurationEntrySchema = {
|
|
|
55
55
|
enum: ['application', 'machine', 'window', 'resource', 'language-overridable', 'machine-overridable'],
|
|
56
56
|
default: 'window',
|
|
57
57
|
enumDescriptions: [
|
|
58
|
-
( localize(
|
|
58
|
+
( localize(2631, "Configuration that can be configured only in the user settings.")),
|
|
59
59
|
( localize(
|
|
60
|
-
|
|
60
|
+
2632,
|
|
61
61
|
"Configuration that can be configured only in the user settings or only in the remote settings."
|
|
62
62
|
)),
|
|
63
63
|
( localize(
|
|
64
|
-
|
|
64
|
+
2633,
|
|
65
65
|
"Configuration that can be configured in the user, remote or workspace settings."
|
|
66
66
|
)),
|
|
67
67
|
( localize(
|
|
68
|
-
|
|
68
|
+
2634,
|
|
69
69
|
"Configuration that can be configured in the user, remote, workspace or folder settings."
|
|
70
70
|
)),
|
|
71
71
|
( localize(
|
|
72
|
-
|
|
72
|
+
2635,
|
|
73
73
|
"Resource configuration that can be configured in language specific settings."
|
|
74
74
|
)),
|
|
75
75
|
( localize(
|
|
76
|
-
|
|
76
|
+
2636,
|
|
77
77
|
"Machine configuration that can be configured also in workspace or folder settings."
|
|
78
78
|
))
|
|
79
79
|
],
|
|
80
80
|
markdownDescription: ( localize(
|
|
81
|
-
|
|
81
|
+
2637,
|
|
82
82
|
"Scope in which the configuration is applicable. Available scopes are `application`, `machine`, `window`, `resource`, and `machine-overridable`."
|
|
83
83
|
))
|
|
84
84
|
},
|
|
@@ -87,14 +87,14 @@ const configurationEntrySchema = {
|
|
|
87
87
|
items: {
|
|
88
88
|
type: 'string',
|
|
89
89
|
},
|
|
90
|
-
description: ( localize(
|
|
90
|
+
description: ( localize(2638, 'Descriptions for enum values'))
|
|
91
91
|
},
|
|
92
92
|
markdownEnumDescriptions: {
|
|
93
93
|
type: 'array',
|
|
94
94
|
items: {
|
|
95
95
|
type: 'string',
|
|
96
96
|
},
|
|
97
|
-
description: ( localize(
|
|
97
|
+
description: ( localize(2639, 'Descriptions for enum values in the markdown format.'))
|
|
98
98
|
},
|
|
99
99
|
enumItemLabels: {
|
|
100
100
|
type: 'array',
|
|
@@ -102,26 +102,26 @@ const configurationEntrySchema = {
|
|
|
102
102
|
type: 'string'
|
|
103
103
|
},
|
|
104
104
|
markdownDescription: ( localize(
|
|
105
|
-
|
|
105
|
+
2640,
|
|
106
106
|
'Labels for enum values to be displayed in the Settings editor. When specified, the {0} values still show after the labels, but less prominently.',
|
|
107
107
|
'`enum`'
|
|
108
108
|
))
|
|
109
109
|
},
|
|
110
110
|
markdownDescription: {
|
|
111
111
|
type: 'string',
|
|
112
|
-
description: ( localize(
|
|
112
|
+
description: ( localize(2641, 'The description in the markdown format.'))
|
|
113
113
|
},
|
|
114
114
|
deprecationMessage: {
|
|
115
115
|
type: 'string',
|
|
116
116
|
description: ( localize(
|
|
117
|
-
|
|
117
|
+
2642,
|
|
118
118
|
'If set, the property is marked as deprecated and the given message is shown as an explanation.'
|
|
119
119
|
))
|
|
120
120
|
},
|
|
121
121
|
markdownDeprecationMessage: {
|
|
122
122
|
type: 'string',
|
|
123
123
|
description: ( localize(
|
|
124
|
-
|
|
124
|
+
2643,
|
|
125
125
|
'If set, the property is marked as deprecated and the given message is shown as an explanation in the markdown format.'
|
|
126
126
|
))
|
|
127
127
|
},
|
|
@@ -129,26 +129,26 @@ const configurationEntrySchema = {
|
|
|
129
129
|
type: 'string',
|
|
130
130
|
enum: ['singlelineText', 'multilineText'],
|
|
131
131
|
enumDescriptions: [
|
|
132
|
-
( localize(
|
|
133
|
-
( localize(
|
|
132
|
+
( localize(2644, 'The value will be shown in an inputbox.')),
|
|
133
|
+
( localize(2645, 'The value will be shown in a textarea.'))
|
|
134
134
|
],
|
|
135
135
|
default: 'singlelineText',
|
|
136
136
|
description: ( localize(
|
|
137
|
-
|
|
137
|
+
2646,
|
|
138
138
|
'When specified, controls the presentation format of the string setting.'
|
|
139
139
|
))
|
|
140
140
|
},
|
|
141
141
|
order: {
|
|
142
142
|
type: 'integer',
|
|
143
143
|
description: ( localize(
|
|
144
|
-
|
|
144
|
+
2647,
|
|
145
145
|
'When specified, gives the order of this setting relative to other settings within the same category. Settings with an order property will be placed before settings without this property set.'
|
|
146
146
|
))
|
|
147
147
|
},
|
|
148
148
|
ignoreSync: {
|
|
149
149
|
type: 'boolean',
|
|
150
150
|
description: ( localize(
|
|
151
|
-
|
|
151
|
+
2648,
|
|
152
152
|
'When enabled, Settings Sync will not sync the user value of this configuration by default.'
|
|
153
153
|
))
|
|
154
154
|
},
|
|
@@ -164,26 +164,26 @@ const configurationEntrySchema = {
|
|
|
164
164
|
'usesOnlineServices',
|
|
165
165
|
],
|
|
166
166
|
enumDescriptions: [
|
|
167
|
-
( localize(
|
|
167
|
+
( localize(2649, 'Accessibility settings')),
|
|
168
168
|
( localize(
|
|
169
|
-
|
|
169
|
+
2650,
|
|
170
170
|
'Advanced settings are hidden by default in the Settings editor unless the user chooses to show advanced settings.'
|
|
171
171
|
)),
|
|
172
172
|
( localize(
|
|
173
|
-
|
|
173
|
+
2651,
|
|
174
174
|
'Experimental settings are subject to change and may be removed in future releases.'
|
|
175
175
|
)),
|
|
176
176
|
( localize(
|
|
177
|
-
|
|
177
|
+
2652,
|
|
178
178
|
'Preview settings can be used to try out new features before they are finalized.'
|
|
179
179
|
)),
|
|
180
|
-
( localize(
|
|
181
|
-
( localize(
|
|
180
|
+
( localize(2653, 'Telemetry settings')),
|
|
181
|
+
( localize(2654, 'Settings that use online services'))
|
|
182
182
|
],
|
|
183
183
|
},
|
|
184
184
|
additionalItems: true,
|
|
185
185
|
markdownDescription: ( localize(
|
|
186
|
-
|
|
186
|
+
2655,
|
|
187
187
|
'A list of tags under which to place the setting. The tag can then be searched up in the Settings editor. For example, specifying the `experimental` tag allows one to find the setting by searching `@tag:experimental`.'
|
|
188
188
|
)),
|
|
189
189
|
}
|
|
@@ -228,7 +228,7 @@ defaultConfigurationExtPoint.setHandler((extensions, { added, removed }) => {
|
|
|
228
228
|
const registeredPropertyScheme = registeredProperties[key];
|
|
229
229
|
if (registeredPropertyScheme?.disallowConfigurationDefault) {
|
|
230
230
|
extension.collector.warn(( localize(
|
|
231
|
-
|
|
231
|
+
2656,
|
|
232
232
|
"Cannot register configuration defaults for '{0}'. This setting does not allow contributing configuration defaults.",
|
|
233
233
|
key
|
|
234
234
|
)));
|
|
@@ -238,7 +238,7 @@ defaultConfigurationExtPoint.setHandler((extensions, { added, removed }) => {
|
|
|
238
238
|
if (!OVERRIDE_PROPERTY_REGEX.test(key)) {
|
|
239
239
|
if (registeredPropertyScheme?.scope && !allowedScopes.includes(registeredPropertyScheme.scope)) {
|
|
240
240
|
extension.collector.warn(( localize(
|
|
241
|
-
|
|
241
|
+
2657,
|
|
242
242
|
"Cannot register configuration defaults for '{0}'. Only defaults for machine-overridable, window, resource and language overridable scoped settings are supported.",
|
|
243
243
|
key
|
|
244
244
|
)));
|
|
@@ -256,7 +256,7 @@ const configurationExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
|
256
256
|
extensionPoint: 'configuration',
|
|
257
257
|
deps: [defaultConfigurationExtPoint],
|
|
258
258
|
jsonSchema: {
|
|
259
|
-
description: ( localize(
|
|
259
|
+
description: ( localize(2658, 'Contributes configuration settings.')),
|
|
260
260
|
oneOf: [
|
|
261
261
|
configurationEntrySchema,
|
|
262
262
|
{
|
|
@@ -282,7 +282,7 @@ configurationExtPoint.setHandler((extensions, { added, removed }) => {
|
|
|
282
282
|
function handleConfiguration(node, extension) {
|
|
283
283
|
const configuration = deepClone(node);
|
|
284
284
|
if (configuration.title && (typeof configuration.title !== 'string')) {
|
|
285
|
-
extension.collector.error(( localize(
|
|
285
|
+
extension.collector.error(( localize(2659, "'configuration.title' must be a string")));
|
|
286
286
|
}
|
|
287
287
|
validateProperties(configuration, extension);
|
|
288
288
|
configuration.id = node.id || extension.description.identifier.value;
|
|
@@ -296,7 +296,7 @@ configurationExtPoint.setHandler((extensions, { added, removed }) => {
|
|
|
296
296
|
const extensionConfigurationPolicy = product.extensionConfigurationPolicy;
|
|
297
297
|
if (properties) {
|
|
298
298
|
if (typeof properties !== 'object') {
|
|
299
|
-
extension.collector.error(( localize(
|
|
299
|
+
extension.collector.error(( localize(2660, "'configuration.properties' must be an object")));
|
|
300
300
|
configuration.properties = {};
|
|
301
301
|
}
|
|
302
302
|
for (const key in properties) {
|
|
@@ -309,12 +309,12 @@ configurationExtPoint.setHandler((extensions, { added, removed }) => {
|
|
|
309
309
|
}
|
|
310
310
|
if (( seenProperties.has(key)) && !( EXTENSION_UNIFICATION_EXTENSION_IDS.has(extension.description.identifier.value.toLowerCase()))) {
|
|
311
311
|
delete properties[key];
|
|
312
|
-
extension.collector.warn(( localize(
|
|
312
|
+
extension.collector.warn(( localize(2661, "Cannot register '{0}'. This property is already registered.", key)));
|
|
313
313
|
continue;
|
|
314
314
|
}
|
|
315
315
|
if (!isObject(propertyConfiguration)) {
|
|
316
316
|
delete properties[key];
|
|
317
|
-
extension.collector.error(( localize(
|
|
317
|
+
extension.collector.error(( localize(2662, "configuration.properties property '{0}' must be an object", key)));
|
|
318
318
|
continue;
|
|
319
319
|
}
|
|
320
320
|
if (extensionConfigurationPolicy?.[key]) {
|
|
@@ -332,7 +332,7 @@ configurationExtPoint.setHandler((extensions, { added, removed }) => {
|
|
|
332
332
|
const subNodes = configuration.allOf;
|
|
333
333
|
if (subNodes) {
|
|
334
334
|
extension.collector.error(( localize(
|
|
335
|
-
|
|
335
|
+
2663,
|
|
336
336
|
"'configuration.allOf' is deprecated and should no longer be used. Instead, pass multiple configuration sections as an array to the 'configuration' contribution point."
|
|
337
337
|
)));
|
|
338
338
|
for (const node of subNodes) {
|
|
@@ -375,7 +375,7 @@ jsonRegistry.registerSchema('vscode://schemas/workspaceConfig', {
|
|
|
375
375
|
'folders': {
|
|
376
376
|
minItems: 0,
|
|
377
377
|
uniqueItems: true,
|
|
378
|
-
description: ( localize(
|
|
378
|
+
description: ( localize(2664, "List of folders to be loaded in the workspace.")),
|
|
379
379
|
items: {
|
|
380
380
|
type: 'object',
|
|
381
381
|
defaultSnippets: [{ body: { path: '$1' } }],
|
|
@@ -384,13 +384,13 @@ jsonRegistry.registerSchema('vscode://schemas/workspaceConfig', {
|
|
|
384
384
|
path: {
|
|
385
385
|
type: 'string',
|
|
386
386
|
description: ( localize(
|
|
387
|
-
|
|
387
|
+
2665,
|
|
388
388
|
"A file path. e.g. `/root/folderA` or `./folderA` for a relative path that will be resolved against the location of the workspace file."
|
|
389
389
|
))
|
|
390
390
|
},
|
|
391
391
|
name: {
|
|
392
392
|
type: 'string',
|
|
393
|
-
description: ( localize(
|
|
393
|
+
description: ( localize(2666, "An optional name for the folder. "))
|
|
394
394
|
}
|
|
395
395
|
},
|
|
396
396
|
required: ['path']
|
|
@@ -398,11 +398,11 @@ jsonRegistry.registerSchema('vscode://schemas/workspaceConfig', {
|
|
|
398
398
|
properties: {
|
|
399
399
|
uri: {
|
|
400
400
|
type: 'string',
|
|
401
|
-
description: ( localize(
|
|
401
|
+
description: ( localize(2667, "URI of the folder"))
|
|
402
402
|
},
|
|
403
403
|
name: {
|
|
404
404
|
type: 'string',
|
|
405
|
-
description: ( localize(
|
|
405
|
+
description: ( localize(2666, "An optional name for the folder. "))
|
|
406
406
|
}
|
|
407
407
|
},
|
|
408
408
|
required: ['uri']
|
|
@@ -412,19 +412,19 @@ jsonRegistry.registerSchema('vscode://schemas/workspaceConfig', {
|
|
|
412
412
|
'settings': {
|
|
413
413
|
type: 'object',
|
|
414
414
|
default: {},
|
|
415
|
-
description: ( localize(
|
|
415
|
+
description: ( localize(2668, "Workspace settings")),
|
|
416
416
|
$ref: workspaceSettingsSchemaId
|
|
417
417
|
},
|
|
418
418
|
'launch': {
|
|
419
419
|
type: 'object',
|
|
420
420
|
default: { configurations: [], compounds: [] },
|
|
421
|
-
description: ( localize(
|
|
421
|
+
description: ( localize(2669, "Workspace launch configurations")),
|
|
422
422
|
$ref: launchSchemaId
|
|
423
423
|
},
|
|
424
424
|
'tasks': {
|
|
425
425
|
type: 'object',
|
|
426
426
|
default: { version: '2.0.0', tasks: [] },
|
|
427
|
-
description: ( localize(
|
|
427
|
+
description: ( localize(2670, "Workspace task configurations")),
|
|
428
428
|
$ref: tasksSchemaId
|
|
429
429
|
},
|
|
430
430
|
'mcp': {
|
|
@@ -438,27 +438,27 @@ jsonRegistry.registerSchema('vscode://schemas/workspaceConfig', {
|
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
440
|
},
|
|
441
|
-
description: ( localize(
|
|
441
|
+
description: ( localize(2671, "Model Context Protocol server configurations")),
|
|
442
442
|
$ref: mcpSchemaId
|
|
443
443
|
},
|
|
444
444
|
'extensions': {
|
|
445
445
|
type: 'object',
|
|
446
446
|
default: {},
|
|
447
|
-
description: ( localize(
|
|
447
|
+
description: ( localize(2672, "Workspace extensions")),
|
|
448
448
|
$ref: 'vscode://schemas/extensions'
|
|
449
449
|
},
|
|
450
450
|
'remoteAuthority': {
|
|
451
451
|
type: 'string',
|
|
452
452
|
doNotSuggest: true,
|
|
453
|
-
description: ( localize(
|
|
453
|
+
description: ( localize(2673, "The remote server where the workspace is located.")),
|
|
454
454
|
},
|
|
455
455
|
'transient': {
|
|
456
456
|
type: 'boolean',
|
|
457
457
|
doNotSuggest: true,
|
|
458
|
-
description: ( localize(
|
|
458
|
+
description: ( localize(2674, "A transient workspace will disappear when restarting or reloading.")),
|
|
459
459
|
}
|
|
460
460
|
},
|
|
461
|
-
errorMessage: ( localize(
|
|
461
|
+
errorMessage: ( localize(2675, "Unknown workspace configuration property"))
|
|
462
462
|
});
|
|
463
463
|
class SettingsTableRenderer extends Disposable {
|
|
464
464
|
constructor() {
|
|
@@ -474,7 +474,7 @@ class SettingsTableRenderer extends Disposable {
|
|
|
474
474
|
: [];
|
|
475
475
|
const properties = getAllConfigurationProperties(configuration);
|
|
476
476
|
const contrib = properties ? ( Object.keys(properties)) : [];
|
|
477
|
-
const headers = [( localize(
|
|
477
|
+
const headers = [( localize(2676, "ID")), ( localize(2677, "Description")), ( localize(2678, "Default"))];
|
|
478
478
|
const rows = ( contrib.sort((a, b) => a.localeCompare(b))
|
|
479
479
|
.map(key => {
|
|
480
480
|
return [
|
|
@@ -494,9 +494,59 @@ class SettingsTableRenderer extends Disposable {
|
|
|
494
494
|
}
|
|
495
495
|
( Registry.as(Extensions$2.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
496
496
|
id: 'configuration',
|
|
497
|
-
label: ( localize(
|
|
497
|
+
label: ( localize(2679, "Settings")),
|
|
498
498
|
access: {
|
|
499
499
|
canToggle: false
|
|
500
500
|
},
|
|
501
501
|
renderer: ( new SyncDescriptor(SettingsTableRenderer)),
|
|
502
502
|
});
|
|
503
|
+
class ConfigurationDefaultsTableRenderer extends Disposable {
|
|
504
|
+
constructor() {
|
|
505
|
+
super(...arguments);
|
|
506
|
+
this.type = 'table';
|
|
507
|
+
}
|
|
508
|
+
shouldRender(manifest) {
|
|
509
|
+
return !!manifest.contributes?.configurationDefaults;
|
|
510
|
+
}
|
|
511
|
+
render(manifest) {
|
|
512
|
+
const configurationDefaults = manifest.contributes?.configurationDefaults ?? {};
|
|
513
|
+
const headers = [( localize(2680, "Languages")), ( localize(2681, "Setting")), ( localize(2682, "Override Value"))];
|
|
514
|
+
const rows = [];
|
|
515
|
+
for (const key of ( Object.keys(configurationDefaults)).sort((a, b) => a.localeCompare(b))) {
|
|
516
|
+
const value = configurationDefaults[key];
|
|
517
|
+
if (OVERRIDE_PROPERTY_REGEX.test(key)) {
|
|
518
|
+
const languages = overrideIdentifiersFromKey(key);
|
|
519
|
+
const languageMarkdown = ( new MarkdownString()).appendMarkdown(`${languages.join(', ')}`);
|
|
520
|
+
for (const key of ( Object.keys(value)).sort((a, b) => a.localeCompare(b))) {
|
|
521
|
+
const row = [];
|
|
522
|
+
row.push(languageMarkdown);
|
|
523
|
+
row.push(( new MarkdownString()).appendMarkdown(`\`${key}\``));
|
|
524
|
+
row.push(( new MarkdownString()).appendCodeblock('json', JSON.stringify(value[key], null, 2)));
|
|
525
|
+
rows.push(row);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
else {
|
|
529
|
+
const row = [];
|
|
530
|
+
row.push('');
|
|
531
|
+
row.push(( new MarkdownString()).appendMarkdown(`\`${key}\``));
|
|
532
|
+
row.push(( new MarkdownString()).appendCodeblock('json', JSON.stringify(value, null, 2)));
|
|
533
|
+
rows.push(row);
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
return {
|
|
537
|
+
data: {
|
|
538
|
+
headers,
|
|
539
|
+
rows
|
|
540
|
+
},
|
|
541
|
+
dispose: () => { }
|
|
542
|
+
};
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
( Registry.as(Extensions$2.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
546
|
+
id: 'configurationDefaults',
|
|
547
|
+
label: ( localize(2683, "Settings Default Overrides")),
|
|
548
|
+
access: {
|
|
549
|
+
canToggle: false
|
|
550
|
+
},
|
|
551
|
+
renderer: ( new SyncDescriptor(ConfigurationDefaultsTableRenderer)),
|
|
552
|
+
});
|
|
@@ -51,12 +51,12 @@ let WorkspacesFinderContribution = class WorkspacesFinderContribution extends Di
|
|
|
51
51
|
if (workspaces.length === 1) {
|
|
52
52
|
const workspaceFile = workspaces[0];
|
|
53
53
|
this.notificationService.prompt(Severity.Info, ( localize(
|
|
54
|
-
|
|
54
|
+
13578,
|
|
55
55
|
"This folder contains a workspace file '{0}'. Do you want to open it? [Learn more]({1}) about workspace files.",
|
|
56
56
|
workspaceFile,
|
|
57
57
|
'https://go.microsoft.com/fwlink/?linkid=2025315'
|
|
58
58
|
)), [{
|
|
59
|
-
label: ( localize(
|
|
59
|
+
label: ( localize(13579, "Open Workspace")),
|
|
60
60
|
run: () => this.hostService.openWindow([{ workspaceUri: joinPath(folder, workspaceFile) }])
|
|
61
61
|
}], {
|
|
62
62
|
neverShowAgain,
|
|
@@ -65,13 +65,13 @@ let WorkspacesFinderContribution = class WorkspacesFinderContribution extends Di
|
|
|
65
65
|
}
|
|
66
66
|
else if (workspaces.length > 1) {
|
|
67
67
|
this.notificationService.prompt(Severity.Info, ( localize(
|
|
68
|
-
|
|
68
|
+
13580,
|
|
69
69
|
"This folder contains multiple workspace files. Do you want to open one? [Learn more]({0}) about workspace files.",
|
|
70
70
|
'https://go.microsoft.com/fwlink/?linkid=2025315'
|
|
71
71
|
)), [{
|
|
72
|
-
label: ( localize(
|
|
72
|
+
label: ( localize(13581, "Select Workspace")),
|
|
73
73
|
run: () => {
|
|
74
|
-
this.quickInputService.pick(( workspaces.map(workspace => ({ label: workspace }))), { placeHolder: ( localize(
|
|
74
|
+
this.quickInputService.pick(( workspaces.map(workspace => ({ label: workspace }))), { placeHolder: ( localize(13582, "Select a workspace to open")) }).then(pick => {
|
|
75
75
|
if (pick) {
|
|
76
76
|
this.hostService.openWindow([{ workspaceUri: joinPath(folder, pick.label) }]);
|
|
77
77
|
}
|
|
@@ -97,7 +97,7 @@ registerAction2(class extends Action2 {
|
|
|
97
97
|
constructor() {
|
|
98
98
|
super({
|
|
99
99
|
id: 'workbench.action.openWorkspaceFromEditor',
|
|
100
|
-
title: ( localize2(
|
|
100
|
+
title: ( localize2(13579, "Open Workspace")),
|
|
101
101
|
f1: false,
|
|
102
102
|
menu: {
|
|
103
103
|
id: MenuId.EditorContent,
|
|
@@ -112,7 +112,7 @@ registerAction2(class extends Action2 {
|
|
|
112
112
|
if (contextService.getWorkbenchState() === WorkbenchState.WORKSPACE) {
|
|
113
113
|
const workspaceConfiguration = contextService.getWorkspace().configuration;
|
|
114
114
|
if (workspaceConfiguration && isEqual(workspaceConfiguration, uri)) {
|
|
115
|
-
notificationService.info(( localize(
|
|
115
|
+
notificationService.info(( localize(13583, "This workspace is already open.")));
|
|
116
116
|
return;
|
|
117
117
|
}
|
|
118
118
|
}
|
|
@@ -1096,7 +1096,7 @@ let RegisterConfigurationSchemasContribution = class RegisterConfigurationSchema
|
|
|
1096
1096
|
} : workspaceSettingsSchema;
|
|
1097
1097
|
const configDefaultsSchema = {
|
|
1098
1098
|
type: 'object',
|
|
1099
|
-
description: ( localize(
|
|
1099
|
+
description: ( localize(13755, 'Contribute defaults for configurations')),
|
|
1100
1100
|
properties: Object.assign({}, this.filterDefaultOverridableProperties(machineOverridableSettings.properties), this.filterDefaultOverridableProperties(windowSettings.properties), this.filterDefaultOverridableProperties(resourceSettings.properties)),
|
|
1101
1101
|
patternProperties: {
|
|
1102
1102
|
[OVERRIDE_PROPERTY_PATTERN]: {
|
|
@@ -1226,7 +1226,7 @@ configurationRegistry.registerConfiguration({
|
|
|
1226
1226
|
properties: {
|
|
1227
1227
|
[APPLY_ALL_PROFILES_SETTING]: {
|
|
1228
1228
|
'type': 'array',
|
|
1229
|
-
description: ( localize(
|
|
1229
|
+
description: ( localize(13756, "Configure settings to be applied for all profiles.")),
|
|
1230
1230
|
'default': [],
|
|
1231
1231
|
'scope': ConfigurationScope.APPLICATION,
|
|
1232
1232
|
additionalProperties: true,
|
|
@@ -138,7 +138,7 @@ let ConfigurationEditing = class ConfigurationEditing {
|
|
|
138
138
|
throw this.toConfigurationEditingError(ConfigurationEditingErrorCode.ERROR_CONFIGURATION_FILE_MODIFIED_SINCE, operation.target, operation);
|
|
139
139
|
}
|
|
140
140
|
throw ( new ConfigurationEditingError(( localize(
|
|
141
|
-
|
|
141
|
+
13757,
|
|
142
142
|
"Error while writing to {0}. {1}",
|
|
143
143
|
this.stringifyTarget(operation.target),
|
|
144
144
|
error.message
|
|
@@ -198,9 +198,9 @@ let ConfigurationEditing = class ConfigurationEditing {
|
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
onInvalidConfigurationError(error, operation) {
|
|
201
|
-
const openStandAloneConfigurationActionLabel = operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY ? ( localize(
|
|
202
|
-
: operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY ? ( localize(
|
|
203
|
-
: operation.workspaceStandAloneConfigurationKey === MCP_CONFIGURATION_KEY ? ( localize(
|
|
201
|
+
const openStandAloneConfigurationActionLabel = operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY ? ( localize(13758, "Open Tasks Configuration"))
|
|
202
|
+
: operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY ? ( localize(13759, "Open Launch Configuration"))
|
|
203
|
+
: operation.workspaceStandAloneConfigurationKey === MCP_CONFIGURATION_KEY ? ( localize(13760, "Open MCP Configuration"))
|
|
204
204
|
: null;
|
|
205
205
|
if (openStandAloneConfigurationActionLabel) {
|
|
206
206
|
this.notificationService.prompt(Severity.Error, error.message, [{
|
|
@@ -210,18 +210,18 @@ let ConfigurationEditing = class ConfigurationEditing {
|
|
|
210
210
|
}
|
|
211
211
|
else {
|
|
212
212
|
this.notificationService.prompt(Severity.Error, error.message, [{
|
|
213
|
-
label: ( localize(
|
|
213
|
+
label: ( localize(13761, "Open Settings")),
|
|
214
214
|
run: () => this.openSettings(operation)
|
|
215
215
|
}]);
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
218
|
onConfigurationFileDirtyError(error, operation, scopes) {
|
|
219
|
-
const openStandAloneConfigurationActionLabel = operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY ? ( localize(
|
|
220
|
-
: operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY ? ( localize(
|
|
219
|
+
const openStandAloneConfigurationActionLabel = operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY ? ( localize(13758, "Open Tasks Configuration"))
|
|
220
|
+
: operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY ? ( localize(13759, "Open Launch Configuration"))
|
|
221
221
|
: null;
|
|
222
222
|
if (openStandAloneConfigurationActionLabel) {
|
|
223
223
|
this.notificationService.prompt(Severity.Error, error.message, [{
|
|
224
|
-
label: ( localize(
|
|
224
|
+
label: ( localize(13762, "Save and Retry")),
|
|
225
225
|
run: () => {
|
|
226
226
|
const key = operation.key ? `${operation.workspaceStandAloneConfigurationKey}.${operation.key}` : operation.workspaceStandAloneConfigurationKey;
|
|
227
227
|
this.writeConfiguration(operation.target, { key, value: operation.value }, { handleDirtyFile: 'save', scopes });
|
|
@@ -234,11 +234,11 @@ let ConfigurationEditing = class ConfigurationEditing {
|
|
|
234
234
|
}
|
|
235
235
|
else {
|
|
236
236
|
this.notificationService.prompt(Severity.Error, error.message, [{
|
|
237
|
-
label: ( localize(
|
|
237
|
+
label: ( localize(13762, "Save and Retry")),
|
|
238
238
|
run: () => this.writeConfiguration(operation.target, { key: operation.key, value: operation.value }, { handleDirtyFile: 'save', scopes })
|
|
239
239
|
},
|
|
240
240
|
{
|
|
241
|
-
label: ( localize(
|
|
241
|
+
label: ( localize(13761, "Open Settings")),
|
|
242
242
|
run: () => this.openSettings(operation)
|
|
243
243
|
}]);
|
|
244
244
|
}
|
|
@@ -275,88 +275,88 @@ let ConfigurationEditing = class ConfigurationEditing {
|
|
|
275
275
|
toErrorMessage(error, target, operation) {
|
|
276
276
|
switch (error) {
|
|
277
277
|
case ConfigurationEditingErrorCode.ERROR_POLICY_CONFIGURATION: return localize(
|
|
278
|
-
|
|
278
|
+
13763,
|
|
279
279
|
"Unable to write {0} because it is configured in system policy.",
|
|
280
280
|
operation.key
|
|
281
281
|
);
|
|
282
282
|
case ConfigurationEditingErrorCode.ERROR_UNKNOWN_KEY: return localize(
|
|
283
|
-
|
|
283
|
+
13764,
|
|
284
284
|
"Unable to write to {0} because {1} is not a registered configuration.",
|
|
285
285
|
this.stringifyTarget(target),
|
|
286
286
|
operation.key
|
|
287
287
|
);
|
|
288
288
|
case ConfigurationEditingErrorCode.ERROR_INVALID_WORKSPACE_CONFIGURATION_APPLICATION: return localize(
|
|
289
|
-
|
|
289
|
+
13765,
|
|
290
290
|
"Unable to write {0} to Workspace Settings. This setting can be written only into User settings.",
|
|
291
291
|
operation.key
|
|
292
292
|
);
|
|
293
293
|
case ConfigurationEditingErrorCode.ERROR_INVALID_WORKSPACE_CONFIGURATION_MACHINE: return localize(
|
|
294
|
-
|
|
294
|
+
13766,
|
|
295
295
|
"Unable to write {0} to Workspace Settings. This setting can be written only into User settings.",
|
|
296
296
|
operation.key
|
|
297
297
|
);
|
|
298
298
|
case ConfigurationEditingErrorCode.ERROR_INVALID_FOLDER_CONFIGURATION: return localize(
|
|
299
|
-
|
|
299
|
+
13767,
|
|
300
300
|
"Unable to write to Folder Settings because {0} does not support the folder resource scope.",
|
|
301
301
|
operation.key
|
|
302
302
|
);
|
|
303
303
|
case ConfigurationEditingErrorCode.ERROR_INVALID_USER_TARGET: return localize(
|
|
304
|
-
|
|
304
|
+
13768,
|
|
305
305
|
"Unable to write to User Settings because {0} does not support for global scope.",
|
|
306
306
|
operation.key
|
|
307
307
|
);
|
|
308
308
|
case ConfigurationEditingErrorCode.ERROR_INVALID_WORKSPACE_TARGET: return localize(
|
|
309
|
-
|
|
309
|
+
13769,
|
|
310
310
|
"Unable to write to Workspace Settings because {0} does not support for workspace scope in a multi folder workspace.",
|
|
311
311
|
operation.key
|
|
312
312
|
);
|
|
313
313
|
case ConfigurationEditingErrorCode.ERROR_INVALID_FOLDER_TARGET: return localize(
|
|
314
|
-
|
|
314
|
+
13770,
|
|
315
315
|
"Unable to write to Folder Settings because no resource is provided."
|
|
316
316
|
);
|
|
317
317
|
case ConfigurationEditingErrorCode.ERROR_INVALID_RESOURCE_LANGUAGE_CONFIGURATION: return localize(
|
|
318
|
-
|
|
318
|
+
13771,
|
|
319
319
|
"Unable to write to Language Settings because {0} is not a resource language setting.",
|
|
320
320
|
operation.key
|
|
321
321
|
);
|
|
322
322
|
case ConfigurationEditingErrorCode.ERROR_NO_WORKSPACE_OPENED: return localize(
|
|
323
|
-
|
|
323
|
+
13772,
|
|
324
324
|
"Unable to write to {0} because no workspace is opened. Please open a workspace first and try again.",
|
|
325
325
|
this.stringifyTarget(target)
|
|
326
326
|
);
|
|
327
327
|
case ConfigurationEditingErrorCode.ERROR_INVALID_CONFIGURATION: {
|
|
328
328
|
if (operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY) {
|
|
329
329
|
return localize(
|
|
330
|
-
|
|
330
|
+
13773,
|
|
331
331
|
"Unable to write into the tasks configuration file. Please open it to correct errors/warnings in it and try again."
|
|
332
332
|
);
|
|
333
333
|
}
|
|
334
334
|
if (operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY) {
|
|
335
335
|
return localize(
|
|
336
|
-
|
|
336
|
+
13774,
|
|
337
337
|
"Unable to write into the launch configuration file. Please open it to correct errors/warnings in it and try again."
|
|
338
338
|
);
|
|
339
339
|
}
|
|
340
340
|
if (operation.workspaceStandAloneConfigurationKey === MCP_CONFIGURATION_KEY) {
|
|
341
341
|
return localize(
|
|
342
|
-
|
|
342
|
+
13775,
|
|
343
343
|
"Unable to write into the MCP configuration file. Please open it to correct errors/warnings in it and try again."
|
|
344
344
|
);
|
|
345
345
|
}
|
|
346
346
|
switch (target) {
|
|
347
347
|
case EditableConfigurationTarget.USER_LOCAL:
|
|
348
348
|
return localize(
|
|
349
|
-
|
|
349
|
+
13776,
|
|
350
350
|
"Unable to write into user settings. Please open the user settings to correct errors/warnings in it and try again."
|
|
351
351
|
);
|
|
352
352
|
case EditableConfigurationTarget.USER_REMOTE:
|
|
353
353
|
return localize(
|
|
354
|
-
|
|
354
|
+
13777,
|
|
355
355
|
"Unable to write into remote user settings. Please open the remote user settings to correct errors/warnings in it and try again."
|
|
356
356
|
);
|
|
357
357
|
case EditableConfigurationTarget.WORKSPACE:
|
|
358
358
|
return localize(
|
|
359
|
-
|
|
359
|
+
13778,
|
|
360
360
|
"Unable to write into workspace settings. Please open the workspace settings to correct errors/warnings in the file and try again."
|
|
361
361
|
);
|
|
362
362
|
case EditableConfigurationTarget.WORKSPACE_FOLDER: {
|
|
@@ -368,7 +368,7 @@ let ConfigurationEditing = class ConfigurationEditing {
|
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
370
|
return localize(
|
|
371
|
-
|
|
371
|
+
13779,
|
|
372
372
|
"Unable to write into folder settings. Please open the '{0}' folder settings to correct errors/warnings in it and try again.",
|
|
373
373
|
workspaceFolderName
|
|
374
374
|
);
|
|
@@ -380,36 +380,36 @@ let ConfigurationEditing = class ConfigurationEditing {
|
|
|
380
380
|
case ConfigurationEditingErrorCode.ERROR_CONFIGURATION_FILE_DIRTY: {
|
|
381
381
|
if (operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY) {
|
|
382
382
|
return localize(
|
|
383
|
-
|
|
383
|
+
13780,
|
|
384
384
|
"Unable to write into tasks configuration file because the file has unsaved changes. Please save it first and then try again."
|
|
385
385
|
);
|
|
386
386
|
}
|
|
387
387
|
if (operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY) {
|
|
388
388
|
return localize(
|
|
389
|
-
|
|
389
|
+
13781,
|
|
390
390
|
"Unable to write into launch configuration file because the file has unsaved changes. Please save it first and then try again."
|
|
391
391
|
);
|
|
392
392
|
}
|
|
393
393
|
if (operation.workspaceStandAloneConfigurationKey === MCP_CONFIGURATION_KEY) {
|
|
394
394
|
return localize(
|
|
395
|
-
|
|
395
|
+
13782,
|
|
396
396
|
"Unable to write into MCP configuration file because the file has unsaved changes. Please save it first and then try again."
|
|
397
397
|
);
|
|
398
398
|
}
|
|
399
399
|
switch (target) {
|
|
400
400
|
case EditableConfigurationTarget.USER_LOCAL:
|
|
401
401
|
return localize(
|
|
402
|
-
|
|
402
|
+
13783,
|
|
403
403
|
"Unable to write into user settings because the file has unsaved changes. Please save the user settings file first and then try again."
|
|
404
404
|
);
|
|
405
405
|
case EditableConfigurationTarget.USER_REMOTE:
|
|
406
406
|
return localize(
|
|
407
|
-
|
|
407
|
+
13784,
|
|
408
408
|
"Unable to write into remote user settings because the file has unsaved changes. Please save the remote user settings file first and then try again."
|
|
409
409
|
);
|
|
410
410
|
case EditableConfigurationTarget.WORKSPACE:
|
|
411
411
|
return localize(
|
|
412
|
-
|
|
412
|
+
13785,
|
|
413
413
|
"Unable to write into workspace settings because the file has unsaved changes. Please save the workspace settings file first and then try again."
|
|
414
414
|
);
|
|
415
415
|
case EditableConfigurationTarget.WORKSPACE_FOLDER: {
|
|
@@ -421,7 +421,7 @@ let ConfigurationEditing = class ConfigurationEditing {
|
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
423
|
return localize(
|
|
424
|
-
|
|
424
|
+
13786,
|
|
425
425
|
"Unable to write into folder settings because the file has unsaved changes. Please save the '{0}' folder settings file first and then try again.",
|
|
426
426
|
workspaceFolderName
|
|
427
427
|
);
|
|
@@ -433,46 +433,46 @@ let ConfigurationEditing = class ConfigurationEditing {
|
|
|
433
433
|
case ConfigurationEditingErrorCode.ERROR_CONFIGURATION_FILE_MODIFIED_SINCE:
|
|
434
434
|
if (operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY) {
|
|
435
435
|
return localize(
|
|
436
|
-
|
|
436
|
+
13787,
|
|
437
437
|
"Unable to write into tasks configuration file because the content of the file is newer."
|
|
438
438
|
);
|
|
439
439
|
}
|
|
440
440
|
if (operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY) {
|
|
441
441
|
return localize(
|
|
442
|
-
|
|
442
|
+
13788,
|
|
443
443
|
"Unable to write into launch configuration file because the content of the file is newer."
|
|
444
444
|
);
|
|
445
445
|
}
|
|
446
446
|
if (operation.workspaceStandAloneConfigurationKey === MCP_CONFIGURATION_KEY) {
|
|
447
447
|
return localize(
|
|
448
|
-
|
|
448
|
+
13789,
|
|
449
449
|
"Unable to write into MCP configuration file because the content of the file is newer."
|
|
450
450
|
);
|
|
451
451
|
}
|
|
452
452
|
switch (target) {
|
|
453
453
|
case EditableConfigurationTarget.USER_LOCAL:
|
|
454
454
|
return localize(
|
|
455
|
-
|
|
455
|
+
13790,
|
|
456
456
|
"Unable to write into user settings because the content of the file is newer."
|
|
457
457
|
);
|
|
458
458
|
case EditableConfigurationTarget.USER_REMOTE:
|
|
459
459
|
return localize(
|
|
460
|
-
|
|
460
|
+
13791,
|
|
461
461
|
"Unable to write into remote user settings because the content of the file is newer."
|
|
462
462
|
);
|
|
463
463
|
case EditableConfigurationTarget.WORKSPACE:
|
|
464
464
|
return localize(
|
|
465
|
-
|
|
465
|
+
13792,
|
|
466
466
|
"Unable to write into workspace settings because the content of the file is newer."
|
|
467
467
|
);
|
|
468
468
|
case EditableConfigurationTarget.WORKSPACE_FOLDER:
|
|
469
469
|
return localize(
|
|
470
|
-
|
|
470
|
+
13793,
|
|
471
471
|
"Unable to write into folder settings because the content of the file is newer."
|
|
472
472
|
);
|
|
473
473
|
}
|
|
474
474
|
case ConfigurationEditingErrorCode.ERROR_INTERNAL: return localize(
|
|
475
|
-
|
|
475
|
+
13794,
|
|
476
476
|
"Unable to write to {0} because of an internal error.",
|
|
477
477
|
this.stringifyTarget(target)
|
|
478
478
|
);
|
|
@@ -481,13 +481,13 @@ let ConfigurationEditing = class ConfigurationEditing {
|
|
|
481
481
|
stringifyTarget(target) {
|
|
482
482
|
switch (target) {
|
|
483
483
|
case EditableConfigurationTarget.USER_LOCAL:
|
|
484
|
-
return localize(
|
|
484
|
+
return localize(13795, "User Settings");
|
|
485
485
|
case EditableConfigurationTarget.USER_REMOTE:
|
|
486
|
-
return localize(
|
|
486
|
+
return localize(13796, "Remote User Settings");
|
|
487
487
|
case EditableConfigurationTarget.WORKSPACE:
|
|
488
|
-
return localize(
|
|
488
|
+
return localize(13797, "Workspace Settings");
|
|
489
489
|
case EditableConfigurationTarget.WORKSPACE_FOLDER:
|
|
490
|
-
return localize(
|
|
490
|
+
return localize(13798, "Folder Settings");
|
|
491
491
|
default:
|
|
492
492
|
return '';
|
|
493
493
|
}
|
|
@@ -128,7 +128,7 @@ class BaseConfigurationResolverService extends AbstractVariableResolverService {
|
|
|
128
128
|
if (!isUndefinedOrNull(value)) {
|
|
129
129
|
if (typeof value !== 'string') {
|
|
130
130
|
throw ( new VariableError(VariableKind.Command, ( localize(
|
|
131
|
-
|
|
131
|
+
13800,
|
|
132
132
|
"Cannot substitute command variable '{0}' because command did not return a result of type string.",
|
|
133
133
|
commandId
|
|
134
134
|
))));
|
|
@@ -213,7 +213,7 @@ class BaseConfigurationResolverService extends AbstractVariableResolverService {
|
|
|
213
213
|
async showUserInput(section, variable, inputInfos, variableToCommandMap) {
|
|
214
214
|
if (!inputInfos) {
|
|
215
215
|
throw ( new VariableError(VariableKind.Input, ( localize(
|
|
216
|
-
|
|
216
|
+
13801,
|
|
217
217
|
"Variable '{0}' must be defined in an '{1}' section of the debug or task configuration.",
|
|
218
218
|
variable,
|
|
219
219
|
'inputs'
|
|
@@ -223,7 +223,7 @@ class BaseConfigurationResolverService extends AbstractVariableResolverService {
|
|
|
223
223
|
if (info) {
|
|
224
224
|
const missingAttribute = (attrName) => {
|
|
225
225
|
throw ( new VariableError(VariableKind.Input, ( localize(
|
|
226
|
-
|
|
226
|
+
13802,
|
|
227
227
|
"Input variable '{0}' is of type '{1}' and must include '{2}'.",
|
|
228
228
|
variable,
|
|
229
229
|
info.type,
|
|
@@ -273,7 +273,7 @@ class BaseConfigurationResolverService extends AbstractVariableResolverService {
|
|
|
273
273
|
};
|
|
274
274
|
const topValue = variableToCommandMap?.[`input:${variable}`] ?? previousPickedValue ?? info.default;
|
|
275
275
|
if (value === info.default) {
|
|
276
|
-
item.description = ( localize(
|
|
276
|
+
item.description = ( localize(13803, "(Default)"));
|
|
277
277
|
picks.unshift(item);
|
|
278
278
|
}
|
|
279
279
|
else if (value === topValue) {
|
|
@@ -302,7 +302,7 @@ class BaseConfigurationResolverService extends AbstractVariableResolverService {
|
|
|
302
302
|
return { value: result, input: info };
|
|
303
303
|
}
|
|
304
304
|
throw ( new VariableError(VariableKind.Input, ( localize(
|
|
305
|
-
|
|
305
|
+
13804,
|
|
306
306
|
"Cannot substitute input variable '{0}' because command '{1}' did not return a result of type string.",
|
|
307
307
|
variable,
|
|
308
308
|
info.command
|
|
@@ -311,14 +311,14 @@ class BaseConfigurationResolverService extends AbstractVariableResolverService {
|
|
|
311
311
|
}
|
|
312
312
|
default:
|
|
313
313
|
throw ( new VariableError(VariableKind.Input, ( localize(
|
|
314
|
-
|
|
314
|
+
13805,
|
|
315
315
|
"Input variable '{0}' can only be of type 'promptString', 'pickString', or 'command'.",
|
|
316
316
|
variable
|
|
317
317
|
))));
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
320
|
throw ( new VariableError(VariableKind.Input, ( localize(
|
|
321
|
-
|
|
321
|
+
13806,
|
|
322
322
|
"Undefined input variable '{0}' encountered. Remove or define '{0}' to continue.",
|
|
323
323
|
variable
|
|
324
324
|
))));
|
package/vscode/src/vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService.js
CHANGED
|
@@ -55,8 +55,8 @@ let AbstractWorkspaceEditingService = class AbstractWorkspaceEditingService exte
|
|
|
55
55
|
availableFileSystems.unshift(Schemas.vscodeRemote);
|
|
56
56
|
}
|
|
57
57
|
let workspacePath = await this.fileDialogService.showSaveDialog({
|
|
58
|
-
saveLabel: ( localize(
|
|
59
|
-
title: ( localize(
|
|
58
|
+
saveLabel: ( localize(14659, "Save")),
|
|
59
|
+
title: ( localize(14660, "Save Workspace")),
|
|
60
60
|
filters: WORKSPACE_FILTER,
|
|
61
61
|
defaultUri: joinPath(await this.fileDialogService.defaultWorkspacePath(), this.getNewWorkspaceName()),
|
|
62
62
|
availableFileSystems
|
|
@@ -255,14 +255,14 @@ let AbstractWorkspaceEditingService = class AbstractWorkspaceEditingService exte
|
|
|
255
255
|
}
|
|
256
256
|
onInvalidWorkspaceConfigurationFileError() {
|
|
257
257
|
const message = ( localize(
|
|
258
|
-
|
|
258
|
+
14661,
|
|
259
259
|
"Unable to write into workspace configuration file. Please open the file to correct errors/warnings in it and try again."
|
|
260
260
|
));
|
|
261
261
|
this.askToOpenWorkspaceConfigurationFile(message);
|
|
262
262
|
}
|
|
263
263
|
askToOpenWorkspaceConfigurationFile(message) {
|
|
264
264
|
this.notificationService.prompt(Severity.Error, message, [{
|
|
265
|
-
label: ( localize(
|
|
265
|
+
label: ( localize(14662, "Open Workspace Configuration")),
|
|
266
266
|
run: () => this.commandService.executeCommand('workbench.action.openWorkspaceConfigFile')
|
|
267
267
|
}]);
|
|
268
268
|
}
|