@codingame/monaco-vscode-user-data-profile-service-override 24.2.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 +2 -2
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfile.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfile.js +44 -24
- 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
|
+
14510,
|
|
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(14511, "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(14512, "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(14513, "Select {0} Extension", e.displayName || e.identifier.id)),
|
|
295
295
|
accessibilityInformation: {
|
|
296
|
-
label: ( localize(
|
|
296
|
+
label: ( localize(14513, "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(14514, "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(14515, "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(14516, "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(14517, "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(14518, "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
|
+
14519,
|
|
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(14520, "Tasks")) };
|
|
83
83
|
this.collapsibleState = TreeItemCollapsibleState.Expanded;
|
|
84
84
|
}
|
|
85
85
|
async getChildren() {
|
|
@@ -91,7 +91,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
91
91
|
sticky: true,
|
|
92
92
|
cancellable: true,
|
|
93
93
|
}, async (progress) => {
|
|
94
|
-
const reportProgress = (message) => progress.report({ message: ( localize(
|
|
94
|
+
const reportProgress = (message) => progress.report({ message: ( localize(14521, "Create Profile: {0}", message)) });
|
|
95
95
|
creationPromise = createCancelablePromise(async (token) => {
|
|
96
96
|
const userDataProfilesExportState = disposables.add(this.instantiationService.createInstance(UserDataProfileExportState, from, { ...options?.resourceTypeFlags, extensions: false }));
|
|
97
97
|
const profileTemplate = await userDataProfilesExportState.getProfileTemplate(options.name ?? from.name, options?.icon);
|
|
@@ -107,7 +107,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
107
107
|
try {
|
|
108
108
|
await creationPromise;
|
|
109
109
|
if (profile && (options?.resourceTypeFlags?.extensions ?? true)) {
|
|
110
|
-
reportProgress(( localize(
|
|
110
|
+
reportProgress(( localize(14522, "Installing Extensions...")));
|
|
111
111
|
await this.instantiationService.createInstance(ExtensionsResource).copy(from, profile, false);
|
|
112
112
|
}
|
|
113
113
|
}
|
|
@@ -131,7 +131,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
131
131
|
sticky: true,
|
|
132
132
|
cancellable: true,
|
|
133
133
|
}, async (progress) => {
|
|
134
|
-
const reportProgress = (message) => progress.report({ message: ( localize(
|
|
134
|
+
const reportProgress = (message) => progress.report({ message: ( localize(14521, "Create Profile: {0}", message)) });
|
|
135
135
|
creationPromise = createCancelablePromise(async (token) => {
|
|
136
136
|
profile = await this.getProfileToImport({ ...profileTemplate, name: options.name ?? profileTemplate.name }, !!options.transient, options);
|
|
137
137
|
if (!profile) {
|
|
@@ -156,42 +156,42 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
156
156
|
}
|
|
157
157
|
async applyProfileTemplate(profileTemplate, profile, options, reportProgress, token) {
|
|
158
158
|
if (profileTemplate.settings && (options.resourceTypeFlags?.settings ?? true) && !profile.useDefaultFlags?.settings) {
|
|
159
|
-
reportProgress(( localize(
|
|
159
|
+
reportProgress(( localize(14523, "Creating Settings...")));
|
|
160
160
|
await this.instantiationService.createInstance(SettingsResource).apply(profileTemplate.settings, profile);
|
|
161
161
|
}
|
|
162
162
|
if (token.isCancellationRequested) {
|
|
163
163
|
return;
|
|
164
164
|
}
|
|
165
165
|
if (profileTemplate.keybindings && (options.resourceTypeFlags?.keybindings ?? true) && !profile.useDefaultFlags?.keybindings) {
|
|
166
|
-
reportProgress(( localize(
|
|
166
|
+
reportProgress(( localize(14524, "Creating Keyboard Shortcuts...")));
|
|
167
167
|
await this.instantiationService.createInstance(KeybindingsResource).apply(profileTemplate.keybindings, profile);
|
|
168
168
|
}
|
|
169
169
|
if (token.isCancellationRequested) {
|
|
170
170
|
return;
|
|
171
171
|
}
|
|
172
172
|
if (profileTemplate.tasks && (options.resourceTypeFlags?.tasks ?? true) && !profile.useDefaultFlags?.tasks) {
|
|
173
|
-
reportProgress(( localize(
|
|
173
|
+
reportProgress(( localize(14525, "Creating Tasks...")));
|
|
174
174
|
await this.instantiationService.createInstance(TasksResource).apply(profileTemplate.tasks, profile);
|
|
175
175
|
}
|
|
176
176
|
if (token.isCancellationRequested) {
|
|
177
177
|
return;
|
|
178
178
|
}
|
|
179
179
|
if (profileTemplate.snippets && (options.resourceTypeFlags?.snippets ?? true) && !profile.useDefaultFlags?.snippets) {
|
|
180
|
-
reportProgress(( localize(
|
|
180
|
+
reportProgress(( localize(14526, "Creating Snippets...")));
|
|
181
181
|
await this.instantiationService.createInstance(SnippetsResource).apply(profileTemplate.snippets, profile);
|
|
182
182
|
}
|
|
183
183
|
if (token.isCancellationRequested) {
|
|
184
184
|
return;
|
|
185
185
|
}
|
|
186
186
|
if (profileTemplate.globalState && !profile.useDefaultFlags?.globalState) {
|
|
187
|
-
reportProgress(( localize(
|
|
187
|
+
reportProgress(( localize(14527, "Applying UI State...")));
|
|
188
188
|
await this.instantiationService.createInstance(GlobalStateResource).apply(profileTemplate.globalState, profile);
|
|
189
189
|
}
|
|
190
190
|
if (token.isCancellationRequested) {
|
|
191
191
|
return;
|
|
192
192
|
}
|
|
193
193
|
if (profileTemplate.extensions && (options.resourceTypeFlags?.extensions ?? true) && !profile.useDefaultFlags?.extensions) {
|
|
194
|
-
reportProgress(( localize(
|
|
194
|
+
reportProgress(( localize(14522, "Installing Extensions...")));
|
|
195
195
|
await this.instantiationService.createInstance(ExtensionsResource).apply(profileTemplate.extensions, profile, reportProgress, token);
|
|
196
196
|
}
|
|
197
197
|
}
|
|
@@ -208,18 +208,18 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
208
208
|
async createTroubleshootProfile() {
|
|
209
209
|
const userDataProfilesExportState = this.instantiationService.createInstance(UserDataProfileExportState, this.userDataProfileService.currentProfile, undefined);
|
|
210
210
|
try {
|
|
211
|
-
const profileTemplate = await userDataProfilesExportState.getProfileTemplate(( localize(
|
|
211
|
+
const profileTemplate = await userDataProfilesExportState.getProfileTemplate(( localize(14528, "Troubleshoot Issue")), undefined);
|
|
212
212
|
await this.progressService.withProgress({
|
|
213
213
|
location: ProgressLocation.Notification,
|
|
214
214
|
delay: 1000,
|
|
215
215
|
sticky: true,
|
|
216
216
|
}, async (progress) => {
|
|
217
|
-
const reportProgress = (message) => progress.report({ message: ( localize(
|
|
217
|
+
const reportProgress = (message) => progress.report({ message: ( localize(14529, "Setting up Troubleshoot Profile: {0}", message)) });
|
|
218
218
|
const profile = await this.doCreateProfile(profileTemplate, true, false, { useDefaultFlags: this.userDataProfileService.currentProfile.useDefaultFlags }, reportProgress);
|
|
219
219
|
if (profile) {
|
|
220
|
-
reportProgress(( localize(
|
|
220
|
+
reportProgress(( localize(14530, "Applying Extensions...")));
|
|
221
221
|
await this.instantiationService.createInstance(ExtensionsResource).copy(this.userDataProfileService.currentProfile, profile, true);
|
|
222
|
-
reportProgress(( localize(
|
|
222
|
+
reportProgress(( localize(14531, "Switching Profile...")));
|
|
223
223
|
await this.userDataProfileManagementService.switchProfile(profile);
|
|
224
224
|
}
|
|
225
225
|
});
|
|
@@ -237,7 +237,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
237
237
|
try {
|
|
238
238
|
await this.progressService.withProgress({
|
|
239
239
|
location,
|
|
240
|
-
title: ( localize(
|
|
240
|
+
title: ( localize(14532, "{0}: Exporting...", PROFILES_CATEGORY.value)),
|
|
241
241
|
}, async (progress) => {
|
|
242
242
|
const id = await this.pickProfileContentHandler(profile.name);
|
|
243
243
|
if (!id) {
|
|
@@ -251,17 +251,17 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
251
251
|
if (!saveResult) {
|
|
252
252
|
return;
|
|
253
253
|
}
|
|
254
|
-
const message = ( localize(
|
|
254
|
+
const message = ( localize(14533, "Profile '{0}' was exported successfully.", profile.name));
|
|
255
255
|
if (profileContentHandler.extensionId) {
|
|
256
256
|
const buttons = [];
|
|
257
257
|
const link = this.productService.webUrl ? `${this.productService.webUrl}/${PROFILE_URL_AUTHORITY}/${id}/${saveResult.id}` : ( toUserDataProfileUri(`/${id}/${saveResult.id}`, this.productService).toString());
|
|
258
258
|
buttons.push({
|
|
259
|
-
label: ( localize(
|
|
259
|
+
label: ( localize(14534, "&&Copy Link")),
|
|
260
260
|
run: () => this.clipboardService.writeText(link)
|
|
261
261
|
});
|
|
262
262
|
if (this.productService.webUrl) {
|
|
263
263
|
buttons.push({
|
|
264
|
-
label: ( localize(
|
|
264
|
+
label: ( localize(14535, "&&Open Link")),
|
|
265
265
|
run: async () => {
|
|
266
266
|
await this.openerService.open(link);
|
|
267
267
|
}
|
|
@@ -269,7 +269,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
269
269
|
}
|
|
270
270
|
else {
|
|
271
271
|
buttons.push({
|
|
272
|
-
label: ( localize(
|
|
272
|
+
label: ( localize(14536, "&&Open in {0}", profileContentHandler.name)),
|
|
273
273
|
run: async () => {
|
|
274
274
|
await this.openerService.open(( saveResult.link.toString()));
|
|
275
275
|
}
|
|
@@ -279,7 +279,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
279
279
|
type: Severity.Info,
|
|
280
280
|
message,
|
|
281
281
|
buttons,
|
|
282
|
-
cancelButton: ( localize(
|
|
282
|
+
cancelButton: ( localize(14537, "Close"))
|
|
283
283
|
});
|
|
284
284
|
}
|
|
285
285
|
else {
|
|
@@ -301,10 +301,10 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
301
301
|
profileTemplate = JSON.parse(profileContent);
|
|
302
302
|
}
|
|
303
303
|
catch (error) {
|
|
304
|
-
throw ( new Error(( localize(
|
|
304
|
+
throw ( new Error(( localize(14538, "This profile is not valid."))));
|
|
305
305
|
}
|
|
306
306
|
if (!isUserDataProfileTemplate(profileTemplate)) {
|
|
307
|
-
throw ( new Error(( localize(
|
|
307
|
+
throw ( new Error(( localize(14538, "This profile is not valid."))));
|
|
308
308
|
}
|
|
309
309
|
if (options?.name) {
|
|
310
310
|
profileTemplate.name = options.name;
|
|
@@ -338,27 +338,27 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
338
338
|
return undefined;
|
|
339
339
|
}
|
|
340
340
|
if (profileTemplate.settings && !profile.useDefaultFlags?.settings) {
|
|
341
|
-
progress(( localize(
|
|
341
|
+
progress(( localize(14539, "Applying Settings...")));
|
|
342
342
|
await this.instantiationService.createInstance(SettingsResource).apply(profileTemplate.settings, profile);
|
|
343
343
|
}
|
|
344
344
|
if (profileTemplate.keybindings && !profile.useDefaultFlags?.keybindings) {
|
|
345
|
-
progress(( localize(
|
|
345
|
+
progress(( localize(14540, "Applying Keyboard Shortcuts...")));
|
|
346
346
|
await this.instantiationService.createInstance(KeybindingsResource).apply(profileTemplate.keybindings, profile);
|
|
347
347
|
}
|
|
348
348
|
if (profileTemplate.tasks && !profile.useDefaultFlags?.tasks) {
|
|
349
|
-
progress(( localize(
|
|
349
|
+
progress(( localize(14541, "Applying Tasks...")));
|
|
350
350
|
await this.instantiationService.createInstance(TasksResource).apply(profileTemplate.tasks, profile);
|
|
351
351
|
}
|
|
352
352
|
if (profileTemplate.snippets && !profile.useDefaultFlags?.snippets) {
|
|
353
|
-
progress(( localize(
|
|
353
|
+
progress(( localize(14542, "Applying Snippets...")));
|
|
354
354
|
await this.instantiationService.createInstance(SnippetsResource).apply(profileTemplate.snippets, profile);
|
|
355
355
|
}
|
|
356
356
|
if (profileTemplate.globalState && !profile.useDefaultFlags?.globalState) {
|
|
357
|
-
progress(( localize(
|
|
357
|
+
progress(( localize(14543, "Applying State...")));
|
|
358
358
|
await this.instantiationService.createInstance(GlobalStateResource).apply(profileTemplate.globalState, profile);
|
|
359
359
|
}
|
|
360
360
|
if (profileTemplate.extensions && extensions && !profile.useDefaultFlags?.extensions) {
|
|
361
|
-
progress(( localize(
|
|
361
|
+
progress(( localize(14530, "Applying Extensions...")));
|
|
362
362
|
await this.instantiationService.createInstance(ExtensionsResource).apply(profileTemplate.extensions, profile);
|
|
363
363
|
}
|
|
364
364
|
return profile;
|
|
@@ -409,7 +409,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
409
409
|
options.push({ id, label: profileContentHandler.name, description: profileContentHandler.description });
|
|
410
410
|
}
|
|
411
411
|
const result = await this.quickInputService.pick(options.reverse(), {
|
|
412
|
-
title: ( localize(
|
|
412
|
+
title: ( localize(14544, "Export '{0}' profile as...", name)),
|
|
413
413
|
hideInput: true
|
|
414
414
|
});
|
|
415
415
|
return result?.id;
|
|
@@ -424,11 +424,11 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
424
424
|
const { confirmed } = await this.dialogService.confirm({
|
|
425
425
|
type: Severity.Info,
|
|
426
426
|
message: ( localize(
|
|
427
|
-
|
|
427
|
+
14545,
|
|
428
428
|
"Profile with name '{0}' already exists. Do you want to replace its contents?",
|
|
429
429
|
profileName
|
|
430
430
|
)),
|
|
431
|
-
primaryButton: ( localize(
|
|
431
|
+
primaryButton: ( localize(14546, "&&Replace"))
|
|
432
432
|
});
|
|
433
433
|
if (!confirmed) {
|
|
434
434
|
return undefined;
|
|
@@ -472,12 +472,12 @@ let FileUserDataProfileContentHandler = class FileUserDataProfileContentHandler
|
|
|
472
472
|
this.fileService = fileService;
|
|
473
473
|
this.productService = productService;
|
|
474
474
|
this.textFileService = textFileService;
|
|
475
|
-
this.name = ( localize(
|
|
476
|
-
this.description = ( localize(
|
|
475
|
+
this.name = ( localize(14547, "Local"));
|
|
476
|
+
this.description = ( localize(14548, "file"));
|
|
477
477
|
}
|
|
478
478
|
async saveProfile(name, content, token) {
|
|
479
479
|
const link = await this.fileDialogService.showSaveDialog({
|
|
480
|
-
title: ( localize(
|
|
480
|
+
title: ( localize(14549, "Save Profile")),
|
|
481
481
|
filters: PROFILE_FILTER,
|
|
482
482
|
defaultUri: this.uriIdentityService.extUri.joinPath(await this.fileDialogService.defaultFilePath(), `${name}.${PROFILE_EXTENSION}`),
|
|
483
483
|
});
|
|
@@ -502,7 +502,7 @@ let FileUserDataProfileContentHandler = class FileUserDataProfileContentHandler
|
|
|
502
502
|
canSelectFiles: true,
|
|
503
503
|
canSelectMany: false,
|
|
504
504
|
filters: PROFILE_FILTER,
|
|
505
|
-
title: ( localize(
|
|
505
|
+
title: ( localize(14550, "Select Profile")),
|
|
506
506
|
});
|
|
507
507
|
return profileLocation ? profileLocation[0] : null;
|
|
508
508
|
}
|
|
@@ -550,13 +550,13 @@ let UserDataProfileImportExportState = class UserDataProfileImportExportState ex
|
|
|
550
550
|
const labelText = isMarkdownString(root.label.label) ? root.label.label.value : root.label.label;
|
|
551
551
|
root.checkbox = {
|
|
552
552
|
isChecked: !root.isFromDefaultProfile(),
|
|
553
|
-
tooltip: ( localize(
|
|
553
|
+
tooltip: ( localize(14551, "Select {0}", labelText)),
|
|
554
554
|
accessibilityInformation: {
|
|
555
|
-
label: ( localize(
|
|
555
|
+
label: ( localize(14551, "Select {0}", labelText)),
|
|
556
556
|
}
|
|
557
557
|
};
|
|
558
558
|
if (root.isFromDefaultProfile()) {
|
|
559
|
-
root.description = ( localize(
|
|
559
|
+
root.description = ( localize(14552, "From Default Profile"));
|
|
560
560
|
}
|
|
561
561
|
}
|
|
562
562
|
return this.roots;
|
|
@@ -716,11 +716,11 @@ let UserDataProfileExportState = class UserDataProfileExportState extends UserDa
|
|
|
716
716
|
let name = this.profile.name;
|
|
717
717
|
if (this.profile.isDefault) {
|
|
718
718
|
name = await this.quickInputService.input({
|
|
719
|
-
placeHolder: ( localize(
|
|
720
|
-
title: ( localize(
|
|
719
|
+
placeHolder: ( localize(14553, "Name the profile")),
|
|
720
|
+
title: ( localize(14554, "Export Profile")),
|
|
721
721
|
async validateInput(input) {
|
|
722
722
|
if (!input.trim()) {
|
|
723
|
-
return localize(
|
|
723
|
+
return localize(14555, "Profile name must be provided.");
|
|
724
724
|
}
|
|
725
725
|
return undefined;
|
|
726
726
|
},
|
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
|
+
14556,
|
|
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
|
+
14557,
|
|
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
|
+
14558,
|
|
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(14559, "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(14560, "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(14561, "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(14562, "Switching a profile requires reloading VS Code.")),
|
|
189
|
+
primaryButton: ( localize(14563, "&&Reload")),
|
|
190
190
|
});
|
|
191
191
|
if (confirmed) {
|
|
192
192
|
await this.hostService.reload();
|