@codingame/monaco-vscode-configuration-service-override 9.0.0 → 9.0.2
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 +45 -45
- 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 +42 -42
- 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": "9.0.
|
|
3
|
+
"version": "9.0.2",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@9.0.
|
|
30
|
-
"@codingame/monaco-vscode-files-service-override": "9.0.
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@9.0.2",
|
|
30
|
+
"@codingame/monaco-vscode-files-service-override": "9.0.2"
|
|
31
31
|
}
|
|
32
32
|
}
|
|
@@ -20,29 +20,29 @@ const configurationEntrySchema = {
|
|
|
20
20
|
properties: {
|
|
21
21
|
title: {
|
|
22
22
|
description: ( localize(
|
|
23
|
-
|
|
23
|
+
3601,
|
|
24
24
|
'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.'
|
|
25
25
|
)),
|
|
26
26
|
type: 'string'
|
|
27
27
|
},
|
|
28
28
|
order: {
|
|
29
29
|
description: ( localize(
|
|
30
|
-
|
|
30
|
+
3602,
|
|
31
31
|
'When specified, gives the order of this category of settings relative to other categories.'
|
|
32
32
|
)),
|
|
33
33
|
type: 'integer'
|
|
34
34
|
},
|
|
35
35
|
properties: {
|
|
36
|
-
description: ( localize(
|
|
36
|
+
description: ( localize(3603, 'Description of the configuration properties.')),
|
|
37
37
|
type: 'object',
|
|
38
38
|
propertyNames: {
|
|
39
39
|
pattern: '\\S+',
|
|
40
|
-
patternErrorMessage: ( localize(
|
|
40
|
+
patternErrorMessage: ( localize(3604, 'Property should not be empty.')),
|
|
41
41
|
},
|
|
42
42
|
additionalProperties: {
|
|
43
43
|
anyOf: [
|
|
44
44
|
{
|
|
45
|
-
title: ( localize(
|
|
45
|
+
title: ( localize(3605, 'Schema of the configuration property.')),
|
|
46
46
|
$ref: 'http://json-schema.org/draft-07/schema#'
|
|
47
47
|
},
|
|
48
48
|
{
|
|
@@ -53,30 +53,30 @@ const configurationEntrySchema = {
|
|
|
53
53
|
enum: ['application', 'machine', 'window', 'resource', 'language-overridable', 'machine-overridable'],
|
|
54
54
|
default: 'window',
|
|
55
55
|
enumDescriptions: [
|
|
56
|
-
( localize(
|
|
56
|
+
( localize(3606, "Configuration that can be configured only in the user settings.")),
|
|
57
57
|
( localize(
|
|
58
|
-
|
|
58
|
+
3607,
|
|
59
59
|
"Configuration that can be configured only in the user settings or only in the remote settings."
|
|
60
60
|
)),
|
|
61
61
|
( localize(
|
|
62
|
-
|
|
62
|
+
3608,
|
|
63
63
|
"Configuration that can be configured in the user, remote or workspace settings."
|
|
64
64
|
)),
|
|
65
65
|
( localize(
|
|
66
|
-
|
|
66
|
+
3609,
|
|
67
67
|
"Configuration that can be configured in the user, remote, workspace or folder settings."
|
|
68
68
|
)),
|
|
69
69
|
( localize(
|
|
70
|
-
|
|
70
|
+
3610,
|
|
71
71
|
"Resource configuration that can be configured in language specific settings."
|
|
72
72
|
)),
|
|
73
73
|
( localize(
|
|
74
|
-
|
|
74
|
+
3611,
|
|
75
75
|
"Machine configuration that can be configured also in workspace or folder settings."
|
|
76
76
|
))
|
|
77
77
|
],
|
|
78
78
|
markdownDescription: ( localize(
|
|
79
|
-
|
|
79
|
+
3612,
|
|
80
80
|
"Scope in which the configuration is applicable. Available scopes are `application`, `machine`, `window`, `resource`, and `machine-overridable`."
|
|
81
81
|
))
|
|
82
82
|
},
|
|
@@ -85,14 +85,14 @@ const configurationEntrySchema = {
|
|
|
85
85
|
items: {
|
|
86
86
|
type: 'string',
|
|
87
87
|
},
|
|
88
|
-
description: ( localize(
|
|
88
|
+
description: ( localize(3613, 'Descriptions for enum values'))
|
|
89
89
|
},
|
|
90
90
|
markdownEnumDescriptions: {
|
|
91
91
|
type: 'array',
|
|
92
92
|
items: {
|
|
93
93
|
type: 'string',
|
|
94
94
|
},
|
|
95
|
-
description: ( localize(
|
|
95
|
+
description: ( localize(3614, 'Descriptions for enum values in the markdown format.'))
|
|
96
96
|
},
|
|
97
97
|
enumItemLabels: {
|
|
98
98
|
type: 'array',
|
|
@@ -100,26 +100,26 @@ const configurationEntrySchema = {
|
|
|
100
100
|
type: 'string'
|
|
101
101
|
},
|
|
102
102
|
markdownDescription: ( localize(
|
|
103
|
-
|
|
103
|
+
3615,
|
|
104
104
|
'Labels for enum values to be displayed in the Settings editor. When specified, the {0} values still show after the labels, but less prominently.',
|
|
105
105
|
'`enum`'
|
|
106
106
|
))
|
|
107
107
|
},
|
|
108
108
|
markdownDescription: {
|
|
109
109
|
type: 'string',
|
|
110
|
-
description: ( localize(
|
|
110
|
+
description: ( localize(3616, 'The description in the markdown format.'))
|
|
111
111
|
},
|
|
112
112
|
deprecationMessage: {
|
|
113
113
|
type: 'string',
|
|
114
114
|
description: ( localize(
|
|
115
|
-
|
|
115
|
+
3617,
|
|
116
116
|
'If set, the property is marked as deprecated and the given message is shown as an explanation.'
|
|
117
117
|
))
|
|
118
118
|
},
|
|
119
119
|
markdownDeprecationMessage: {
|
|
120
120
|
type: 'string',
|
|
121
121
|
description: ( localize(
|
|
122
|
-
|
|
122
|
+
3618,
|
|
123
123
|
'If set, the property is marked as deprecated and the given message is shown as an explanation in the markdown format.'
|
|
124
124
|
))
|
|
125
125
|
},
|
|
@@ -127,26 +127,26 @@ const configurationEntrySchema = {
|
|
|
127
127
|
type: 'string',
|
|
128
128
|
enum: ['singlelineText', 'multilineText'],
|
|
129
129
|
enumDescriptions: [
|
|
130
|
-
( localize(
|
|
131
|
-
( localize(
|
|
130
|
+
( localize(3619, 'The value will be shown in an inputbox.')),
|
|
131
|
+
( localize(3620, 'The value will be shown in a textarea.'))
|
|
132
132
|
],
|
|
133
133
|
default: 'singlelineText',
|
|
134
134
|
description: ( localize(
|
|
135
|
-
|
|
135
|
+
3621,
|
|
136
136
|
'When specified, controls the presentation format of the string setting.'
|
|
137
137
|
))
|
|
138
138
|
},
|
|
139
139
|
order: {
|
|
140
140
|
type: 'integer',
|
|
141
141
|
description: ( localize(
|
|
142
|
-
|
|
142
|
+
3622,
|
|
143
143
|
'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.'
|
|
144
144
|
))
|
|
145
145
|
},
|
|
146
146
|
ignoreSync: {
|
|
147
147
|
type: 'boolean',
|
|
148
148
|
description: ( localize(
|
|
149
|
-
|
|
149
|
+
3623,
|
|
150
150
|
'When enabled, Settings Sync will not sync the user value of this configuration by default.'
|
|
151
151
|
))
|
|
152
152
|
},
|
|
@@ -190,7 +190,7 @@ defaultConfigurationExtPoint.setHandler((extensions, { added, removed }) => {
|
|
|
190
190
|
const registeredPropertyScheme = registeredProperties[key];
|
|
191
191
|
if (registeredPropertyScheme?.disallowConfigurationDefault) {
|
|
192
192
|
extension.collector.warn(( localize(
|
|
193
|
-
|
|
193
|
+
3624,
|
|
194
194
|
"Cannot register configuration defaults for '{0}'. This setting does not allow contributing configuration defaults.",
|
|
195
195
|
key
|
|
196
196
|
)));
|
|
@@ -200,7 +200,7 @@ defaultConfigurationExtPoint.setHandler((extensions, { added, removed }) => {
|
|
|
200
200
|
if (!OVERRIDE_PROPERTY_REGEX.test(key)) {
|
|
201
201
|
if (registeredPropertyScheme?.scope && !allowedScopes.includes(registeredPropertyScheme.scope)) {
|
|
202
202
|
extension.collector.warn(( localize(
|
|
203
|
-
|
|
203
|
+
3625,
|
|
204
204
|
"Cannot register configuration defaults for '{0}'. Only defaults for machine-overridable, window, resource and language overridable scoped settings are supported.",
|
|
205
205
|
key
|
|
206
206
|
)));
|
|
@@ -218,7 +218,7 @@ const configurationExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
|
218
218
|
extensionPoint: 'configuration',
|
|
219
219
|
deps: [defaultConfigurationExtPoint],
|
|
220
220
|
jsonSchema: {
|
|
221
|
-
description: ( localize(
|
|
221
|
+
description: ( localize(3626, 'Contributes configuration settings.')),
|
|
222
222
|
oneOf: [
|
|
223
223
|
configurationEntrySchema,
|
|
224
224
|
{
|
|
@@ -243,7 +243,7 @@ configurationExtPoint.setHandler((extensions, { added, removed }) => {
|
|
|
243
243
|
function handleConfiguration(node, extension) {
|
|
244
244
|
const configuration = deepClone(node);
|
|
245
245
|
if (configuration.title && (typeof configuration.title !== 'string')) {
|
|
246
|
-
extension.collector.error(( localize(
|
|
246
|
+
extension.collector.error(( localize(3627, "'configuration.title' must be a string")));
|
|
247
247
|
}
|
|
248
248
|
validateProperties(configuration, extension);
|
|
249
249
|
configuration.id = node.id || extension.description.identifier.value;
|
|
@@ -256,7 +256,7 @@ configurationExtPoint.setHandler((extensions, { added, removed }) => {
|
|
|
256
256
|
const properties = configuration.properties;
|
|
257
257
|
if (properties) {
|
|
258
258
|
if (typeof properties !== 'object') {
|
|
259
|
-
extension.collector.error(( localize(
|
|
259
|
+
extension.collector.error(( localize(3628, "'configuration.properties' must be an object")));
|
|
260
260
|
configuration.properties = {};
|
|
261
261
|
}
|
|
262
262
|
for (const key in properties) {
|
|
@@ -269,12 +269,12 @@ configurationExtPoint.setHandler((extensions, { added, removed }) => {
|
|
|
269
269
|
}
|
|
270
270
|
if (( (seenProperties.has(key)))) {
|
|
271
271
|
delete properties[key];
|
|
272
|
-
extension.collector.warn(( localize(
|
|
272
|
+
extension.collector.warn(( localize(3629, "Cannot register '{0}'. This property is already registered.", key)));
|
|
273
273
|
continue;
|
|
274
274
|
}
|
|
275
275
|
if (!isObject(propertyConfiguration)) {
|
|
276
276
|
delete properties[key];
|
|
277
|
-
extension.collector.error(( localize(
|
|
277
|
+
extension.collector.error(( localize(3630, "configuration.properties property '{0}' must be an object", key)));
|
|
278
278
|
continue;
|
|
279
279
|
}
|
|
280
280
|
seenProperties.add(key);
|
|
@@ -284,7 +284,7 @@ configurationExtPoint.setHandler((extensions, { added, removed }) => {
|
|
|
284
284
|
const subNodes = configuration.allOf;
|
|
285
285
|
if (subNodes) {
|
|
286
286
|
extension.collector.error(( localize(
|
|
287
|
-
|
|
287
|
+
3631,
|
|
288
288
|
"'configuration.allOf' is deprecated and should no longer be used. Instead, pass multiple configuration sections as an array to the 'configuration' contribution point."
|
|
289
289
|
)));
|
|
290
290
|
for (const node of subNodes) {
|
|
@@ -327,7 +327,7 @@ jsonRegistry.registerSchema('vscode://schemas/workspaceConfig', {
|
|
|
327
327
|
'folders': {
|
|
328
328
|
minItems: 0,
|
|
329
329
|
uniqueItems: true,
|
|
330
|
-
description: ( localize(
|
|
330
|
+
description: ( localize(3632, "List of folders to be loaded in the workspace.")),
|
|
331
331
|
items: {
|
|
332
332
|
type: 'object',
|
|
333
333
|
defaultSnippets: [{ body: { path: '$1' } }],
|
|
@@ -336,13 +336,13 @@ jsonRegistry.registerSchema('vscode://schemas/workspaceConfig', {
|
|
|
336
336
|
path: {
|
|
337
337
|
type: 'string',
|
|
338
338
|
description: ( localize(
|
|
339
|
-
|
|
339
|
+
3633,
|
|
340
340
|
"A file path. e.g. `/root/folderA` or `./folderA` for a relative path that will be resolved against the location of the workspace file."
|
|
341
341
|
))
|
|
342
342
|
},
|
|
343
343
|
name: {
|
|
344
344
|
type: 'string',
|
|
345
|
-
description: ( localize(
|
|
345
|
+
description: ( localize(3634, "An optional name for the folder. "))
|
|
346
346
|
}
|
|
347
347
|
},
|
|
348
348
|
required: ['path']
|
|
@@ -350,11 +350,11 @@ jsonRegistry.registerSchema('vscode://schemas/workspaceConfig', {
|
|
|
350
350
|
properties: {
|
|
351
351
|
uri: {
|
|
352
352
|
type: 'string',
|
|
353
|
-
description: ( localize(
|
|
353
|
+
description: ( localize(3635, "URI of the folder"))
|
|
354
354
|
},
|
|
355
355
|
name: {
|
|
356
356
|
type: 'string',
|
|
357
|
-
description: ( localize(
|
|
357
|
+
description: ( localize(3634, "An optional name for the folder. "))
|
|
358
358
|
}
|
|
359
359
|
},
|
|
360
360
|
required: ['uri']
|
|
@@ -364,39 +364,39 @@ jsonRegistry.registerSchema('vscode://schemas/workspaceConfig', {
|
|
|
364
364
|
'settings': {
|
|
365
365
|
type: 'object',
|
|
366
366
|
default: {},
|
|
367
|
-
description: ( localize(
|
|
367
|
+
description: ( localize(3636, "Workspace settings")),
|
|
368
368
|
$ref: workspaceSettingsSchemaId
|
|
369
369
|
},
|
|
370
370
|
'launch': {
|
|
371
371
|
type: 'object',
|
|
372
372
|
default: { configurations: [], compounds: [] },
|
|
373
|
-
description: ( localize(
|
|
373
|
+
description: ( localize(3637, "Workspace launch configurations")),
|
|
374
374
|
$ref: launchSchemaId
|
|
375
375
|
},
|
|
376
376
|
'tasks': {
|
|
377
377
|
type: 'object',
|
|
378
378
|
default: { version: '2.0.0', tasks: [] },
|
|
379
|
-
description: ( localize(
|
|
379
|
+
description: ( localize(3638, "Workspace task configurations")),
|
|
380
380
|
$ref: tasksSchemaId
|
|
381
381
|
},
|
|
382
382
|
'extensions': {
|
|
383
383
|
type: 'object',
|
|
384
384
|
default: {},
|
|
385
|
-
description: ( localize(
|
|
385
|
+
description: ( localize(3639, "Workspace extensions")),
|
|
386
386
|
$ref: 'vscode://schemas/extensions'
|
|
387
387
|
},
|
|
388
388
|
'remoteAuthority': {
|
|
389
389
|
type: 'string',
|
|
390
390
|
doNotSuggest: true,
|
|
391
|
-
description: ( localize(
|
|
391
|
+
description: ( localize(3640, "The remote server where the workspace is located.")),
|
|
392
392
|
},
|
|
393
393
|
'transient': {
|
|
394
394
|
type: 'boolean',
|
|
395
395
|
doNotSuggest: true,
|
|
396
|
-
description: ( localize(
|
|
396
|
+
description: ( localize(3641, "A transient workspace will disappear when restarting or reloading.")),
|
|
397
397
|
}
|
|
398
398
|
},
|
|
399
|
-
errorMessage: ( localize(
|
|
399
|
+
errorMessage: ( localize(3642, "Unknown workspace configuration property"))
|
|
400
400
|
});
|
|
401
401
|
class SettingsTableRenderer extends Disposable {
|
|
402
402
|
constructor() {
|
|
@@ -412,7 +412,7 @@ class SettingsTableRenderer extends Disposable {
|
|
|
412
412
|
: [];
|
|
413
413
|
const properties = getAllConfigurationProperties(configuration);
|
|
414
414
|
const contrib = properties ? ( (Object.keys(properties))) : [];
|
|
415
|
-
const headers = [( localize(
|
|
415
|
+
const headers = [( localize(3643, "ID")), ( localize(3644, "Description")), ( localize(3645, "Default"))];
|
|
416
416
|
const rows = ( (contrib.sort((a, b) => a.localeCompare(b))
|
|
417
417
|
.map(key => {
|
|
418
418
|
return [
|
|
@@ -432,7 +432,7 @@ class SettingsTableRenderer extends Disposable {
|
|
|
432
432
|
}
|
|
433
433
|
( (Registry.as(Extensions$2.ExtensionFeaturesRegistry))).registerExtensionFeature({
|
|
434
434
|
id: 'configuration',
|
|
435
|
-
label: ( localize(
|
|
435
|
+
label: ( localize(3646, "Settings")),
|
|
436
436
|
access: {
|
|
437
437
|
canToggle: false
|
|
438
438
|
},
|
|
@@ -50,12 +50,12 @@ let WorkspacesFinderContribution = class WorkspacesFinderContribution extends Di
|
|
|
50
50
|
if (workspaces.length === 1) {
|
|
51
51
|
const workspaceFile = workspaces[0];
|
|
52
52
|
this.notificationService.prompt(Severity$1.Info, ( localize(
|
|
53
|
-
|
|
53
|
+
3647,
|
|
54
54
|
"This folder contains a workspace file '{0}'. Do you want to open it? [Learn more]({1}) about workspace files.",
|
|
55
55
|
workspaceFile,
|
|
56
56
|
'https://go.microsoft.com/fwlink/?linkid=2025315'
|
|
57
57
|
)), [{
|
|
58
|
-
label: ( localize(
|
|
58
|
+
label: ( localize(3648, "Open Workspace")),
|
|
59
59
|
run: () => this.hostService.openWindow([{ workspaceUri: joinPath(folder, workspaceFile) }])
|
|
60
60
|
}], {
|
|
61
61
|
neverShowAgain,
|
|
@@ -64,13 +64,13 @@ let WorkspacesFinderContribution = class WorkspacesFinderContribution extends Di
|
|
|
64
64
|
}
|
|
65
65
|
else if (workspaces.length > 1) {
|
|
66
66
|
this.notificationService.prompt(Severity$1.Info, ( localize(
|
|
67
|
-
|
|
67
|
+
3649,
|
|
68
68
|
"This folder contains multiple workspace files. Do you want to open one? [Learn more]({0}) about workspace files.",
|
|
69
69
|
'https://go.microsoft.com/fwlink/?linkid=2025315'
|
|
70
70
|
)), [{
|
|
71
|
-
label: ( localize(
|
|
71
|
+
label: ( localize(3650, "Select Workspace")),
|
|
72
72
|
run: () => {
|
|
73
|
-
this.quickInputService.pick(( (workspaces.map(workspace => ({ label: workspace })))), { placeHolder: ( localize(
|
|
73
|
+
this.quickInputService.pick(( (workspaces.map(workspace => ({ label: workspace })))), { placeHolder: ( localize(3651, "Select a workspace to open")) }).then(pick => {
|
|
74
74
|
if (pick) {
|
|
75
75
|
this.hostService.openWindow([{ workspaceUri: joinPath(folder, pick.label) }]);
|
|
76
76
|
}
|
|
@@ -96,7 +96,7 @@ registerAction2(class extends Action2 {
|
|
|
96
96
|
constructor() {
|
|
97
97
|
super({
|
|
98
98
|
id: 'workbench.action.openWorkspaceFromEditor',
|
|
99
|
-
title: ( localize2(
|
|
99
|
+
title: ( localize2(3648, "Open Workspace")),
|
|
100
100
|
f1: false,
|
|
101
101
|
menu: {
|
|
102
102
|
id: MenuId.EditorContent,
|
|
@@ -115,7 +115,7 @@ registerAction2(class extends Action2 {
|
|
|
115
115
|
if (contextService.getWorkbenchState() === WorkbenchState.WORKSPACE) {
|
|
116
116
|
const workspaceConfiguration = contextService.getWorkspace().configuration;
|
|
117
117
|
if (workspaceConfiguration && isEqual(workspaceConfiguration, uri)) {
|
|
118
|
-
notificationService.info(( localize(
|
|
118
|
+
notificationService.info(( localize(3652, "This workspace is already open.")));
|
|
119
119
|
return;
|
|
120
120
|
}
|
|
121
121
|
}
|
|
@@ -1095,7 +1095,7 @@ let RegisterConfigurationSchemasContribution = class RegisterConfigurationSchema
|
|
|
1095
1095
|
} : workspaceSettingsSchema;
|
|
1096
1096
|
const configDefaultsSchema = {
|
|
1097
1097
|
type: 'object',
|
|
1098
|
-
description: ( localize(
|
|
1098
|
+
description: ( localize(3653, 'Contribute defaults for configurations')),
|
|
1099
1099
|
properties: Object.assign({}, this.filterDefaultOverridableProperties(machineOverridableSettings.properties), this.filterDefaultOverridableProperties(windowSettings.properties), this.filterDefaultOverridableProperties(resourceSettings.properties)),
|
|
1100
1100
|
patternProperties: {
|
|
1101
1101
|
[OVERRIDE_PROPERTY_PATTERN]: {
|
|
@@ -1215,7 +1215,7 @@ configurationRegistry.registerConfiguration({
|
|
|
1215
1215
|
properties: {
|
|
1216
1216
|
[APPLY_ALL_PROFILES_SETTING]: {
|
|
1217
1217
|
'type': 'array',
|
|
1218
|
-
description: ( localize(
|
|
1218
|
+
description: ( localize(3654, "Configure settings to be applied for all profiles.")),
|
|
1219
1219
|
'default': [],
|
|
1220
1220
|
'scope': ConfigurationScope.APPLICATION,
|
|
1221
1221
|
additionalProperties: true,
|
|
@@ -126,7 +126,7 @@ let ConfigurationEditing = class ConfigurationEditing {
|
|
|
126
126
|
throw this.toConfigurationEditingError(ConfigurationEditingErrorCode.ERROR_CONFIGURATION_FILE_MODIFIED_SINCE, operation.target, operation);
|
|
127
127
|
}
|
|
128
128
|
throw ( (new ConfigurationEditingError(localize(
|
|
129
|
-
|
|
129
|
+
8800,
|
|
130
130
|
"Error while writing to {0}. {1}",
|
|
131
131
|
this.stringifyTarget(operation.target),
|
|
132
132
|
error.message
|
|
@@ -186,8 +186,8 @@ let ConfigurationEditing = class ConfigurationEditing {
|
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
onInvalidConfigurationError(error, operation) {
|
|
189
|
-
const openStandAloneConfigurationActionLabel = operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY ? ( localize(
|
|
190
|
-
: operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY ? ( localize(
|
|
189
|
+
const openStandAloneConfigurationActionLabel = operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY ? ( localize(8801, "Open Tasks Configuration"))
|
|
190
|
+
: operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY ? ( localize(8802, "Open Launch Configuration"))
|
|
191
191
|
: null;
|
|
192
192
|
if (openStandAloneConfigurationActionLabel) {
|
|
193
193
|
this.notificationService.prompt(Severity$1.Error, error.message, [{
|
|
@@ -197,18 +197,18 @@ let ConfigurationEditing = class ConfigurationEditing {
|
|
|
197
197
|
}
|
|
198
198
|
else {
|
|
199
199
|
this.notificationService.prompt(Severity$1.Error, error.message, [{
|
|
200
|
-
label: ( localize(
|
|
200
|
+
label: ( localize(8803, "Open Settings")),
|
|
201
201
|
run: () => this.openSettings(operation)
|
|
202
202
|
}]);
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
onConfigurationFileDirtyError(error, operation, scopes) {
|
|
206
|
-
const openStandAloneConfigurationActionLabel = operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY ? ( localize(
|
|
207
|
-
: operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY ? ( localize(
|
|
206
|
+
const openStandAloneConfigurationActionLabel = operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY ? ( localize(8801, "Open Tasks Configuration"))
|
|
207
|
+
: operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY ? ( localize(8802, "Open Launch Configuration"))
|
|
208
208
|
: null;
|
|
209
209
|
if (openStandAloneConfigurationActionLabel) {
|
|
210
210
|
this.notificationService.prompt(Severity$1.Error, error.message, [{
|
|
211
|
-
label: ( localize(
|
|
211
|
+
label: ( localize(8804, "Save and Retry")),
|
|
212
212
|
run: () => {
|
|
213
213
|
const key = operation.key ? `${operation.workspaceStandAloneConfigurationKey}.${operation.key}` : operation.workspaceStandAloneConfigurationKey;
|
|
214
214
|
this.writeConfiguration(operation.target, { key, value: operation.value }, { handleDirtyFile: 'save', scopes });
|
|
@@ -221,11 +221,11 @@ let ConfigurationEditing = class ConfigurationEditing {
|
|
|
221
221
|
}
|
|
222
222
|
else {
|
|
223
223
|
this.notificationService.prompt(Severity$1.Error, error.message, [{
|
|
224
|
-
label: ( localize(
|
|
224
|
+
label: ( localize(8804, "Save and Retry")),
|
|
225
225
|
run: () => this.writeConfiguration(operation.target, { key: operation.key, value: operation.value }, { handleDirtyFile: 'save', scopes })
|
|
226
226
|
},
|
|
227
227
|
{
|
|
228
|
-
label: ( localize(
|
|
228
|
+
label: ( localize(8803, "Open Settings")),
|
|
229
229
|
run: () => this.openSettings(operation)
|
|
230
230
|
}]);
|
|
231
231
|
}
|
|
@@ -264,82 +264,82 @@ let ConfigurationEditing = class ConfigurationEditing {
|
|
|
264
264
|
toErrorMessage(error, target, operation) {
|
|
265
265
|
switch (error) {
|
|
266
266
|
case ConfigurationEditingErrorCode.ERROR_POLICY_CONFIGURATION: return ( localize(
|
|
267
|
-
|
|
267
|
+
8805,
|
|
268
268
|
"Unable to write {0} because it is configured in system policy.",
|
|
269
269
|
operation.key
|
|
270
270
|
));
|
|
271
271
|
case ConfigurationEditingErrorCode.ERROR_UNKNOWN_KEY: return ( localize(
|
|
272
|
-
|
|
272
|
+
8806,
|
|
273
273
|
"Unable to write to {0} because {1} is not a registered configuration.",
|
|
274
274
|
this.stringifyTarget(target),
|
|
275
275
|
operation.key
|
|
276
276
|
));
|
|
277
277
|
case ConfigurationEditingErrorCode.ERROR_INVALID_WORKSPACE_CONFIGURATION_APPLICATION: return ( localize(
|
|
278
|
-
|
|
278
|
+
8807,
|
|
279
279
|
"Unable to write {0} to Workspace Settings. This setting can be written only into User settings.",
|
|
280
280
|
operation.key
|
|
281
281
|
));
|
|
282
282
|
case ConfigurationEditingErrorCode.ERROR_INVALID_WORKSPACE_CONFIGURATION_MACHINE: return ( localize(
|
|
283
|
-
|
|
283
|
+
8808,
|
|
284
284
|
"Unable to write {0} to Workspace Settings. This setting can be written only into User settings.",
|
|
285
285
|
operation.key
|
|
286
286
|
));
|
|
287
287
|
case ConfigurationEditingErrorCode.ERROR_INVALID_FOLDER_CONFIGURATION: return ( localize(
|
|
288
|
-
|
|
288
|
+
8809,
|
|
289
289
|
"Unable to write to Folder Settings because {0} does not support the folder resource scope.",
|
|
290
290
|
operation.key
|
|
291
291
|
));
|
|
292
292
|
case ConfigurationEditingErrorCode.ERROR_INVALID_USER_TARGET: return ( localize(
|
|
293
|
-
|
|
293
|
+
8810,
|
|
294
294
|
"Unable to write to User Settings because {0} does not support for global scope.",
|
|
295
295
|
operation.key
|
|
296
296
|
));
|
|
297
297
|
case ConfigurationEditingErrorCode.ERROR_INVALID_WORKSPACE_TARGET: return ( localize(
|
|
298
|
-
|
|
298
|
+
8811,
|
|
299
299
|
"Unable to write to Workspace Settings because {0} does not support for workspace scope in a multi folder workspace.",
|
|
300
300
|
operation.key
|
|
301
301
|
));
|
|
302
302
|
case ConfigurationEditingErrorCode.ERROR_INVALID_FOLDER_TARGET: return ( localize(
|
|
303
|
-
|
|
303
|
+
8812,
|
|
304
304
|
"Unable to write to Folder Settings because no resource is provided."
|
|
305
305
|
));
|
|
306
306
|
case ConfigurationEditingErrorCode.ERROR_INVALID_RESOURCE_LANGUAGE_CONFIGURATION: return ( localize(
|
|
307
|
-
|
|
307
|
+
8813,
|
|
308
308
|
"Unable to write to Language Settings because {0} is not a resource language setting.",
|
|
309
309
|
operation.key
|
|
310
310
|
));
|
|
311
311
|
case ConfigurationEditingErrorCode.ERROR_NO_WORKSPACE_OPENED: return ( localize(
|
|
312
|
-
|
|
312
|
+
8814,
|
|
313
313
|
"Unable to write to {0} because no workspace is opened. Please open a workspace first and try again.",
|
|
314
314
|
this.stringifyTarget(target)
|
|
315
315
|
));
|
|
316
316
|
case ConfigurationEditingErrorCode.ERROR_INVALID_CONFIGURATION: {
|
|
317
317
|
if (operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY) {
|
|
318
318
|
return ( localize(
|
|
319
|
-
|
|
319
|
+
8815,
|
|
320
320
|
"Unable to write into the tasks configuration file. Please open it to correct errors/warnings in it and try again."
|
|
321
321
|
));
|
|
322
322
|
}
|
|
323
323
|
if (operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY) {
|
|
324
324
|
return ( localize(
|
|
325
|
-
|
|
325
|
+
8816,
|
|
326
326
|
"Unable to write into the launch configuration file. Please open it to correct errors/warnings in it and try again."
|
|
327
327
|
));
|
|
328
328
|
}
|
|
329
329
|
switch (target) {
|
|
330
330
|
case EditableConfigurationTarget.USER_LOCAL:
|
|
331
331
|
return ( localize(
|
|
332
|
-
|
|
332
|
+
8817,
|
|
333
333
|
"Unable to write into user settings. Please open the user settings to correct errors/warnings in it and try again."
|
|
334
334
|
));
|
|
335
335
|
case EditableConfigurationTarget.USER_REMOTE:
|
|
336
336
|
return ( localize(
|
|
337
|
-
|
|
337
|
+
8818,
|
|
338
338
|
"Unable to write into remote user settings. Please open the remote user settings to correct errors/warnings in it and try again."
|
|
339
339
|
));
|
|
340
340
|
case EditableConfigurationTarget.WORKSPACE:
|
|
341
341
|
return ( localize(
|
|
342
|
-
|
|
342
|
+
8819,
|
|
343
343
|
"Unable to write into workspace settings. Please open the workspace settings to correct errors/warnings in the file and try again."
|
|
344
344
|
));
|
|
345
345
|
case EditableConfigurationTarget.WORKSPACE_FOLDER: {
|
|
@@ -351,7 +351,7 @@ let ConfigurationEditing = class ConfigurationEditing {
|
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
353
|
return ( localize(
|
|
354
|
-
|
|
354
|
+
8820,
|
|
355
355
|
"Unable to write into folder settings. Please open the '{0}' folder settings to correct errors/warnings in it and try again.",
|
|
356
356
|
workspaceFolderName
|
|
357
357
|
));
|
|
@@ -363,30 +363,30 @@ let ConfigurationEditing = class ConfigurationEditing {
|
|
|
363
363
|
case ConfigurationEditingErrorCode.ERROR_CONFIGURATION_FILE_DIRTY: {
|
|
364
364
|
if (operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY) {
|
|
365
365
|
return ( localize(
|
|
366
|
-
|
|
366
|
+
8821,
|
|
367
367
|
"Unable to write into tasks configuration file because the file has unsaved changes. Please save it first and then try again."
|
|
368
368
|
));
|
|
369
369
|
}
|
|
370
370
|
if (operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY) {
|
|
371
371
|
return ( localize(
|
|
372
|
-
|
|
372
|
+
8822,
|
|
373
373
|
"Unable to write into launch configuration file because the file has unsaved changes. Please save it first and then try again."
|
|
374
374
|
));
|
|
375
375
|
}
|
|
376
376
|
switch (target) {
|
|
377
377
|
case EditableConfigurationTarget.USER_LOCAL:
|
|
378
378
|
return ( localize(
|
|
379
|
-
|
|
379
|
+
8823,
|
|
380
380
|
"Unable to write into user settings because the file has unsaved changes. Please save the user settings file first and then try again."
|
|
381
381
|
));
|
|
382
382
|
case EditableConfigurationTarget.USER_REMOTE:
|
|
383
383
|
return ( localize(
|
|
384
|
-
|
|
384
|
+
8824,
|
|
385
385
|
"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."
|
|
386
386
|
));
|
|
387
387
|
case EditableConfigurationTarget.WORKSPACE:
|
|
388
388
|
return ( localize(
|
|
389
|
-
|
|
389
|
+
8825,
|
|
390
390
|
"Unable to write into workspace settings because the file has unsaved changes. Please save the workspace settings file first and then try again."
|
|
391
391
|
));
|
|
392
392
|
case EditableConfigurationTarget.WORKSPACE_FOLDER: {
|
|
@@ -398,7 +398,7 @@ let ConfigurationEditing = class ConfigurationEditing {
|
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
400
|
return ( localize(
|
|
401
|
-
|
|
401
|
+
8826,
|
|
402
402
|
"Unable to write into folder settings because the file has unsaved changes. Please save the '{0}' folder settings file first and then try again.",
|
|
403
403
|
workspaceFolderName
|
|
404
404
|
));
|
|
@@ -410,40 +410,40 @@ let ConfigurationEditing = class ConfigurationEditing {
|
|
|
410
410
|
case ConfigurationEditingErrorCode.ERROR_CONFIGURATION_FILE_MODIFIED_SINCE:
|
|
411
411
|
if (operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY) {
|
|
412
412
|
return ( localize(
|
|
413
|
-
|
|
413
|
+
8827,
|
|
414
414
|
"Unable to write into tasks configuration file because the content of the file is newer."
|
|
415
415
|
));
|
|
416
416
|
}
|
|
417
417
|
if (operation.workspaceStandAloneConfigurationKey === LAUNCH_CONFIGURATION_KEY) {
|
|
418
418
|
return ( localize(
|
|
419
|
-
|
|
419
|
+
8828,
|
|
420
420
|
"Unable to write into launch configuration file because the content of the file is newer."
|
|
421
421
|
));
|
|
422
422
|
}
|
|
423
423
|
switch (target) {
|
|
424
424
|
case EditableConfigurationTarget.USER_LOCAL:
|
|
425
425
|
return ( localize(
|
|
426
|
-
|
|
426
|
+
8829,
|
|
427
427
|
"Unable to write into user settings because the content of the file is newer."
|
|
428
428
|
));
|
|
429
429
|
case EditableConfigurationTarget.USER_REMOTE:
|
|
430
430
|
return ( localize(
|
|
431
|
-
|
|
431
|
+
8830,
|
|
432
432
|
"Unable to write into remote user settings because the content of the file is newer."
|
|
433
433
|
));
|
|
434
434
|
case EditableConfigurationTarget.WORKSPACE:
|
|
435
435
|
return ( localize(
|
|
436
|
-
|
|
436
|
+
8831,
|
|
437
437
|
"Unable to write into workspace settings because the content of the file is newer."
|
|
438
438
|
));
|
|
439
439
|
case EditableConfigurationTarget.WORKSPACE_FOLDER:
|
|
440
440
|
return ( localize(
|
|
441
|
-
|
|
441
|
+
8832,
|
|
442
442
|
"Unable to write into folder settings because the content of the file is newer."
|
|
443
443
|
));
|
|
444
444
|
}
|
|
445
445
|
case ConfigurationEditingErrorCode.ERROR_INTERNAL: return ( localize(
|
|
446
|
-
|
|
446
|
+
8833,
|
|
447
447
|
"Unable to write to {0} because of an internal error.",
|
|
448
448
|
this.stringifyTarget(target)
|
|
449
449
|
));
|
|
@@ -452,13 +452,13 @@ let ConfigurationEditing = class ConfigurationEditing {
|
|
|
452
452
|
stringifyTarget(target) {
|
|
453
453
|
switch (target) {
|
|
454
454
|
case EditableConfigurationTarget.USER_LOCAL:
|
|
455
|
-
return ( localize(
|
|
455
|
+
return ( localize(8834, "User Settings"));
|
|
456
456
|
case EditableConfigurationTarget.USER_REMOTE:
|
|
457
|
-
return ( localize(
|
|
457
|
+
return ( localize(8835, "Remote User Settings"));
|
|
458
458
|
case EditableConfigurationTarget.WORKSPACE:
|
|
459
|
-
return ( localize(
|
|
459
|
+
return ( localize(8836, "Workspace Settings"));
|
|
460
460
|
case EditableConfigurationTarget.WORKSPACE_FOLDER:
|
|
461
|
-
return ( localize(
|
|
461
|
+
return ( localize(8837, "Folder Settings"));
|
|
462
462
|
default:
|
|
463
463
|
return '';
|
|
464
464
|
}
|
|
@@ -173,7 +173,7 @@ class BaseConfigurationResolverService extends AbstractVariableResolverService {
|
|
|
173
173
|
result = await this.commandService.executeCommand(commandId, configuration);
|
|
174
174
|
if (typeof result !== 'string' && !isUndefinedOrNull(result)) {
|
|
175
175
|
throw ( (new Error(localize(
|
|
176
|
-
|
|
176
|
+
8838,
|
|
177
177
|
"Cannot substitute command variable '{0}' because command did not return a result of type string.",
|
|
178
178
|
commandId
|
|
179
179
|
))));
|
|
@@ -225,7 +225,7 @@ class BaseConfigurationResolverService extends AbstractVariableResolverService {
|
|
|
225
225
|
showUserInput(section, variable, inputInfos) {
|
|
226
226
|
if (!inputInfos) {
|
|
227
227
|
return Promise.reject(( (new Error(( localize(
|
|
228
|
-
|
|
228
|
+
8839,
|
|
229
229
|
"Variable '{0}' must be defined in an '{1}' section of the debug or task configuration.",
|
|
230
230
|
variable,
|
|
231
231
|
'inputs'
|
|
@@ -235,7 +235,7 @@ class BaseConfigurationResolverService extends AbstractVariableResolverService {
|
|
|
235
235
|
if (info) {
|
|
236
236
|
const missingAttribute = (attrName) => {
|
|
237
237
|
throw ( (new Error(localize(
|
|
238
|
-
|
|
238
|
+
8840,
|
|
239
239
|
"Input variable '{0}' is of type '{1}' and must include '{2}'.",
|
|
240
240
|
variable,
|
|
241
241
|
info.type,
|
|
@@ -287,7 +287,7 @@ class BaseConfigurationResolverService extends AbstractVariableResolverService {
|
|
|
287
287
|
value: value
|
|
288
288
|
};
|
|
289
289
|
if (value === info.default) {
|
|
290
|
-
item.description = ( localize(
|
|
290
|
+
item.description = ( localize(8841, "(Default)"));
|
|
291
291
|
picks.unshift(item);
|
|
292
292
|
}
|
|
293
293
|
else if (!info.default && value === previousPickedValue) {
|
|
@@ -316,7 +316,7 @@ class BaseConfigurationResolverService extends AbstractVariableResolverService {
|
|
|
316
316
|
return result;
|
|
317
317
|
}
|
|
318
318
|
throw ( (new Error(localize(
|
|
319
|
-
|
|
319
|
+
8842,
|
|
320
320
|
"Cannot substitute input variable '{0}' because command '{1}' did not return a result of type string.",
|
|
321
321
|
variable,
|
|
322
322
|
info.command
|
|
@@ -325,14 +325,14 @@ class BaseConfigurationResolverService extends AbstractVariableResolverService {
|
|
|
325
325
|
}
|
|
326
326
|
default:
|
|
327
327
|
throw ( (new Error(localize(
|
|
328
|
-
|
|
328
|
+
8843,
|
|
329
329
|
"Input variable '{0}' can only be of type 'promptString', 'pickString', or 'command'.",
|
|
330
330
|
variable
|
|
331
331
|
))));
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
334
|
return Promise.reject(( (new Error(( localize(
|
|
335
|
-
|
|
335
|
+
8844,
|
|
336
336
|
"Undefined input variable '{0}' encountered. Remove or define '{0}' to continue.",
|
|
337
337
|
variable
|
|
338
338
|
))))));
|
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: mnemonicButtonLabel(( localize(
|
|
59
|
-
title: ( localize(
|
|
58
|
+
saveLabel: mnemonicButtonLabel(( localize(3655, "Save"))),
|
|
59
|
+
title: ( localize(3656, "Save Workspace")),
|
|
60
60
|
filters: WORKSPACE_FILTER,
|
|
61
61
|
defaultUri: joinPath(await this.fileDialogService.defaultWorkspacePath(), this.getNewWorkspaceName()),
|
|
62
62
|
availableFileSystems
|
|
@@ -257,14 +257,14 @@ let AbstractWorkspaceEditingService = class AbstractWorkspaceEditingService exte
|
|
|
257
257
|
}
|
|
258
258
|
onInvalidWorkspaceConfigurationFileError() {
|
|
259
259
|
const message = ( localize(
|
|
260
|
-
|
|
260
|
+
3657,
|
|
261
261
|
"Unable to write into workspace configuration file. Please open the file to correct errors/warnings in it and try again."
|
|
262
262
|
));
|
|
263
263
|
this.askToOpenWorkspaceConfigurationFile(message);
|
|
264
264
|
}
|
|
265
265
|
askToOpenWorkspaceConfigurationFile(message) {
|
|
266
266
|
this.notificationService.prompt(Severity$1.Error, message, [{
|
|
267
|
-
label: ( localize(
|
|
267
|
+
label: ( localize(3658, "Open Workspace Configuration")),
|
|
268
268
|
run: () => this.commandService.executeCommand('workbench.action.openWorkspaceConfigFile')
|
|
269
269
|
}]);
|
|
270
270
|
}
|