@codingame/monaco-vscode-user-data-profile-service-override 7.1.1 → 8.0.1
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.js +33 -33
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfileActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditor.js +5 -5
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditorModel.js +5 -5
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileImportExportService.js +12 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-user-data-profile-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.1",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@8.0.1"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -91,7 +91,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
91
91
|
properties: {
|
|
92
92
|
[CONFIG_ENABLE_NEW_PROFILES_UI]: {
|
|
93
93
|
type: 'boolean',
|
|
94
|
-
description: ( localize(
|
|
94
|
+
description: ( localize(8823, "Enables the new profiles UI.")),
|
|
95
95
|
default: this.productService.quality !== 'stable',
|
|
96
96
|
scope: ConfigurationScope.APPLICATION,
|
|
97
97
|
}
|
|
@@ -99,7 +99,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
101
|
registerEditor() {
|
|
102
|
-
( (Registry.as(EditorExtensions.EditorPane))).registerEditorPane(EditorPaneDescriptor.create(UserDataProfilesEditor, UserDataProfilesEditor.ID, ( localize(
|
|
102
|
+
( (Registry.as(EditorExtensions.EditorPane))).registerEditorPane(EditorPaneDescriptor.create(UserDataProfilesEditor, UserDataProfilesEditor.ID, ( localize(8824, "Profiles Editor"))), [
|
|
103
103
|
( (new SyncDescriptor(UserDataProfilesEditorInput)))
|
|
104
104
|
]);
|
|
105
105
|
( (Registry.as(EditorExtensions.EditorFactory))).registerEditorSerializer(UserDataProfilesEditorInput.ID, UserDataProfilesEditorInputSerializer);
|
|
@@ -121,7 +121,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
121
121
|
}
|
|
122
122
|
registerProfileSubMenu() {
|
|
123
123
|
const getProfilesTitle = () => {
|
|
124
|
-
return ( localize(
|
|
124
|
+
return ( localize(8825, "Profile ({0})", this.userDataProfileService.currentProfile.name));
|
|
125
125
|
};
|
|
126
126
|
const when = ( (ContextKeyExpr.or(
|
|
127
127
|
(CONTEXT_ENABLE_NEW_PROFILES_UI.negate()),
|
|
@@ -148,7 +148,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
148
148
|
}
|
|
149
149
|
registerOpenProfileSubMenu() {
|
|
150
150
|
MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
|
|
151
|
-
title: ( localize(
|
|
151
|
+
title: ( localize(8826, "New Window with Profile")),
|
|
152
152
|
submenu: OpenProfileMenu,
|
|
153
153
|
group: '1_new',
|
|
154
154
|
order: 4,
|
|
@@ -197,7 +197,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
197
197
|
constructor() {
|
|
198
198
|
super({
|
|
199
199
|
id: `workbench.profiles.actions.newWindowWithProfile`,
|
|
200
|
-
title: ( localize2(
|
|
200
|
+
title: ( localize2(8827, "New Window with Profile...")),
|
|
201
201
|
category: PROFILES_CATEGORY,
|
|
202
202
|
precondition: HAS_PROFILES_CONTEXT,
|
|
203
203
|
f1: true,
|
|
@@ -211,8 +211,8 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
211
211
|
label: profile.name,
|
|
212
212
|
profile
|
|
213
213
|
})))), {
|
|
214
|
-
title: ( localize(
|
|
215
|
-
placeHolder: ( localize(
|
|
214
|
+
title: ( localize(8828, "New Window with Profile")),
|
|
215
|
+
placeHolder: ( localize(8829, "Select Profile")),
|
|
216
216
|
canPickMany: false
|
|
217
217
|
});
|
|
218
218
|
if (pick) {
|
|
@@ -228,7 +228,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
228
228
|
constructor() {
|
|
229
229
|
super({
|
|
230
230
|
id,
|
|
231
|
-
title: ( localize2(
|
|
231
|
+
title: ( localize2(8830, "{0}", profile.name)),
|
|
232
232
|
menu: {
|
|
233
233
|
id: OpenProfileMenu,
|
|
234
234
|
group: '0_profiles',
|
|
@@ -245,7 +245,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
245
245
|
command: {
|
|
246
246
|
id,
|
|
247
247
|
category: PROFILES_CATEGORY,
|
|
248
|
-
title: ( localize2(
|
|
248
|
+
title: ( localize2(8831, "Open {0} Profile", profile.name)),
|
|
249
249
|
precondition: HAS_PROFILES_CONTEXT
|
|
250
250
|
},
|
|
251
251
|
}));
|
|
@@ -256,7 +256,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
256
256
|
constructor() {
|
|
257
257
|
super({
|
|
258
258
|
id: `workbench.profiles.actions.switchProfile`,
|
|
259
|
-
title: ( localize2(
|
|
259
|
+
title: ( localize2(8832, 'Switch Profile...')),
|
|
260
260
|
category: PROFILES_CATEGORY,
|
|
261
261
|
f1: true,
|
|
262
262
|
precondition: PROFILES_ENABLEMENT_CONTEXT,
|
|
@@ -271,7 +271,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
271
271
|
action,
|
|
272
272
|
label: action.checked ? `$(check) ${action.label}` : action.label,
|
|
273
273
|
})))), {
|
|
274
|
-
placeHolder: ( localize(
|
|
274
|
+
placeHolder: ( localize(8833, "Select Profile"))
|
|
275
275
|
});
|
|
276
276
|
await result?.action.run();
|
|
277
277
|
}
|
|
@@ -291,8 +291,8 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
291
291
|
super({
|
|
292
292
|
id: `workbench.profiles.actions.manageProfiles`,
|
|
293
293
|
title: {
|
|
294
|
-
...( localize2(
|
|
295
|
-
mnemonicTitle: ( localize(
|
|
294
|
+
...( localize2(8834, "Profiles")),
|
|
295
|
+
mnemonicTitle: ( localize(8835, "&&Profiles")),
|
|
296
296
|
},
|
|
297
297
|
menu: [
|
|
298
298
|
{
|
|
@@ -331,7 +331,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
331
331
|
command: {
|
|
332
332
|
id: 'workbench.profiles.actions.manageProfiles',
|
|
333
333
|
category: Categories.Preferences,
|
|
334
|
-
title: ( localize2(
|
|
334
|
+
title: ( localize2(8836, "Open Profiles (UI)")),
|
|
335
335
|
precondition: CONTEXT_ENABLE_NEW_PROFILES_UI,
|
|
336
336
|
},
|
|
337
337
|
}));
|
|
@@ -347,7 +347,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
347
347
|
)), (IS_CURRENT_PROFILE_TRANSIENT_CONTEXT.toNegated()))));
|
|
348
348
|
super({
|
|
349
349
|
id: `workbench.profiles.actions.editCurrentProfile`,
|
|
350
|
-
title: ( localize2(
|
|
350
|
+
title: ( localize2(8837, "Edit Profile...")),
|
|
351
351
|
precondition,
|
|
352
352
|
f1: true,
|
|
353
353
|
menu: [
|
|
@@ -376,7 +376,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
376
376
|
constructor() {
|
|
377
377
|
super({
|
|
378
378
|
id,
|
|
379
|
-
title: ( localize2(
|
|
379
|
+
title: ( localize2(8838, "Show Profile Contents")),
|
|
380
380
|
category: PROFILES_CATEGORY,
|
|
381
381
|
menu: [
|
|
382
382
|
{
|
|
@@ -402,7 +402,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
402
402
|
constructor() {
|
|
403
403
|
super({
|
|
404
404
|
id,
|
|
405
|
-
title: ( localize2(
|
|
405
|
+
title: ( localize2(8839, "Export Profile...")),
|
|
406
406
|
category: PROFILES_CATEGORY,
|
|
407
407
|
precondition: ( (IS_PROFILE_EXPORT_IN_PROGRESS_CONTEXT.toNegated())),
|
|
408
408
|
menu: [
|
|
@@ -430,7 +430,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
430
430
|
command: {
|
|
431
431
|
id,
|
|
432
432
|
title: ( localize2(
|
|
433
|
-
|
|
433
|
+
8840,
|
|
434
434
|
"Export Profile ({0})...",
|
|
435
435
|
that.userDataProfileService.currentProfile.name
|
|
436
436
|
)),
|
|
@@ -447,7 +447,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
447
447
|
constructor() {
|
|
448
448
|
super({
|
|
449
449
|
id,
|
|
450
|
-
title: ( localize2(
|
|
450
|
+
title: ( localize2(8841, "Import Profile...")),
|
|
451
451
|
category: PROFILES_CATEGORY,
|
|
452
452
|
precondition: ( (IS_PROFILE_IMPORT_IN_PROGRESS_CONTEXT.toNegated())),
|
|
453
453
|
menu: [
|
|
@@ -477,19 +477,19 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
477
477
|
const updateQuickPickItems = (value) => {
|
|
478
478
|
const quickPickItems = [];
|
|
479
479
|
if (value) {
|
|
480
|
-
quickPickItems.push({ label: quickPick.value, description: ( localize(
|
|
480
|
+
quickPickItems.push({ label: quickPick.value, description: ( localize(8842, "Import from URL")) });
|
|
481
481
|
}
|
|
482
|
-
quickPickItems.push({ label: ( localize(
|
|
482
|
+
quickPickItems.push({ label: ( localize(8843, "Select File...")) });
|
|
483
483
|
if (profileTemplateQuickPickItems.length) {
|
|
484
484
|
quickPickItems.push({
|
|
485
485
|
type: 'separator',
|
|
486
|
-
label: ( localize(
|
|
486
|
+
label: ( localize(8844, "Profile Templates"))
|
|
487
487
|
}, ...profileTemplateQuickPickItems);
|
|
488
488
|
}
|
|
489
489
|
quickPick.items = quickPickItems;
|
|
490
490
|
};
|
|
491
|
-
quickPick.title = ( localize(
|
|
492
|
-
quickPick.placeholder = ( localize(
|
|
491
|
+
quickPick.title = ( localize(8845, "Import from Profile Template..."));
|
|
492
|
+
quickPick.placeholder = ( localize(8846, "Provide Profile Template URL"));
|
|
493
493
|
quickPick.ignoreFocusOut = true;
|
|
494
494
|
disposables.add(quickPick.onDidChangeValue(updateQuickPickItems));
|
|
495
495
|
updateQuickPickItems();
|
|
@@ -511,7 +511,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
511
511
|
}
|
|
512
512
|
}
|
|
513
513
|
catch (error) {
|
|
514
|
-
notificationService.error(( localize(
|
|
514
|
+
notificationService.error(( localize(8847, "Error while creating profile: {0}", getErrorMessage(error))));
|
|
515
515
|
}
|
|
516
516
|
}));
|
|
517
517
|
disposables.add(quickPick.onDidHide(() => disposables.dispose()));
|
|
@@ -523,7 +523,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
523
523
|
canSelectFiles: true,
|
|
524
524
|
canSelectMany: false,
|
|
525
525
|
filters: PROFILE_FILTER,
|
|
526
|
-
title: ( localize(
|
|
526
|
+
title: ( localize(8848, "Select Profile Template File")),
|
|
527
527
|
});
|
|
528
528
|
if (!profileLocation) {
|
|
529
529
|
return null;
|
|
@@ -534,7 +534,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
534
534
|
disposables.add(MenuRegistry.appendMenuItem(MenuId.MenubarShare, {
|
|
535
535
|
command: {
|
|
536
536
|
id,
|
|
537
|
-
title: ( localize2(
|
|
537
|
+
title: ( localize2(8849, "Import Profile...")),
|
|
538
538
|
precondition: PROFILES_ENABLEMENT_CONTEXT,
|
|
539
539
|
},
|
|
540
540
|
}));
|
|
@@ -546,7 +546,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
546
546
|
constructor() {
|
|
547
547
|
super({
|
|
548
548
|
id: 'workbench.profiles.actions.createFromCurrentProfile',
|
|
549
|
-
title: ( localize2(
|
|
549
|
+
title: ( localize2(8850, "Save Current Profile As...")),
|
|
550
550
|
category: PROFILES_CATEGORY,
|
|
551
551
|
f1: true,
|
|
552
552
|
precondition: PROFILES_ENABLEMENT_CONTEXT
|
|
@@ -563,7 +563,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
563
563
|
constructor() {
|
|
564
564
|
super({
|
|
565
565
|
id: 'workbench.profiles.actions.createProfile',
|
|
566
|
-
title: ( localize2(
|
|
566
|
+
title: ( localize2(8851, "New Profile...")),
|
|
567
567
|
category: PROFILES_CATEGORY,
|
|
568
568
|
precondition: PROFILES_ENABLEMENT_CONTEXT,
|
|
569
569
|
f1: true,
|
|
@@ -601,7 +601,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
601
601
|
constructor() {
|
|
602
602
|
super({
|
|
603
603
|
id: 'workbench.profiles.actions.deleteProfile',
|
|
604
|
-
title: ( localize2(
|
|
604
|
+
title: ( localize2(8852, "Delete Profile...")),
|
|
605
605
|
category: PROFILES_CATEGORY,
|
|
606
606
|
f1: true,
|
|
607
607
|
precondition: ( (ContextKeyExpr.and(PROFILES_ENABLEMENT_CONTEXT, HAS_PROFILES_CONTEXT))),
|
|
@@ -628,11 +628,11 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
628
628
|
if (profiles.length) {
|
|
629
629
|
const picks = await quickInputService.pick(( (profiles.map(profile => ({
|
|
630
630
|
label: profile.name,
|
|
631
|
-
description: profile.id === userDataProfileService.currentProfile.id ? ( localize(
|
|
631
|
+
description: profile.id === userDataProfileService.currentProfile.id ? ( localize(8853, "Current")) : undefined,
|
|
632
632
|
profile
|
|
633
633
|
})))), {
|
|
634
|
-
title: ( localize(
|
|
635
|
-
placeHolder: ( localize(
|
|
634
|
+
title: ( localize(8854, "Delete Profile...")),
|
|
635
|
+
placeHolder: ( localize(8855, "Select Profiles to Delete")),
|
|
636
636
|
canPickMany: true
|
|
637
637
|
});
|
|
638
638
|
if (picks) {
|
|
@@ -16,7 +16,7 @@ import { IUserDataProfileManagementService, IUserDataProfileService } from 'vsco
|
|
|
16
16
|
|
|
17
17
|
class CreateTransientProfileAction extends Action2 {
|
|
18
18
|
static { this.ID = 'workbench.profiles.actions.createTemporaryProfile'; }
|
|
19
|
-
static { this.TITLE = ( localize2(
|
|
19
|
+
static { this.TITLE = ( localize2(8813, "Create a Temporary Profile")); }
|
|
20
20
|
constructor() {
|
|
21
21
|
super({
|
|
22
22
|
id: CreateTransientProfileAction.ID,
|
|
@@ -36,7 +36,7 @@ class RenameProfileAction extends Action2 {
|
|
|
36
36
|
constructor() {
|
|
37
37
|
super({
|
|
38
38
|
id: RenameProfileAction.ID,
|
|
39
|
-
title: ( localize2(
|
|
39
|
+
title: ( localize2(8814, "Rename...")),
|
|
40
40
|
category: PROFILES_CATEGORY,
|
|
41
41
|
f1: true,
|
|
42
42
|
precondition: ( (ContextKeyExpr.and(PROFILES_ENABLEMENT_CONTEXT, HAS_PROFILES_CONTEXT))),
|
|
@@ -56,10 +56,10 @@ class RenameProfileAction extends Action2 {
|
|
|
56
56
|
}
|
|
57
57
|
const name = await quickInputService.input({
|
|
58
58
|
value: profile.name,
|
|
59
|
-
title: ( localize(
|
|
59
|
+
title: ( localize(8815, 'Rename {0}', profile.name)),
|
|
60
60
|
validateInput: async (value) => {
|
|
61
61
|
if (profile.name !== value && ( (userDataProfilesService.profiles.some(p => p.name === value)))) {
|
|
62
|
-
return ( localize(
|
|
62
|
+
return ( localize(8816, "Profile with name {0} already exists.", value));
|
|
63
63
|
}
|
|
64
64
|
return undefined;
|
|
65
65
|
}
|
|
@@ -80,11 +80,11 @@ class RenameProfileAction extends Action2 {
|
|
|
80
80
|
}
|
|
81
81
|
const pick = await quickInputService.pick(( (profiles.map(profile => ({
|
|
82
82
|
label: profile.name,
|
|
83
|
-
description: profile.id === userDataProfileService.currentProfile.id ? ( localize(
|
|
83
|
+
description: profile.id === userDataProfileService.currentProfile.id ? ( localize(8817, "Current")) : undefined,
|
|
84
84
|
profile
|
|
85
85
|
})))), {
|
|
86
|
-
title: ( localize(
|
|
87
|
-
placeHolder: ( localize(
|
|
86
|
+
title: ( localize(8818, "Rename Profile...")),
|
|
87
|
+
placeHolder: ( localize(8819, "Select Profile to Rename")),
|
|
88
88
|
});
|
|
89
89
|
return pick?.profile;
|
|
90
90
|
}
|
|
@@ -94,7 +94,7 @@ registerAction2(class ManageProfilesAction extends Action2 {
|
|
|
94
94
|
constructor() {
|
|
95
95
|
super({
|
|
96
96
|
id: MANAGE_PROFILES_ACTION_ID,
|
|
97
|
-
title: ( localize2(
|
|
97
|
+
title: ( localize2(8820, "Manage...")),
|
|
98
98
|
category: PROFILES_CATEGORY,
|
|
99
99
|
precondition: ( (ContextKeyExpr.and(PROFILES_ENABLEMENT_CONTEXT, HAS_PROFILES_CONTEXT))),
|
|
100
100
|
});
|
|
@@ -128,7 +128,7 @@ registerAction2(class CleanupProfilesAction extends Action2 {
|
|
|
128
128
|
constructor() {
|
|
129
129
|
super({
|
|
130
130
|
id: 'workbench.profiles.actions.cleanupProfiles',
|
|
131
|
-
title: ( localize2(
|
|
131
|
+
title: ( localize2(8821, "Cleanup Profiles")),
|
|
132
132
|
category: Categories.Developer,
|
|
133
133
|
f1: true,
|
|
134
134
|
precondition: PROFILES_ENABLEMENT_CONTEXT,
|
|
@@ -142,7 +142,7 @@ registerAction2(class ResetWorkspacesAction extends Action2 {
|
|
|
142
142
|
constructor() {
|
|
143
143
|
super({
|
|
144
144
|
id: 'workbench.profiles.actions.resetWorkspaces',
|
|
145
|
-
title: ( localize2(
|
|
145
|
+
title: ( localize2(8822, "Reset Workspace Profiles Associations")),
|
|
146
146
|
category: Categories.Developer,
|
|
147
147
|
f1: true,
|
|
148
148
|
precondition: PROFILES_ENABLEMENT_CONTEXT,
|
|
@@ -243,7 +243,7 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
243
243
|
actions.push(( (new SubmenuAction('from.template', ( localize(10925, "New Profile From Template")), templateActions))));
|
|
244
244
|
}
|
|
245
245
|
actions.push(( (new Separator())));
|
|
246
|
-
actions.push(( (new Action('importProfile', ( localize(
|
|
246
|
+
actions.push(( (new Action('importProfile', ( localize(10923, "Import Profile...")), undefined, true, () => this.importProfile()))));
|
|
247
247
|
return actions;
|
|
248
248
|
}
|
|
249
249
|
async importProfile() {
|
|
@@ -1038,7 +1038,7 @@ let ContentsProfileRenderer = class ContentsProfileRenderer extends ProfilePrope
|
|
|
1038
1038
|
const contentsDescriptionElement = append(configureRowContainer, $('.profile-description-element'));
|
|
1039
1039
|
const contentsTreeHeader = append(configureRowContainer, $('.profile-content-tree-header'));
|
|
1040
1040
|
const optionsLabel = $('.options-header', undefined, $('span', undefined, ( localize(10953, "Source"))));
|
|
1041
|
-
append(contentsTreeHeader, $(''), $('', undefined, ( localize(
|
|
1041
|
+
append(contentsTreeHeader, $(''), $('', undefined, ( localize(10952, "Contents"))), optionsLabel, $('.actions-header', undefined, ( localize(10954, "Actions"))));
|
|
1042
1042
|
const delegate = ( (new ProfileContentTreeElementDelegate()));
|
|
1043
1043
|
const profilesContentTree = this.profilesContentTree = disposables.add(this.instantiationService.createInstance((WorkbenchAsyncDataTree), 'ProfileEditor-ContentsTree', append(configureRowContainer, $('.profile-content-tree.file-icon-themable-tree.show-file-icons')), delegate, [
|
|
1044
1044
|
this.instantiationService.createInstance(ExistingProfileResourceTreeRenderer),
|
|
@@ -1275,8 +1275,8 @@ let NewProfileResourceTreeRenderer = class NewProfileResourceTreeRenderer extend
|
|
|
1275
1275
|
templateData.label.textContent = resourceTypeTitle;
|
|
1276
1276
|
const renderRadioItems = () => {
|
|
1277
1277
|
const options = [{
|
|
1278
|
-
text: ( localize(
|
|
1279
|
-
tooltip: ( localize(
|
|
1278
|
+
text: ( localize(10961, "Default")),
|
|
1279
|
+
tooltip: ( localize(10962, "Use {0} from the Default profile", resourceTypeTitle)),
|
|
1280
1280
|
},
|
|
1281
1281
|
{
|
|
1282
1282
|
text: ( localize(10964, "None")),
|
|
@@ -1284,7 +1284,7 @@ let NewProfileResourceTreeRenderer = class NewProfileResourceTreeRenderer extend
|
|
|
1284
1284
|
}];
|
|
1285
1285
|
const copyFromName = root.getCopyFromName();
|
|
1286
1286
|
const name = copyFromName === this.userDataProfilesService.defaultProfile.name
|
|
1287
|
-
? ( localize(
|
|
1287
|
+
? ( localize(10957, "{0} (Copy)", copyFromName))
|
|
1288
1288
|
: copyFromName;
|
|
1289
1289
|
if (root.copyFrom && name) {
|
|
1290
1290
|
templateData.radio.setItems([
|
package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditorModel.js
CHANGED
|
@@ -677,15 +677,15 @@ let UserDataProfilesEditorModel = class UserDataProfilesEditorModel extends Edit
|
|
|
677
677
|
const cancellationTokenSource = ( (new CancellationTokenSource()));
|
|
678
678
|
disposables.add(toDisposable(() => cancellationTokenSource.dispose(true)));
|
|
679
679
|
const createAction = disposables.add(( (new Action('userDataProfile.create', ( localize(11422, "Create")), undefined, true, () => this.saveNewProfile(false, cancellationTokenSource.token)))));
|
|
680
|
-
const cancelAction = disposables.add(( (new Action('userDataProfile.cancel', ( localize(
|
|
680
|
+
const cancelAction = disposables.add(( (new Action('userDataProfile.cancel', ( localize(11421, "Cancel")), ThemeIcon.asClassName(Codicon.trash), true, () => this.discardNewProfile()))));
|
|
681
681
|
const previewProfileAction = disposables.add(( (new Action('userDataProfile.preview', ( localize(11423, "Preview")), ThemeIcon.asClassName(Codicon.openPreview), true, () => this.previewNewProfile(cancellationTokenSource.token)))));
|
|
682
|
-
this.newProfileElement = disposables.add(this.instantiationService.createInstance(NewProfileElement, copyFrom ? '' : ( localize(
|
|
682
|
+
this.newProfileElement = disposables.add(this.instantiationService.createInstance(NewProfileElement, copyFrom ? '' : ( localize(11412, "Untitled")), copyFrom, [[createAction], [cancelAction, previewProfileAction]], [[cancelAction], []]));
|
|
683
683
|
const updateCreateActionLabel = () => {
|
|
684
684
|
if (this.newProfileElement?.copyFrom && ( (this.userDataProfilesService.profiles.some(p => p.name === this.newProfileElement?.name)))) {
|
|
685
685
|
createAction.label = ( localize(11424, "Replace"));
|
|
686
686
|
}
|
|
687
687
|
else {
|
|
688
|
-
createAction.label = ( localize(
|
|
688
|
+
createAction.label = ( localize(11422, "Create"));
|
|
689
689
|
}
|
|
690
690
|
};
|
|
691
691
|
updateCreateActionLabel();
|
|
@@ -824,8 +824,8 @@ let UserDataProfilesEditorModel = class UserDataProfilesEditorModel extends Edit
|
|
|
824
824
|
const result = await this.dialogService.confirm({
|
|
825
825
|
type: 'info',
|
|
826
826
|
message: ( localize(11425, "Are you sure you want to delete the profile '{0}'?", profile.name)),
|
|
827
|
-
primaryButton: ( localize(
|
|
828
|
-
cancelButton: ( localize(
|
|
827
|
+
primaryButton: ( localize(11416, "Delete")),
|
|
828
|
+
cancelButton: ( localize(11421, "Cancel"))
|
|
829
829
|
});
|
|
830
830
|
if (result.confirmed) {
|
|
831
831
|
await this.userDataProfileManagementService.removeProfile(profile);
|
|
@@ -257,7 +257,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
257
257
|
sticky: true,
|
|
258
258
|
cancellable: true,
|
|
259
259
|
}, async (progress) => {
|
|
260
|
-
const reportProgress = (message) => progress.report({ message: ( localize(
|
|
260
|
+
const reportProgress = (message) => progress.report({ message: ( localize(3666, "Create Profile: {0}", message)) });
|
|
261
261
|
creationPromise = createCancelablePromise(async (token) => {
|
|
262
262
|
profile = await this.getProfileToImport({ ...profileTemplate, name: options.name ?? profileTemplate.name }, !!options.transient, options);
|
|
263
263
|
if (!profile) {
|
|
@@ -317,7 +317,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
317
317
|
return;
|
|
318
318
|
}
|
|
319
319
|
if (profileTemplate.extensions && (options.resourceTypeFlags?.extensions ?? true) && !profile.useDefaultFlags?.extensions) {
|
|
320
|
-
reportProgress(( localize(
|
|
320
|
+
reportProgress(( localize(3667, "Installing Extensions...")));
|
|
321
321
|
await this.instantiationService.createInstance(ExtensionsResource).apply(profileTemplate.extensions, profile, reportProgress, token);
|
|
322
322
|
}
|
|
323
323
|
}
|
|
@@ -572,7 +572,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
572
572
|
else if (isUserDataProfileTemplate(source)) {
|
|
573
573
|
source.name = result.name;
|
|
574
574
|
this.telemetryService.publicLog2('userDataProfile.createFromExternalTemplate', createProfileTelemetryData);
|
|
575
|
-
await this.createAndSwitch(source, false, true, { useDefaultFlags, icon: result.icon ? result.icon : undefined }, ( localize(
|
|
575
|
+
await this.createAndSwitch(source, false, true, { useDefaultFlags, icon: result.icon ? result.icon : undefined }, ( localize(3665, "Create Profile")));
|
|
576
576
|
}
|
|
577
577
|
else {
|
|
578
578
|
this.telemetryService.publicLog2('userDataProfile.createEmptyProfile', createProfileTelemetryData);
|
|
@@ -634,7 +634,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
634
634
|
delay: 500,
|
|
635
635
|
sticky: true,
|
|
636
636
|
}, async (progress) => {
|
|
637
|
-
const reportProgress = (message) => progress.report({ message: ( localize(
|
|
637
|
+
const reportProgress = (message) => progress.report({ message: ( localize(3666, "Create Profile: {0}", message)) });
|
|
638
638
|
const createdProfile = await this.doCreateProfile(profileTemplate, false, false, { useDefaultFlags: options?.useDefaultFlags, icon: options?.icon, transient: options?.transient }, reportProgress);
|
|
639
639
|
if (createdProfile) {
|
|
640
640
|
if (options?.resourceTypeFlags?.extensions ?? true) {
|
|
@@ -662,9 +662,9 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
662
662
|
const reportProgress = (message) => progress.report({ message: ( localize(3700, "Setting up Troubleshoot Profile: {0}", message)) });
|
|
663
663
|
const profile = await this.doCreateProfile(profileTemplate, true, false, { useDefaultFlags: this.userDataProfileService.currentProfile.useDefaultFlags }, reportProgress);
|
|
664
664
|
if (profile) {
|
|
665
|
-
reportProgress(( localize(
|
|
665
|
+
reportProgress(( localize(3697, "Applying Extensions...")));
|
|
666
666
|
await this.instantiationService.createInstance(ExtensionsResource).copy(this.userDataProfileService.currentProfile, profile, true);
|
|
667
|
-
reportProgress(( localize(
|
|
667
|
+
reportProgress(( localize(3698, "Switching Profile...")));
|
|
668
668
|
await this.userDataProfileManagementService.switchProfile(profile);
|
|
669
669
|
}
|
|
670
670
|
});
|
|
@@ -726,7 +726,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
726
726
|
type: Severity$1.Info,
|
|
727
727
|
message,
|
|
728
728
|
buttons,
|
|
729
|
-
cancelButton: ( localize(
|
|
729
|
+
cancelButton: ( localize(3696, "Close"))
|
|
730
730
|
});
|
|
731
731
|
}
|
|
732
732
|
else {
|
|
@@ -784,7 +784,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
784
784
|
try {
|
|
785
785
|
const userDataProfileImportState = disposables.add(this.instantiationService.createInstance(UserDataProfileImportState, profileTemplate));
|
|
786
786
|
profileTemplate = await userDataProfileImportState.getProfileTemplateToImport();
|
|
787
|
-
const importedProfile = await this.createAndSwitch(profileTemplate, true, false, options, ( localize(
|
|
787
|
+
const importedProfile = await this.createAndSwitch(profileTemplate, true, false, options, ( localize(3663, "Preview Profile")));
|
|
788
788
|
if (!importedProfile) {
|
|
789
789
|
return;
|
|
790
790
|
}
|
|
@@ -795,7 +795,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
795
795
|
: importAction;
|
|
796
796
|
const secondaryAction = isWeb
|
|
797
797
|
? importAction
|
|
798
|
-
: ( (new BarrierAction(barrier, (new Action('close', ( localize(
|
|
798
|
+
: ( (new BarrierAction(barrier, (new Action('close', ( localize(3696, "Close")))), this.notificationService)));
|
|
799
799
|
const view = await this.showProfilePreviewView(IMPORT_PROFILE_PREVIEW_VIEW, importedProfile.name, primaryAction, secondaryAction, false, userDataProfileImportState);
|
|
800
800
|
const message = ( (new MarkdownString()));
|
|
801
801
|
message.appendMarkdown(( localize(
|
|
@@ -856,7 +856,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
856
856
|
try {
|
|
857
857
|
const userDataProfileImportState = disposables.add(this.instantiationService.createInstance(UserDataProfileImportState, profileTemplate));
|
|
858
858
|
if (userDataProfileImportState.isEmpty()) {
|
|
859
|
-
await this.createAndSwitch(profileTemplate, false, true, options, ( localize(
|
|
859
|
+
await this.createAndSwitch(profileTemplate, false, true, options, ( localize(3665, "Create Profile")));
|
|
860
860
|
}
|
|
861
861
|
else {
|
|
862
862
|
const barrier = ( (new Barrier()));
|
|
@@ -893,7 +893,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
893
893
|
const reportProgress = (message) => progress.report({ message: `${title}: ${message}` });
|
|
894
894
|
const profile = await this.doCreateProfile(profileTemplate, temporaryProfile, extensions, options, reportProgress);
|
|
895
895
|
if (profile) {
|
|
896
|
-
reportProgress(( localize(
|
|
896
|
+
reportProgress(( localize(3698, "Switching Profile...")));
|
|
897
897
|
await this.userDataProfileManagementService.switchProfile(profile);
|
|
898
898
|
}
|
|
899
899
|
return profile;
|
|
@@ -925,7 +925,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
925
925
|
await this.instantiationService.createInstance(GlobalStateResource).apply(profileTemplate.globalState, profile);
|
|
926
926
|
}
|
|
927
927
|
if (profileTemplate.extensions && extensions && !profile.useDefaultFlags?.extensions) {
|
|
928
|
-
progress(( localize(
|
|
928
|
+
progress(( localize(3697, "Applying Extensions...")));
|
|
929
929
|
await this.instantiationService.createInstance(ExtensionsResource).apply(profileTemplate.extensions, profile);
|
|
930
930
|
}
|
|
931
931
|
return profile;
|