@codingame/monaco-vscode-user-data-profile-service-override 21.3.2 → 21.3.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 +13 -13
- 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 +79 -79
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditorModel.js +26 -26
- 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/mcpProfileResource.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
|
+
13842,
|
|
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(13843, "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(13844, "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(13845, "Select {0} Extension", e.displayName || e.identifier.id)),
|
|
295
295
|
accessibilityInformation: {
|
|
296
|
-
label: ( localize(
|
|
296
|
+
label: ( localize(13845, "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(13846, "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(13847, "Keyboard Shortcuts")) };
|
|
84
84
|
this.collapsibleState = TreeItemCollapsibleState.Expanded;
|
|
85
85
|
}
|
|
86
86
|
isFromDefaultProfile() {
|
|
@@ -79,7 +79,7 @@ let McpResourceTreeItem = class McpResourceTreeItem {
|
|
|
79
79
|
this.instantiationService = instantiationService;
|
|
80
80
|
this.type = ProfileResourceType.Mcp;
|
|
81
81
|
this.handle = ProfileResourceType.Mcp;
|
|
82
|
-
this.label = { label: ( localize(
|
|
82
|
+
this.label = { label: ( localize(13848, "MCP Servers")) };
|
|
83
83
|
this.collapsibleState = TreeItemCollapsibleState.Expanded;
|
|
84
84
|
}
|
|
85
85
|
async getChildren() {
|
|
@@ -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(13849, "Settings")) };
|
|
105
105
|
this.collapsibleState = TreeItemCollapsibleState.Expanded;
|
|
106
106
|
}
|
|
107
107
|
async getChildren() {
|
|
@@ -93,7 +93,7 @@ let SnippetsResourceTreeItem = class SnippetsResourceTreeItem {
|
|
|
93
93
|
this.instantiationService = instantiationService;
|
|
94
94
|
this.uriIdentityService = uriIdentityService;
|
|
95
95
|
this.type = ProfileResourceType.Snippets;
|
|
96
|
-
this.label = { label: ( localize(
|
|
96
|
+
this.label = { label: ( localize(13850, "Snippets")) };
|
|
97
97
|
this.collapsibleState = TreeItemCollapsibleState.Collapsed;
|
|
98
98
|
this.excludedSnippets = ( new ResourceSet());
|
|
99
99
|
this.handle = ( this.profile.snippetsHome.toString());
|
|
@@ -121,7 +121,7 @@ let SnippetsResourceTreeItem = class SnippetsResourceTreeItem {
|
|
|
121
121
|
},
|
|
122
122
|
accessibilityInformation: {
|
|
123
123
|
label: ( localize(
|
|
124
|
-
|
|
124
|
+
13851,
|
|
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(13852, "Tasks")) };
|
|
83
83
|
this.collapsibleState = TreeItemCollapsibleState.Expanded;
|
|
84
84
|
}
|
|
85
85
|
async getChildren() {
|
|
@@ -90,7 +90,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
90
90
|
sticky: true,
|
|
91
91
|
cancellable: true,
|
|
92
92
|
}, async (progress) => {
|
|
93
|
-
const reportProgress = (message) => progress.report({ message: ( localize(
|
|
93
|
+
const reportProgress = (message) => progress.report({ message: ( localize(13853, "Create Profile: {0}", message)) });
|
|
94
94
|
creationPromise = createCancelablePromise(async (token) => {
|
|
95
95
|
const userDataProfilesExportState = disposables.add(this.instantiationService.createInstance(UserDataProfileExportState, from, { ...options?.resourceTypeFlags, extensions: false }));
|
|
96
96
|
const profileTemplate = await userDataProfilesExportState.getProfileTemplate(options.name ?? from.name, options?.icon);
|
|
@@ -106,7 +106,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
106
106
|
try {
|
|
107
107
|
await creationPromise;
|
|
108
108
|
if (profile && (options?.resourceTypeFlags?.extensions ?? true)) {
|
|
109
|
-
reportProgress(( localize(
|
|
109
|
+
reportProgress(( localize(13854, "Installing Extensions...")));
|
|
110
110
|
await this.instantiationService.createInstance(ExtensionsResource).copy(from, profile, false);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
@@ -130,7 +130,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
130
130
|
sticky: true,
|
|
131
131
|
cancellable: true,
|
|
132
132
|
}, async (progress) => {
|
|
133
|
-
const reportProgress = (message) => progress.report({ message: ( localize(
|
|
133
|
+
const reportProgress = (message) => progress.report({ message: ( localize(13853, "Create Profile: {0}", message)) });
|
|
134
134
|
creationPromise = createCancelablePromise(async (token) => {
|
|
135
135
|
profile = await this.getProfileToImport({ ...profileTemplate, name: options.name ?? profileTemplate.name }, !!options.transient, options);
|
|
136
136
|
if (!profile) {
|
|
@@ -155,42 +155,42 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
155
155
|
}
|
|
156
156
|
async applyProfileTemplate(profileTemplate, profile, options, reportProgress, token) {
|
|
157
157
|
if (profileTemplate.settings && (options.resourceTypeFlags?.settings ?? true) && !profile.useDefaultFlags?.settings) {
|
|
158
|
-
reportProgress(( localize(
|
|
158
|
+
reportProgress(( localize(13855, "Creating Settings...")));
|
|
159
159
|
await this.instantiationService.createInstance(SettingsResource).apply(profileTemplate.settings, profile);
|
|
160
160
|
}
|
|
161
161
|
if (token.isCancellationRequested) {
|
|
162
162
|
return;
|
|
163
163
|
}
|
|
164
164
|
if (profileTemplate.keybindings && (options.resourceTypeFlags?.keybindings ?? true) && !profile.useDefaultFlags?.keybindings) {
|
|
165
|
-
reportProgress(( localize(
|
|
165
|
+
reportProgress(( localize(13856, "Creating Keyboard Shortcuts...")));
|
|
166
166
|
await this.instantiationService.createInstance(KeybindingsResource).apply(profileTemplate.keybindings, profile);
|
|
167
167
|
}
|
|
168
168
|
if (token.isCancellationRequested) {
|
|
169
169
|
return;
|
|
170
170
|
}
|
|
171
171
|
if (profileTemplate.tasks && (options.resourceTypeFlags?.tasks ?? true) && !profile.useDefaultFlags?.tasks) {
|
|
172
|
-
reportProgress(( localize(
|
|
172
|
+
reportProgress(( localize(13857, "Creating Tasks...")));
|
|
173
173
|
await this.instantiationService.createInstance(TasksResource).apply(profileTemplate.tasks, profile);
|
|
174
174
|
}
|
|
175
175
|
if (token.isCancellationRequested) {
|
|
176
176
|
return;
|
|
177
177
|
}
|
|
178
178
|
if (profileTemplate.snippets && (options.resourceTypeFlags?.snippets ?? true) && !profile.useDefaultFlags?.snippets) {
|
|
179
|
-
reportProgress(( localize(
|
|
179
|
+
reportProgress(( localize(13858, "Creating Snippets...")));
|
|
180
180
|
await this.instantiationService.createInstance(SnippetsResource).apply(profileTemplate.snippets, profile);
|
|
181
181
|
}
|
|
182
182
|
if (token.isCancellationRequested) {
|
|
183
183
|
return;
|
|
184
184
|
}
|
|
185
185
|
if (profileTemplate.globalState && !profile.useDefaultFlags?.globalState) {
|
|
186
|
-
reportProgress(( localize(
|
|
186
|
+
reportProgress(( localize(13859, "Applying UI State...")));
|
|
187
187
|
await this.instantiationService.createInstance(GlobalStateResource).apply(profileTemplate.globalState, profile);
|
|
188
188
|
}
|
|
189
189
|
if (token.isCancellationRequested) {
|
|
190
190
|
return;
|
|
191
191
|
}
|
|
192
192
|
if (profileTemplate.extensions && (options.resourceTypeFlags?.extensions ?? true) && !profile.useDefaultFlags?.extensions) {
|
|
193
|
-
reportProgress(( localize(
|
|
193
|
+
reportProgress(( localize(13854, "Installing Extensions...")));
|
|
194
194
|
await this.instantiationService.createInstance(ExtensionsResource).apply(profileTemplate.extensions, profile, reportProgress, token);
|
|
195
195
|
}
|
|
196
196
|
}
|
|
@@ -207,18 +207,18 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
207
207
|
async createTroubleshootProfile() {
|
|
208
208
|
const userDataProfilesExportState = this.instantiationService.createInstance(UserDataProfileExportState, this.userDataProfileService.currentProfile, undefined);
|
|
209
209
|
try {
|
|
210
|
-
const profileTemplate = await userDataProfilesExportState.getProfileTemplate(( localize(
|
|
210
|
+
const profileTemplate = await userDataProfilesExportState.getProfileTemplate(( localize(13860, "Troubleshoot Issue")), undefined);
|
|
211
211
|
await this.progressService.withProgress({
|
|
212
212
|
location: ProgressLocation.Notification,
|
|
213
213
|
delay: 1000,
|
|
214
214
|
sticky: true,
|
|
215
215
|
}, async (progress) => {
|
|
216
|
-
const reportProgress = (message) => progress.report({ message: ( localize(
|
|
216
|
+
const reportProgress = (message) => progress.report({ message: ( localize(13861, "Setting up Troubleshoot Profile: {0}", message)) });
|
|
217
217
|
const profile = await this.doCreateProfile(profileTemplate, true, false, { useDefaultFlags: this.userDataProfileService.currentProfile.useDefaultFlags }, reportProgress);
|
|
218
218
|
if (profile) {
|
|
219
|
-
reportProgress(( localize(
|
|
219
|
+
reportProgress(( localize(13862, "Applying Extensions...")));
|
|
220
220
|
await this.instantiationService.createInstance(ExtensionsResource).copy(this.userDataProfileService.currentProfile, profile, true);
|
|
221
|
-
reportProgress(( localize(
|
|
221
|
+
reportProgress(( localize(13863, "Switching Profile...")));
|
|
222
222
|
await this.userDataProfileManagementService.switchProfile(profile);
|
|
223
223
|
}
|
|
224
224
|
});
|
|
@@ -236,7 +236,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
236
236
|
try {
|
|
237
237
|
await this.progressService.withProgress({
|
|
238
238
|
location,
|
|
239
|
-
title: ( localize(
|
|
239
|
+
title: ( localize(13864, "{0}: Exporting...", PROFILES_CATEGORY.value)),
|
|
240
240
|
}, async (progress) => {
|
|
241
241
|
const id = await this.pickProfileContentHandler(profile.name);
|
|
242
242
|
if (!id) {
|
|
@@ -250,17 +250,17 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
250
250
|
if (!saveResult) {
|
|
251
251
|
return;
|
|
252
252
|
}
|
|
253
|
-
const message = ( localize(
|
|
253
|
+
const message = ( localize(13865, "Profile '{0}' was exported successfully.", profile.name));
|
|
254
254
|
if (profileContentHandler.extensionId) {
|
|
255
255
|
const buttons = [];
|
|
256
256
|
const link = this.productService.webUrl ? `${this.productService.webUrl}/${PROFILE_URL_AUTHORITY}/${id}/${saveResult.id}` : ( toUserDataProfileUri(`/${id}/${saveResult.id}`, this.productService).toString());
|
|
257
257
|
buttons.push({
|
|
258
|
-
label: ( localize(
|
|
258
|
+
label: ( localize(13866, "&&Copy Link")),
|
|
259
259
|
run: () => this.clipboardService.writeText(link)
|
|
260
260
|
});
|
|
261
261
|
if (this.productService.webUrl) {
|
|
262
262
|
buttons.push({
|
|
263
|
-
label: ( localize(
|
|
263
|
+
label: ( localize(13867, "&&Open Link")),
|
|
264
264
|
run: async () => {
|
|
265
265
|
await this.openerService.open(link);
|
|
266
266
|
}
|
|
@@ -268,7 +268,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
268
268
|
}
|
|
269
269
|
else {
|
|
270
270
|
buttons.push({
|
|
271
|
-
label: ( localize(
|
|
271
|
+
label: ( localize(13868, "&&Open in {0}", profileContentHandler.name)),
|
|
272
272
|
run: async () => {
|
|
273
273
|
await this.openerService.open(( saveResult.link.toString()));
|
|
274
274
|
}
|
|
@@ -278,7 +278,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
278
278
|
type: Severity.Info,
|
|
279
279
|
message,
|
|
280
280
|
buttons,
|
|
281
|
-
cancelButton: ( localize(
|
|
281
|
+
cancelButton: ( localize(13869, "Close"))
|
|
282
282
|
});
|
|
283
283
|
}
|
|
284
284
|
else {
|
|
@@ -300,10 +300,10 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
300
300
|
profileTemplate = JSON.parse(profileContent);
|
|
301
301
|
}
|
|
302
302
|
catch (error) {
|
|
303
|
-
throw ( new Error(( localize(
|
|
303
|
+
throw ( new Error(( localize(13870, "This profile is not valid."))));
|
|
304
304
|
}
|
|
305
305
|
if (!isUserDataProfileTemplate(profileTemplate)) {
|
|
306
|
-
throw ( new Error(( localize(
|
|
306
|
+
throw ( new Error(( localize(13870, "This profile is not valid."))));
|
|
307
307
|
}
|
|
308
308
|
if (options?.name) {
|
|
309
309
|
profileTemplate.name = options.name;
|
|
@@ -337,27 +337,27 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
337
337
|
return undefined;
|
|
338
338
|
}
|
|
339
339
|
if (profileTemplate.settings && !profile.useDefaultFlags?.settings) {
|
|
340
|
-
progress(( localize(
|
|
340
|
+
progress(( localize(13871, "Applying Settings...")));
|
|
341
341
|
await this.instantiationService.createInstance(SettingsResource).apply(profileTemplate.settings, profile);
|
|
342
342
|
}
|
|
343
343
|
if (profileTemplate.keybindings && !profile.useDefaultFlags?.keybindings) {
|
|
344
|
-
progress(( localize(
|
|
344
|
+
progress(( localize(13872, "Applying Keyboard Shortcuts...")));
|
|
345
345
|
await this.instantiationService.createInstance(KeybindingsResource).apply(profileTemplate.keybindings, profile);
|
|
346
346
|
}
|
|
347
347
|
if (profileTemplate.tasks && !profile.useDefaultFlags?.tasks) {
|
|
348
|
-
progress(( localize(
|
|
348
|
+
progress(( localize(13873, "Applying Tasks...")));
|
|
349
349
|
await this.instantiationService.createInstance(TasksResource).apply(profileTemplate.tasks, profile);
|
|
350
350
|
}
|
|
351
351
|
if (profileTemplate.snippets && !profile.useDefaultFlags?.snippets) {
|
|
352
|
-
progress(( localize(
|
|
352
|
+
progress(( localize(13874, "Applying Snippets...")));
|
|
353
353
|
await this.instantiationService.createInstance(SnippetsResource).apply(profileTemplate.snippets, profile);
|
|
354
354
|
}
|
|
355
355
|
if (profileTemplate.globalState && !profile.useDefaultFlags?.globalState) {
|
|
356
|
-
progress(( localize(
|
|
356
|
+
progress(( localize(13875, "Applying State...")));
|
|
357
357
|
await this.instantiationService.createInstance(GlobalStateResource).apply(profileTemplate.globalState, profile);
|
|
358
358
|
}
|
|
359
359
|
if (profileTemplate.extensions && extensions && !profile.useDefaultFlags?.extensions) {
|
|
360
|
-
progress(( localize(
|
|
360
|
+
progress(( localize(13862, "Applying Extensions...")));
|
|
361
361
|
await this.instantiationService.createInstance(ExtensionsResource).apply(profileTemplate.extensions, profile);
|
|
362
362
|
}
|
|
363
363
|
return profile;
|
|
@@ -408,7 +408,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
408
408
|
options.push({ id, label: profileContentHandler.name, description: profileContentHandler.description });
|
|
409
409
|
}
|
|
410
410
|
const result = await this.quickInputService.pick(options.reverse(), {
|
|
411
|
-
title: ( localize(
|
|
411
|
+
title: ( localize(13876, "Export '{0}' profile as...", name)),
|
|
412
412
|
hideInput: true
|
|
413
413
|
});
|
|
414
414
|
return result?.id;
|
|
@@ -423,11 +423,11 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
423
423
|
const { confirmed } = await this.dialogService.confirm({
|
|
424
424
|
type: Severity.Info,
|
|
425
425
|
message: ( localize(
|
|
426
|
-
|
|
426
|
+
13877,
|
|
427
427
|
"Profile with name '{0}' already exists. Do you want to replace its contents?",
|
|
428
428
|
profileName
|
|
429
429
|
)),
|
|
430
|
-
primaryButton: ( localize(
|
|
430
|
+
primaryButton: ( localize(13878, "&&Replace"))
|
|
431
431
|
});
|
|
432
432
|
if (!confirmed) {
|
|
433
433
|
return undefined;
|
|
@@ -471,12 +471,12 @@ let FileUserDataProfileContentHandler = class FileUserDataProfileContentHandler
|
|
|
471
471
|
this.fileService = fileService;
|
|
472
472
|
this.productService = productService;
|
|
473
473
|
this.textFileService = textFileService;
|
|
474
|
-
this.name = ( localize(
|
|
475
|
-
this.description = ( localize(
|
|
474
|
+
this.name = ( localize(13879, "Local"));
|
|
475
|
+
this.description = ( localize(13880, "file"));
|
|
476
476
|
}
|
|
477
477
|
async saveProfile(name, content, token) {
|
|
478
478
|
const link = await this.fileDialogService.showSaveDialog({
|
|
479
|
-
title: ( localize(
|
|
479
|
+
title: ( localize(13881, "Save Profile")),
|
|
480
480
|
filters: PROFILE_FILTER,
|
|
481
481
|
defaultUri: this.uriIdentityService.extUri.joinPath(await this.fileDialogService.defaultFilePath(), `${name}.${PROFILE_EXTENSION}`),
|
|
482
482
|
});
|
|
@@ -501,7 +501,7 @@ let FileUserDataProfileContentHandler = class FileUserDataProfileContentHandler
|
|
|
501
501
|
canSelectFiles: true,
|
|
502
502
|
canSelectMany: false,
|
|
503
503
|
filters: PROFILE_FILTER,
|
|
504
|
-
title: ( localize(
|
|
504
|
+
title: ( localize(13882, "Select Profile")),
|
|
505
505
|
});
|
|
506
506
|
return profileLocation ? profileLocation[0] : null;
|
|
507
507
|
}
|
|
@@ -548,13 +548,13 @@ let UserDataProfileImportExportState = class UserDataProfileImportExportState ex
|
|
|
548
548
|
for (const root of this.roots) {
|
|
549
549
|
root.checkbox = {
|
|
550
550
|
isChecked: !root.isFromDefaultProfile(),
|
|
551
|
-
tooltip: ( localize(
|
|
551
|
+
tooltip: ( localize(13883, "Select {0}", root.label.label)),
|
|
552
552
|
accessibilityInformation: {
|
|
553
|
-
label: ( localize(
|
|
553
|
+
label: ( localize(13883, "Select {0}", root.label.label)),
|
|
554
554
|
}
|
|
555
555
|
};
|
|
556
556
|
if (root.isFromDefaultProfile()) {
|
|
557
|
-
root.description = ( localize(
|
|
557
|
+
root.description = ( localize(13884, "From Default Profile"));
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
560
|
return this.roots;
|
|
@@ -714,11 +714,11 @@ let UserDataProfileExportState = class UserDataProfileExportState extends UserDa
|
|
|
714
714
|
let name = this.profile.name;
|
|
715
715
|
if (this.profile.isDefault) {
|
|
716
716
|
name = await this.quickInputService.input({
|
|
717
|
-
placeHolder: ( localize(
|
|
718
|
-
title: ( localize(
|
|
717
|
+
placeHolder: ( localize(13885, "Name the profile")),
|
|
718
|
+
title: ( localize(13886, "Export Profile")),
|
|
719
719
|
async validateInput(input) {
|
|
720
720
|
if (!input.trim()) {
|
|
721
|
-
return localize(
|
|
721
|
+
return localize(13887, "Profile name must be provided.");
|
|
722
722
|
}
|
|
723
723
|
return undefined;
|
|
724
724
|
},
|
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
|
+
13888,
|
|
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
|
+
13889,
|
|
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
|
+
13890,
|
|
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(13891, "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(13892, "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(13893, "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(13894, "Switching a profile requires reloading VS Code.")),
|
|
189
|
+
primaryButton: ( localize(13895, "&&Reload")),
|
|
190
190
|
});
|
|
191
191
|
if (confirmed) {
|
|
192
192
|
await this.hostService.reload();
|