@codingame/monaco-vscode-user-data-profile-service-override 14.0.2 → 14.0.4
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 +15 -15
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfile.js +23 -23
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfileActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditor.js +78 -78
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditorModel.js +27 -27
- package/vscode/src/vs/workbench/services/userDataProfile/browser/extensionsResource.js +5 -5
- package/vscode/src/vs/workbench/services/userDataProfile/browser/globalStateResource.js +1 -1
- package/vscode/src/vs/workbench/services/userDataProfile/browser/keybindingsResource.js +1 -1
- package/vscode/src/vs/workbench/services/userDataProfile/browser/settingsResource.js +1 -1
- package/vscode/src/vs/workbench/services/userDataProfile/browser/snippetsResource.js +2 -2
- package/vscode/src/vs/workbench/services/userDataProfile/browser/tasksResource.js +1 -1
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileImportExportService.js +40 -40
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.js +8 -8
|
@@ -173,7 +173,7 @@ let ExtensionsResource = class ExtensionsResource {
|
|
|
173
173
|
return;
|
|
174
174
|
}
|
|
175
175
|
progress?.(( localize(
|
|
176
|
-
|
|
176
|
+
12210,
|
|
177
177
|
"Installing extension {0}...",
|
|
178
178
|
installExtensionInfo.extension.displayName ?? installExtensionInfo.extension.identifier.id
|
|
179
179
|
)));
|
|
@@ -266,7 +266,7 @@ class ExtensionsResourceTreeItem {
|
|
|
266
266
|
constructor() {
|
|
267
267
|
this.type = ProfileResourceType.Extensions;
|
|
268
268
|
this.handle = ProfileResourceType.Extensions;
|
|
269
|
-
this.label = { label: ( localize(
|
|
269
|
+
this.label = { label: ( localize(12211, "Extensions")) };
|
|
270
270
|
this.collapsibleState = TreeItemCollapsibleState.Expanded;
|
|
271
271
|
this.contextValue = ProfileResourceType.Extensions;
|
|
272
272
|
this.excludedExtensions = ( new Set());
|
|
@@ -279,7 +279,7 @@ class ExtensionsResourceTreeItem {
|
|
|
279
279
|
handle: e.identifier.id.toLowerCase(),
|
|
280
280
|
parent: this,
|
|
281
281
|
label: { label: e.displayName || e.identifier.id },
|
|
282
|
-
description: e.applicationScoped ? ( localize(
|
|
282
|
+
description: e.applicationScoped ? ( localize(12212, "All Profiles")) : undefined,
|
|
283
283
|
collapsibleState: TreeItemCollapsibleState.None,
|
|
284
284
|
checkbox: that.checkbox ? {
|
|
285
285
|
get isChecked() { return !( that.excludedExtensions.has(e.identifier.id.toLowerCase())); },
|
|
@@ -291,9 +291,9 @@ class ExtensionsResourceTreeItem {
|
|
|
291
291
|
that.excludedExtensions.add(e.identifier.id.toLowerCase());
|
|
292
292
|
}
|
|
293
293
|
},
|
|
294
|
-
tooltip: ( localize(
|
|
294
|
+
tooltip: ( localize(12213, "Select {0} Extension", e.displayName || e.identifier.id)),
|
|
295
295
|
accessibilityInformation: {
|
|
296
|
-
label: ( localize(
|
|
296
|
+
label: ( localize(12213, "Select {0} Extension", e.displayName || e.identifier.id)),
|
|
297
297
|
}
|
|
298
298
|
} : undefined,
|
|
299
299
|
themeIcon: Codicon.extensions,
|
|
@@ -86,7 +86,7 @@ class GlobalStateResourceTreeItem {
|
|
|
86
86
|
this.uriIdentityService = uriIdentityService;
|
|
87
87
|
this.type = ProfileResourceType.GlobalState;
|
|
88
88
|
this.handle = ProfileResourceType.GlobalState;
|
|
89
|
-
this.label = { label: ( localize(
|
|
89
|
+
this.label = { label: ( localize(12214, "UI State")) };
|
|
90
90
|
this.collapsibleState = TreeItemCollapsibleState.Collapsed;
|
|
91
91
|
}
|
|
92
92
|
async getChildren() {
|
|
@@ -80,7 +80,7 @@ let KeybindingsResourceTreeItem = class KeybindingsResourceTreeItem {
|
|
|
80
80
|
this.instantiationService = instantiationService;
|
|
81
81
|
this.type = ProfileResourceType.Keybindings;
|
|
82
82
|
this.handle = ProfileResourceType.Keybindings;
|
|
83
|
-
this.label = { label: ( localize(
|
|
83
|
+
this.label = { label: ( localize(12215, "Keyboard Shortcuts")) };
|
|
84
84
|
this.collapsibleState = TreeItemCollapsibleState.Expanded;
|
|
85
85
|
}
|
|
86
86
|
isFromDefaultProfile() {
|
|
@@ -101,7 +101,7 @@ let SettingsResourceTreeItem = class SettingsResourceTreeItem {
|
|
|
101
101
|
this.instantiationService = instantiationService;
|
|
102
102
|
this.type = ProfileResourceType.Settings;
|
|
103
103
|
this.handle = ProfileResourceType.Settings;
|
|
104
|
-
this.label = { label: ( localize(
|
|
104
|
+
this.label = { label: ( localize(12216, "Settings")) };
|
|
105
105
|
this.collapsibleState = TreeItemCollapsibleState.Expanded;
|
|
106
106
|
}
|
|
107
107
|
async getChildren() {
|
|
@@ -94,7 +94,7 @@ let SnippetsResourceTreeItem = class SnippetsResourceTreeItem {
|
|
|
94
94
|
this.uriIdentityService = uriIdentityService;
|
|
95
95
|
this.type = ProfileResourceType.Snippets;
|
|
96
96
|
this.handle = ( this.profile.snippetsHome.toString());
|
|
97
|
-
this.label = { label: ( localize(
|
|
97
|
+
this.label = { label: ( localize(12217, "Snippets")) };
|
|
98
98
|
this.collapsibleState = TreeItemCollapsibleState.Collapsed;
|
|
99
99
|
this.excludedSnippets = ( new ResourceSet());
|
|
100
100
|
}
|
|
@@ -121,7 +121,7 @@ let SnippetsResourceTreeItem = class SnippetsResourceTreeItem {
|
|
|
121
121
|
},
|
|
122
122
|
accessibilityInformation: {
|
|
123
123
|
label: ( localize(
|
|
124
|
-
|
|
124
|
+
12218,
|
|
125
125
|
"Select Snippet {0}",
|
|
126
126
|
this.uriIdentityService.extUri.basename(resource)
|
|
127
127
|
)),
|
|
@@ -79,7 +79,7 @@ let TasksResourceTreeItem = class TasksResourceTreeItem {
|
|
|
79
79
|
this.instantiationService = instantiationService;
|
|
80
80
|
this.type = ProfileResourceType.Tasks;
|
|
81
81
|
this.handle = ProfileResourceType.Tasks;
|
|
82
|
-
this.label = { label: ( localize(
|
|
82
|
+
this.label = { label: ( localize(12219, "Tasks")) };
|
|
83
83
|
this.collapsibleState = TreeItemCollapsibleState.Expanded;
|
|
84
84
|
}
|
|
85
85
|
async getChildren() {
|
|
@@ -88,7 +88,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
88
88
|
sticky: true,
|
|
89
89
|
cancellable: true,
|
|
90
90
|
}, async (progress) => {
|
|
91
|
-
const reportProgress = (message) => progress.report({ message: ( localize(
|
|
91
|
+
const reportProgress = (message) => progress.report({ message: ( localize(12220, "Create Profile: {0}", message)) });
|
|
92
92
|
creationPromise = createCancelablePromise(async (token) => {
|
|
93
93
|
const userDataProfilesExportState = disposables.add(this.instantiationService.createInstance(UserDataProfileExportState, from, { ...options?.resourceTypeFlags, extensions: false }));
|
|
94
94
|
const profileTemplate = await userDataProfilesExportState.getProfileTemplate(options.name ?? from.name, options?.icon);
|
|
@@ -104,7 +104,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
104
104
|
try {
|
|
105
105
|
await creationPromise;
|
|
106
106
|
if (profile && (options?.resourceTypeFlags?.extensions ?? true)) {
|
|
107
|
-
reportProgress(( localize(
|
|
107
|
+
reportProgress(( localize(12221, "Installing Extensions...")));
|
|
108
108
|
await this.instantiationService.createInstance(ExtensionsResource).copy(from, profile, false);
|
|
109
109
|
}
|
|
110
110
|
}
|
|
@@ -128,7 +128,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
128
128
|
sticky: true,
|
|
129
129
|
cancellable: true,
|
|
130
130
|
}, async (progress) => {
|
|
131
|
-
const reportProgress = (message) => progress.report({ message: ( localize(
|
|
131
|
+
const reportProgress = (message) => progress.report({ message: ( localize(12220, "Create Profile: {0}", message)) });
|
|
132
132
|
creationPromise = createCancelablePromise(async (token) => {
|
|
133
133
|
profile = await this.getProfileToImport({ ...profileTemplate, name: options.name ?? profileTemplate.name }, !!options.transient, options);
|
|
134
134
|
if (!profile) {
|
|
@@ -153,42 +153,42 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
153
153
|
}
|
|
154
154
|
async applyProfileTemplate(profileTemplate, profile, options, reportProgress, token) {
|
|
155
155
|
if (profileTemplate.settings && (options.resourceTypeFlags?.settings ?? true) && !profile.useDefaultFlags?.settings) {
|
|
156
|
-
reportProgress(( localize(
|
|
156
|
+
reportProgress(( localize(12222, "Creating Settings...")));
|
|
157
157
|
await this.instantiationService.createInstance(SettingsResource).apply(profileTemplate.settings, profile);
|
|
158
158
|
}
|
|
159
159
|
if (token.isCancellationRequested) {
|
|
160
160
|
return;
|
|
161
161
|
}
|
|
162
162
|
if (profileTemplate.keybindings && (options.resourceTypeFlags?.keybindings ?? true) && !profile.useDefaultFlags?.keybindings) {
|
|
163
|
-
reportProgress(( localize(
|
|
163
|
+
reportProgress(( localize(12223, "Creating Keyboard Shortcuts...")));
|
|
164
164
|
await this.instantiationService.createInstance(KeybindingsResource).apply(profileTemplate.keybindings, profile);
|
|
165
165
|
}
|
|
166
166
|
if (token.isCancellationRequested) {
|
|
167
167
|
return;
|
|
168
168
|
}
|
|
169
169
|
if (profileTemplate.tasks && (options.resourceTypeFlags?.tasks ?? true) && !profile.useDefaultFlags?.tasks) {
|
|
170
|
-
reportProgress(( localize(
|
|
170
|
+
reportProgress(( localize(12224, "Creating Tasks...")));
|
|
171
171
|
await this.instantiationService.createInstance(TasksResource).apply(profileTemplate.tasks, profile);
|
|
172
172
|
}
|
|
173
173
|
if (token.isCancellationRequested) {
|
|
174
174
|
return;
|
|
175
175
|
}
|
|
176
176
|
if (profileTemplate.snippets && (options.resourceTypeFlags?.snippets ?? true) && !profile.useDefaultFlags?.snippets) {
|
|
177
|
-
reportProgress(( localize(
|
|
177
|
+
reportProgress(( localize(12225, "Creating Snippets...")));
|
|
178
178
|
await this.instantiationService.createInstance(SnippetsResource).apply(profileTemplate.snippets, profile);
|
|
179
179
|
}
|
|
180
180
|
if (token.isCancellationRequested) {
|
|
181
181
|
return;
|
|
182
182
|
}
|
|
183
183
|
if (profileTemplate.globalState && !profile.useDefaultFlags?.globalState) {
|
|
184
|
-
reportProgress(( localize(
|
|
184
|
+
reportProgress(( localize(12226, "Applying UI State...")));
|
|
185
185
|
await this.instantiationService.createInstance(GlobalStateResource).apply(profileTemplate.globalState, profile);
|
|
186
186
|
}
|
|
187
187
|
if (token.isCancellationRequested) {
|
|
188
188
|
return;
|
|
189
189
|
}
|
|
190
190
|
if (profileTemplate.extensions && (options.resourceTypeFlags?.extensions ?? true) && !profile.useDefaultFlags?.extensions) {
|
|
191
|
-
reportProgress(( localize(
|
|
191
|
+
reportProgress(( localize(12221, "Installing Extensions...")));
|
|
192
192
|
await this.instantiationService.createInstance(ExtensionsResource).apply(profileTemplate.extensions, profile, reportProgress, token);
|
|
193
193
|
}
|
|
194
194
|
}
|
|
@@ -205,18 +205,18 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
205
205
|
async createTroubleshootProfile() {
|
|
206
206
|
const userDataProfilesExportState = this.instantiationService.createInstance(UserDataProfileExportState, this.userDataProfileService.currentProfile, undefined);
|
|
207
207
|
try {
|
|
208
|
-
const profileTemplate = await userDataProfilesExportState.getProfileTemplate(( localize(
|
|
208
|
+
const profileTemplate = await userDataProfilesExportState.getProfileTemplate(( localize(12227, "Troubleshoot Issue")), undefined);
|
|
209
209
|
await this.progressService.withProgress({
|
|
210
210
|
location: ProgressLocation.Notification,
|
|
211
211
|
delay: 1000,
|
|
212
212
|
sticky: true,
|
|
213
213
|
}, async (progress) => {
|
|
214
|
-
const reportProgress = (message) => progress.report({ message: ( localize(
|
|
214
|
+
const reportProgress = (message) => progress.report({ message: ( localize(12228, "Setting up Troubleshoot Profile: {0}", message)) });
|
|
215
215
|
const profile = await this.doCreateProfile(profileTemplate, true, false, { useDefaultFlags: this.userDataProfileService.currentProfile.useDefaultFlags }, reportProgress);
|
|
216
216
|
if (profile) {
|
|
217
|
-
reportProgress(( localize(
|
|
217
|
+
reportProgress(( localize(12229, "Applying Extensions...")));
|
|
218
218
|
await this.instantiationService.createInstance(ExtensionsResource).copy(this.userDataProfileService.currentProfile, profile, true);
|
|
219
|
-
reportProgress(( localize(
|
|
219
|
+
reportProgress(( localize(12230, "Switching Profile...")));
|
|
220
220
|
await this.userDataProfileManagementService.switchProfile(profile);
|
|
221
221
|
}
|
|
222
222
|
});
|
|
@@ -234,7 +234,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
234
234
|
try {
|
|
235
235
|
await this.progressService.withProgress({
|
|
236
236
|
location,
|
|
237
|
-
title: ( localize(
|
|
237
|
+
title: ( localize(12231, "{0}: Exporting...", PROFILES_CATEGORY.value)),
|
|
238
238
|
}, async (progress) => {
|
|
239
239
|
const id = await this.pickProfileContentHandler(profile.name);
|
|
240
240
|
if (!id) {
|
|
@@ -248,17 +248,17 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
248
248
|
if (!saveResult) {
|
|
249
249
|
return;
|
|
250
250
|
}
|
|
251
|
-
const message = ( localize(
|
|
251
|
+
const message = ( localize(12232, "Profile '{0}' was exported successfully.", profile.name));
|
|
252
252
|
if (profileContentHandler.extensionId) {
|
|
253
253
|
const buttons = [];
|
|
254
254
|
const link = this.productService.webUrl ? `${this.productService.webUrl}/${PROFILE_URL_AUTHORITY}/${id}/${saveResult.id}` : ( toUserDataProfileUri(`/${id}/${saveResult.id}`, this.productService).toString());
|
|
255
255
|
buttons.push({
|
|
256
|
-
label: ( localize(
|
|
256
|
+
label: ( localize(12233, "&&Copy Link")),
|
|
257
257
|
run: () => this.clipboardService.writeText(link)
|
|
258
258
|
});
|
|
259
259
|
if (this.productService.webUrl) {
|
|
260
260
|
buttons.push({
|
|
261
|
-
label: ( localize(
|
|
261
|
+
label: ( localize(12234, "&&Open Link")),
|
|
262
262
|
run: async () => {
|
|
263
263
|
await this.openerService.open(link);
|
|
264
264
|
}
|
|
@@ -266,7 +266,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
266
266
|
}
|
|
267
267
|
else {
|
|
268
268
|
buttons.push({
|
|
269
|
-
label: ( localize(
|
|
269
|
+
label: ( localize(12235, "&&Open in {0}", profileContentHandler.name)),
|
|
270
270
|
run: async () => {
|
|
271
271
|
await this.openerService.open(( saveResult.link.toString()));
|
|
272
272
|
}
|
|
@@ -276,7 +276,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
276
276
|
type: Severity.Info,
|
|
277
277
|
message,
|
|
278
278
|
buttons,
|
|
279
|
-
cancelButton: ( localize(
|
|
279
|
+
cancelButton: ( localize(12236, "Close"))
|
|
280
280
|
});
|
|
281
281
|
}
|
|
282
282
|
else {
|
|
@@ -298,10 +298,10 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
298
298
|
profileTemplate = JSON.parse(profileContent);
|
|
299
299
|
}
|
|
300
300
|
catch (error) {
|
|
301
|
-
throw ( new Error(( localize(
|
|
301
|
+
throw ( new Error(( localize(12237, "This profile is not valid."))));
|
|
302
302
|
}
|
|
303
303
|
if (!isUserDataProfileTemplate(profileTemplate)) {
|
|
304
|
-
throw ( new Error(( localize(
|
|
304
|
+
throw ( new Error(( localize(12237, "This profile is not valid."))));
|
|
305
305
|
}
|
|
306
306
|
if (options?.name) {
|
|
307
307
|
profileTemplate.name = options.name;
|
|
@@ -335,27 +335,27 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
335
335
|
return undefined;
|
|
336
336
|
}
|
|
337
337
|
if (profileTemplate.settings && !profile.useDefaultFlags?.settings) {
|
|
338
|
-
progress(( localize(
|
|
338
|
+
progress(( localize(12238, "Applying Settings...")));
|
|
339
339
|
await this.instantiationService.createInstance(SettingsResource).apply(profileTemplate.settings, profile);
|
|
340
340
|
}
|
|
341
341
|
if (profileTemplate.keybindings && !profile.useDefaultFlags?.keybindings) {
|
|
342
|
-
progress(( localize(
|
|
342
|
+
progress(( localize(12239, "Applying Keyboard Shortcuts...")));
|
|
343
343
|
await this.instantiationService.createInstance(KeybindingsResource).apply(profileTemplate.keybindings, profile);
|
|
344
344
|
}
|
|
345
345
|
if (profileTemplate.tasks && !profile.useDefaultFlags?.tasks) {
|
|
346
|
-
progress(( localize(
|
|
346
|
+
progress(( localize(12240, "Applying Tasks...")));
|
|
347
347
|
await this.instantiationService.createInstance(TasksResource).apply(profileTemplate.tasks, profile);
|
|
348
348
|
}
|
|
349
349
|
if (profileTemplate.snippets && !profile.useDefaultFlags?.snippets) {
|
|
350
|
-
progress(( localize(
|
|
350
|
+
progress(( localize(12241, "Applying Snippets...")));
|
|
351
351
|
await this.instantiationService.createInstance(SnippetsResource).apply(profileTemplate.snippets, profile);
|
|
352
352
|
}
|
|
353
353
|
if (profileTemplate.globalState && !profile.useDefaultFlags?.globalState) {
|
|
354
|
-
progress(( localize(
|
|
354
|
+
progress(( localize(12242, "Applying State...")));
|
|
355
355
|
await this.instantiationService.createInstance(GlobalStateResource).apply(profileTemplate.globalState, profile);
|
|
356
356
|
}
|
|
357
357
|
if (profileTemplate.extensions && extensions && !profile.useDefaultFlags?.extensions) {
|
|
358
|
-
progress(( localize(
|
|
358
|
+
progress(( localize(12229, "Applying Extensions...")));
|
|
359
359
|
await this.instantiationService.createInstance(ExtensionsResource).apply(profileTemplate.extensions, profile);
|
|
360
360
|
}
|
|
361
361
|
return profile;
|
|
@@ -406,7 +406,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
406
406
|
options.push({ id, label: profileContentHandler.name, description: profileContentHandler.description });
|
|
407
407
|
}
|
|
408
408
|
const result = await this.quickInputService.pick(options.reverse(), {
|
|
409
|
-
title: ( localize(
|
|
409
|
+
title: ( localize(12243, "Export '{0}' profile as...", name)),
|
|
410
410
|
hideInput: true
|
|
411
411
|
});
|
|
412
412
|
return result?.id;
|
|
@@ -421,11 +421,11 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
421
421
|
const { confirmed } = await this.dialogService.confirm({
|
|
422
422
|
type: Severity.Info,
|
|
423
423
|
message: ( localize(
|
|
424
|
-
|
|
424
|
+
12244,
|
|
425
425
|
"Profile with name '{0}' already exists. Do you want to replace its contents?",
|
|
426
426
|
profileName
|
|
427
427
|
)),
|
|
428
|
-
primaryButton: ( localize(
|
|
428
|
+
primaryButton: ( localize(12245, "&&Replace"))
|
|
429
429
|
});
|
|
430
430
|
if (!confirmed) {
|
|
431
431
|
return undefined;
|
|
@@ -469,12 +469,12 @@ let FileUserDataProfileContentHandler = class FileUserDataProfileContentHandler
|
|
|
469
469
|
this.fileService = fileService;
|
|
470
470
|
this.productService = productService;
|
|
471
471
|
this.textFileService = textFileService;
|
|
472
|
-
this.name = ( localize(
|
|
473
|
-
this.description = ( localize(
|
|
472
|
+
this.name = ( localize(12246, "Local"));
|
|
473
|
+
this.description = ( localize(12247, "file"));
|
|
474
474
|
}
|
|
475
475
|
async saveProfile(name, content, token) {
|
|
476
476
|
const link = await this.fileDialogService.showSaveDialog({
|
|
477
|
-
title: ( localize(
|
|
477
|
+
title: ( localize(12248, "Save Profile")),
|
|
478
478
|
filters: PROFILE_FILTER,
|
|
479
479
|
defaultUri: this.uriIdentityService.extUri.joinPath(await this.fileDialogService.defaultFilePath(), `${name}.${PROFILE_EXTENSION}`),
|
|
480
480
|
});
|
|
@@ -499,7 +499,7 @@ let FileUserDataProfileContentHandler = class FileUserDataProfileContentHandler
|
|
|
499
499
|
canSelectFiles: true,
|
|
500
500
|
canSelectMany: false,
|
|
501
501
|
filters: PROFILE_FILTER,
|
|
502
|
-
title: ( localize(
|
|
502
|
+
title: ( localize(12249, "Select Profile")),
|
|
503
503
|
});
|
|
504
504
|
return profileLocation ? profileLocation[0] : null;
|
|
505
505
|
}
|
|
@@ -546,13 +546,13 @@ let UserDataProfileImportExportState = class UserDataProfileImportExportState ex
|
|
|
546
546
|
for (const root of this.roots) {
|
|
547
547
|
root.checkbox = {
|
|
548
548
|
isChecked: !root.isFromDefaultProfile(),
|
|
549
|
-
tooltip: ( localize(
|
|
549
|
+
tooltip: ( localize(12250, "Select {0}", root.label.label)),
|
|
550
550
|
accessibilityInformation: {
|
|
551
|
-
label: ( localize(
|
|
551
|
+
label: ( localize(12250, "Select {0}", root.label.label)),
|
|
552
552
|
}
|
|
553
553
|
};
|
|
554
554
|
if (root.isFromDefaultProfile()) {
|
|
555
|
-
root.description = ( localize(
|
|
555
|
+
root.description = ( localize(12251, "From Default Profile"));
|
|
556
556
|
}
|
|
557
557
|
}
|
|
558
558
|
return this.roots;
|
|
@@ -710,11 +710,11 @@ let UserDataProfileExportState = class UserDataProfileExportState extends UserDa
|
|
|
710
710
|
let name = this.profile.name;
|
|
711
711
|
if (this.profile.isDefault) {
|
|
712
712
|
name = await this.quickInputService.input({
|
|
713
|
-
placeHolder: ( localize(
|
|
714
|
-
title: ( localize(
|
|
713
|
+
placeHolder: ( localize(12252, "Name the profile")),
|
|
714
|
+
title: ( localize(12253, "Export Profile")),
|
|
715
715
|
async validateInput(input) {
|
|
716
716
|
if (!input.trim()) {
|
|
717
|
-
return localize(
|
|
717
|
+
return localize(12254, "Profile name must be provided.");
|
|
718
718
|
}
|
|
719
719
|
return undefined;
|
|
720
720
|
},
|
package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.js
CHANGED
|
@@ -43,7 +43,7 @@ let UserDataProfileManagementService = class UserDataProfileManagementService ex
|
|
|
43
43
|
const profileToUse = this.getProfileToUseForCurrentWorkspace();
|
|
44
44
|
this.switchProfile(profileToUse);
|
|
45
45
|
this.changeCurrentProfile(profileToUse, ( localize(
|
|
46
|
-
|
|
46
|
+
12255,
|
|
47
47
|
"The current profile has been removed. Please reload to switch back to default profile"
|
|
48
48
|
)));
|
|
49
49
|
return;
|
|
@@ -54,13 +54,13 @@ let UserDataProfileManagementService = class UserDataProfileManagementService ex
|
|
|
54
54
|
if (profileToUse?.id !== updatedCurrentProfile.id) {
|
|
55
55
|
this.switchProfile(profileToUse);
|
|
56
56
|
this.changeCurrentProfile(profileToUse, ( localize(
|
|
57
|
-
|
|
57
|
+
12256,
|
|
58
58
|
"The current workspace has been removed from the current profile. Please reload to switch back to the updated profile"
|
|
59
59
|
)));
|
|
60
60
|
}
|
|
61
61
|
else {
|
|
62
62
|
this.changeCurrentProfile(updatedCurrentProfile, ( localize(
|
|
63
|
-
|
|
63
|
+
12257,
|
|
64
64
|
"The current profile has been updated. Please reload to switch back to the updated profile"
|
|
65
65
|
)));
|
|
66
66
|
}
|
|
@@ -120,7 +120,7 @@ let UserDataProfileManagementService = class UserDataProfileManagementService ex
|
|
|
120
120
|
throw ( new Error(`Profile ${profile.name} does not exist`));
|
|
121
121
|
}
|
|
122
122
|
if (profile.isDefault) {
|
|
123
|
-
throw ( new Error(( localize(
|
|
123
|
+
throw ( new Error(( localize(12258, "Cannot rename the default profile"))));
|
|
124
124
|
}
|
|
125
125
|
const updatedProfile = await this.userDataProfilesService.updateProfile(profile, updateOptions);
|
|
126
126
|
return updatedProfile;
|
|
@@ -130,7 +130,7 @@ let UserDataProfileManagementService = class UserDataProfileManagementService ex
|
|
|
130
130
|
throw ( new Error(`Profile ${profile.name} does not exist`));
|
|
131
131
|
}
|
|
132
132
|
if (profile.isDefault) {
|
|
133
|
-
throw ( new Error(( localize(
|
|
133
|
+
throw ( new Error(( localize(12259, "Cannot delete the default profile"))));
|
|
134
134
|
}
|
|
135
135
|
await this.userDataProfilesService.removeProfile(profile);
|
|
136
136
|
}
|
|
@@ -173,7 +173,7 @@ let UserDataProfileManagementService = class UserDataProfileManagementService ex
|
|
|
173
173
|
const shouldRestartExtensionHosts = this.userDataProfileService.currentProfile.id !== profile.id || !equals(this.userDataProfileService.currentProfile.useDefaultFlags, profile.useDefaultFlags);
|
|
174
174
|
if (shouldRestartExtensionHosts) {
|
|
175
175
|
if (!isRemoteWindow) {
|
|
176
|
-
if (!(await this.extensionService.stopExtensionHosts(( localize(
|
|
176
|
+
if (!(await this.extensionService.stopExtensionHosts(( localize(12260, "Switching to a profile"))))) {
|
|
177
177
|
if (( this.userDataProfilesService.profiles.some(p => p.id === this.userDataProfileService.currentProfile.id))) {
|
|
178
178
|
await this.userDataProfilesService.setProfileForWorkspace(toWorkspaceIdentifier(this.workspaceContextService.getWorkspace()), this.userDataProfileService.currentProfile);
|
|
179
179
|
}
|
|
@@ -185,8 +185,8 @@ let UserDataProfileManagementService = class UserDataProfileManagementService ex
|
|
|
185
185
|
if (shouldRestartExtensionHosts) {
|
|
186
186
|
if (isRemoteWindow) {
|
|
187
187
|
const { confirmed } = await this.dialogService.confirm({
|
|
188
|
-
message: reloadMessage ?? ( localize(
|
|
189
|
-
primaryButton: ( localize(
|
|
188
|
+
message: reloadMessage ?? ( localize(12261, "Switching a profile requires reloading VS Code.")),
|
|
189
|
+
primaryButton: ( localize(12262, "&&Reload")),
|
|
190
190
|
});
|
|
191
191
|
if (confirmed) {
|
|
192
192
|
await this.hostService.reload();
|