@codingame/monaco-vscode-user-data-profile-service-override 11.0.0 → 11.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 +3 -3
- 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/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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-user-data-profile-service-override",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.1",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@11.0.
|
|
30
|
-
"@codingame/monaco-vscode-user-data-profile-user-data-sync-common": "11.0.
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@11.0.1",
|
|
30
|
+
"@codingame/monaco-vscode-user-data-profile-user-data-sync-common": "11.0.1"
|
|
31
31
|
}
|
|
32
32
|
}
|
|
@@ -82,7 +82,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
82
82
|
return editor;
|
|
83
83
|
}
|
|
84
84
|
registerEditor() {
|
|
85
|
-
( (Registry.as(EditorExtensions.EditorPane))).registerEditorPane(EditorPaneDescriptor.create(UserDataProfilesEditor, UserDataProfilesEditor.ID, ( localize(
|
|
85
|
+
( (Registry.as(EditorExtensions.EditorPane))).registerEditorPane(EditorPaneDescriptor.create(UserDataProfilesEditor, UserDataProfilesEditor.ID, ( localize(9006, "Profiles Editor"))), [
|
|
86
86
|
( (new SyncDescriptor(UserDataProfilesEditorInput)))
|
|
87
87
|
]);
|
|
88
88
|
( (Registry.as(EditorExtensions.EditorFactory))).registerEditorSerializer(UserDataProfilesEditorInput.ID, UserDataProfilesEditorInputSerializer);
|
|
@@ -103,7 +103,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
103
103
|
}
|
|
104
104
|
registerProfileSubMenu() {
|
|
105
105
|
const getProfilesTitle = () => {
|
|
106
|
-
return ( localize(
|
|
106
|
+
return ( localize(9007, "Profile ({0})", this.userDataProfileService.currentProfile.name));
|
|
107
107
|
};
|
|
108
108
|
MenuRegistry.appendMenuItem(MenuId.GlobalActivity, {
|
|
109
109
|
get title() {
|
|
@@ -126,7 +126,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
126
126
|
}
|
|
127
127
|
registerOpenProfileSubMenu() {
|
|
128
128
|
MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
|
|
129
|
-
title: ( localize(
|
|
129
|
+
title: ( localize(9008, "New Window with Profile")),
|
|
130
130
|
submenu: OpenProfileMenu,
|
|
131
131
|
group: '1_new',
|
|
132
132
|
order: 4,
|
|
@@ -149,7 +149,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
149
149
|
id: `workbench.profiles.actions.profileEntry.${profile.id}`,
|
|
150
150
|
title: profile.name,
|
|
151
151
|
metadata: {
|
|
152
|
-
description: ( localize2(
|
|
152
|
+
description: ( localize2(9009, "Switch to {0} profile", profile.name)),
|
|
153
153
|
},
|
|
154
154
|
toggled: ( (ContextKeyExpr.equals(CURRENT_PROFILE_CONTEXT.key, profile.id))),
|
|
155
155
|
menu: [
|
|
@@ -172,7 +172,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
172
172
|
constructor() {
|
|
173
173
|
super({
|
|
174
174
|
id: `workbench.profiles.actions.newWindowWithProfile`,
|
|
175
|
-
title: ( localize2(
|
|
175
|
+
title: ( localize2(9010, "New Window with Profile...")),
|
|
176
176
|
category: PROFILES_CATEGORY,
|
|
177
177
|
precondition: HAS_PROFILES_CONTEXT,
|
|
178
178
|
f1: true,
|
|
@@ -186,8 +186,8 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
186
186
|
label: profile.name,
|
|
187
187
|
profile
|
|
188
188
|
})))), {
|
|
189
|
-
title: ( localize(
|
|
190
|
-
placeHolder: ( localize(
|
|
189
|
+
title: ( localize(9011, "New Window with Profile")),
|
|
190
|
+
placeHolder: ( localize(9012, "Select Profile")),
|
|
191
191
|
canPickMany: false
|
|
192
192
|
});
|
|
193
193
|
if (pick) {
|
|
@@ -203,9 +203,9 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
203
203
|
constructor() {
|
|
204
204
|
super({
|
|
205
205
|
id,
|
|
206
|
-
title: ( localize2(
|
|
206
|
+
title: ( localize2(9013, "{0}", profile.name)),
|
|
207
207
|
metadata: {
|
|
208
|
-
description: ( localize2(
|
|
208
|
+
description: ( localize2(9014, "Open New Window with {0} Profile", profile.name)),
|
|
209
209
|
},
|
|
210
210
|
menu: {
|
|
211
211
|
id: OpenProfileMenu,
|
|
@@ -223,7 +223,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
223
223
|
command: {
|
|
224
224
|
id,
|
|
225
225
|
category: PROFILES_CATEGORY,
|
|
226
|
-
title: ( localize2(
|
|
226
|
+
title: ( localize2(9015, "Open {0} Profile", profile.name)),
|
|
227
227
|
precondition: HAS_PROFILES_CONTEXT
|
|
228
228
|
},
|
|
229
229
|
}));
|
|
@@ -235,7 +235,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
235
235
|
constructor() {
|
|
236
236
|
super({
|
|
237
237
|
id: `workbench.profiles.actions.switchProfile`,
|
|
238
|
-
title: ( localize2(
|
|
238
|
+
title: ( localize2(9016, 'Switch Profile...')),
|
|
239
239
|
category: PROFILES_CATEGORY,
|
|
240
240
|
f1: true,
|
|
241
241
|
});
|
|
@@ -251,7 +251,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
251
251
|
});
|
|
252
252
|
}
|
|
253
253
|
const result = await quickInputService.pick(items.sort((a, b) => a.profile.name.localeCompare(b.profile.name)), {
|
|
254
|
-
placeHolder: ( localize(
|
|
254
|
+
placeHolder: ( localize(9017, "Select Profile"))
|
|
255
255
|
});
|
|
256
256
|
if (result) {
|
|
257
257
|
await that.userDataProfileManagementService.switchProfile(result.profile);
|
|
@@ -266,8 +266,8 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
266
266
|
super({
|
|
267
267
|
id: `workbench.profiles.actions.manageProfiles`,
|
|
268
268
|
title: {
|
|
269
|
-
...( localize2(
|
|
270
|
-
mnemonicTitle: ( localize(
|
|
269
|
+
...( localize2(9018, "Profiles")),
|
|
270
|
+
mnemonicTitle: ( localize(9019, "&&Profiles")),
|
|
271
271
|
},
|
|
272
272
|
menu: [
|
|
273
273
|
{
|
|
@@ -300,7 +300,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
300
300
|
command: {
|
|
301
301
|
id: 'workbench.profiles.actions.manageProfiles',
|
|
302
302
|
category: Categories.Preferences,
|
|
303
|
-
title: ( localize2(
|
|
303
|
+
title: ( localize2(9020, "Open Profiles (UI)")),
|
|
304
304
|
},
|
|
305
305
|
}));
|
|
306
306
|
return disposables;
|
|
@@ -313,7 +313,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
313
313
|
constructor() {
|
|
314
314
|
super({
|
|
315
315
|
id,
|
|
316
|
-
title: ( localize2(
|
|
316
|
+
title: ( localize2(9021, "Export Profile...")),
|
|
317
317
|
category: PROFILES_CATEGORY,
|
|
318
318
|
f1: true,
|
|
319
319
|
});
|
|
@@ -327,7 +327,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
327
327
|
command: {
|
|
328
328
|
id,
|
|
329
329
|
title: ( localize2(
|
|
330
|
-
|
|
330
|
+
9022,
|
|
331
331
|
"Export Profile ({0})...",
|
|
332
332
|
that.userDataProfileService.currentProfile.name
|
|
333
333
|
)),
|
|
@@ -341,7 +341,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
341
341
|
constructor() {
|
|
342
342
|
super({
|
|
343
343
|
id: 'workbench.profiles.actions.createFromCurrentProfile',
|
|
344
|
-
title: ( localize2(
|
|
344
|
+
title: ( localize2(9023, "Save Current Profile As...")),
|
|
345
345
|
category: PROFILES_CATEGORY,
|
|
346
346
|
f1: true,
|
|
347
347
|
});
|
|
@@ -358,7 +358,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
358
358
|
constructor() {
|
|
359
359
|
super({
|
|
360
360
|
id: 'workbench.profiles.actions.createProfile',
|
|
361
|
-
title: ( localize2(
|
|
361
|
+
title: ( localize2(9024, "New Profile...")),
|
|
362
362
|
category: PROFILES_CATEGORY,
|
|
363
363
|
f1: true,
|
|
364
364
|
menu: [
|
|
@@ -381,7 +381,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
381
381
|
constructor() {
|
|
382
382
|
super({
|
|
383
383
|
id: 'workbench.profiles.actions.deleteProfile',
|
|
384
|
-
title: ( localize2(
|
|
384
|
+
title: ( localize2(9025, "Delete Profile...")),
|
|
385
385
|
category: PROFILES_CATEGORY,
|
|
386
386
|
f1: true,
|
|
387
387
|
precondition: HAS_PROFILES_CONTEXT,
|
|
@@ -397,11 +397,11 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
397
397
|
if (profiles.length) {
|
|
398
398
|
const picks = await quickInputService.pick(( (profiles.map(profile => ({
|
|
399
399
|
label: profile.name,
|
|
400
|
-
description: profile.id === userDataProfileService.currentProfile.id ? ( localize(
|
|
400
|
+
description: profile.id === userDataProfileService.currentProfile.id ? ( localize(9026, "Current")) : undefined,
|
|
401
401
|
profile
|
|
402
402
|
})))), {
|
|
403
|
-
title: ( localize(
|
|
404
|
-
placeHolder: ( localize(
|
|
403
|
+
title: ( localize(9027, "Delete Profile...")),
|
|
404
|
+
placeHolder: ( localize(9028, "Select Profiles to Delete")),
|
|
405
405
|
canPickMany: true
|
|
406
406
|
});
|
|
407
407
|
if (picks) {
|
|
@@ -7,7 +7,7 @@ import { IUserDataProfileManagementService } from 'vscode/vscode/vs/workbench/se
|
|
|
7
7
|
|
|
8
8
|
class CreateTransientProfileAction extends Action2 {
|
|
9
9
|
static { this.ID = 'workbench.profiles.actions.createTemporaryProfile'; }
|
|
10
|
-
static { this.TITLE = ( localize2(
|
|
10
|
+
static { this.TITLE = ( localize2(9029, "Create a Temporary Profile")); }
|
|
11
11
|
constructor() {
|
|
12
12
|
super({
|
|
13
13
|
id: CreateTransientProfileAction.ID,
|
|
@@ -25,7 +25,7 @@ registerAction2(class CleanupProfilesAction extends Action2 {
|
|
|
25
25
|
constructor() {
|
|
26
26
|
super({
|
|
27
27
|
id: 'workbench.profiles.actions.cleanupProfiles',
|
|
28
|
-
title: ( localize2(
|
|
28
|
+
title: ( localize2(9030, "Cleanup Profiles")),
|
|
29
29
|
category: Categories.Developer,
|
|
30
30
|
f1: true,
|
|
31
31
|
});
|
|
@@ -38,7 +38,7 @@ registerAction2(class ResetWorkspacesAction extends Action2 {
|
|
|
38
38
|
constructor() {
|
|
39
39
|
super({
|
|
40
40
|
id: 'workbench.profiles.actions.resetWorkspaces',
|
|
41
|
-
title: ( localize2(
|
|
41
|
+
title: ( localize2(9031, "Reset Workspace Profiles Associations")),
|
|
42
42
|
category: Categories.Developer,
|
|
43
43
|
f1: true,
|
|
44
44
|
});
|
|
@@ -68,9 +68,9 @@ import { registerIcon } from 'vscode/vscode/vs/platform/theme/common/iconRegistr
|
|
|
68
68
|
import { DropdownMenuActionViewItem } from 'vscode/vscode/vs/base/browser/ui/dropdown/dropdownActionViewItem';
|
|
69
69
|
|
|
70
70
|
var UserDataProfilesEditor_1, ExistingProfileResourceTreeRenderer_1, NewProfileResourceTreeRenderer_1, ProfileResourceChildTreeItemRenderer_1, WorkspaceUriHostColumnRenderer_1, WorkspaceUriPathColumnRenderer_1, WorkspaceUriActionsColumnRenderer_1, UserDataProfilesEditorInput_1;
|
|
71
|
-
const editIcon = registerIcon('profiles-editor-edit-folder', Codicon.edit, ( localize(
|
|
72
|
-
const removeIcon = registerIcon('profiles-editor-remove-folder', Codicon.close, ( localize(
|
|
73
|
-
const profilesSashBorder = registerColor('profiles.sashBorder', PANEL_BORDER, ( localize(
|
|
71
|
+
const editIcon = registerIcon('profiles-editor-edit-folder', Codicon.edit, ( localize(11190, 'Icon for the edit folder icon in the profiles editor.')));
|
|
72
|
+
const removeIcon = registerIcon('profiles-editor-remove-folder', Codicon.close, ( localize(11191, 'Icon for the remove folder icon in the profiles editor.')));
|
|
73
|
+
const profilesSashBorder = registerColor('profiles.sashBorder', PANEL_BORDER, ( localize(11192, "The color of the Profiles editor splitview sash border.")));
|
|
74
74
|
const listStyles = getListStyles({
|
|
75
75
|
listActiveSelectionBackground: editorBackground,
|
|
76
76
|
listActiveSelectionForeground: foreground,
|
|
@@ -166,7 +166,7 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
166
166
|
return profileElement?.name ?? '';
|
|
167
167
|
},
|
|
168
168
|
getWidgetAriaLabel() {
|
|
169
|
-
return ( localize(
|
|
169
|
+
return ( localize(11193, "Profiles"));
|
|
170
170
|
}
|
|
171
171
|
},
|
|
172
172
|
openOnSingleClick: true,
|
|
@@ -187,10 +187,10 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
187
187
|
getActions: () => {
|
|
188
188
|
const actions = [];
|
|
189
189
|
if (this.templates.length) {
|
|
190
|
-
actions.push(( (new SubmenuAction('from.template', ( localize(
|
|
190
|
+
actions.push(( (new SubmenuAction('from.template', ( localize(11194, "From Template")), this.getCreateFromTemplateActions()))));
|
|
191
191
|
actions.push(( (new Separator())));
|
|
192
192
|
}
|
|
193
|
-
actions.push(( (new Action('importProfile', ( localize(
|
|
193
|
+
actions.push(( (new Action('importProfile', ( localize(11195, "Import Profile...")), undefined, true, () => this.importProfile()))));
|
|
194
194
|
return actions;
|
|
195
195
|
}
|
|
196
196
|
},
|
|
@@ -199,7 +199,7 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
199
199
|
supportIcons: true,
|
|
200
200
|
...defaultButtonStyles
|
|
201
201
|
}))));
|
|
202
|
-
button.label = ( localize(
|
|
202
|
+
button.label = ( localize(11196, "New Profile"));
|
|
203
203
|
this._register(button.onDidClick(e => this.createNewProfile()));
|
|
204
204
|
}
|
|
205
205
|
getCreateFromTemplateActions() {
|
|
@@ -246,13 +246,13 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
246
246
|
}
|
|
247
247
|
getTreeContextMenuActions() {
|
|
248
248
|
const actions = [];
|
|
249
|
-
actions.push(( (new Action('newProfile', ( localize(
|
|
249
|
+
actions.push(( (new Action('newProfile', ( localize(11196, "New Profile")), undefined, true, () => this.createNewProfile()))));
|
|
250
250
|
const templateActions = this.getCreateFromTemplateActions();
|
|
251
251
|
if (templateActions.length) {
|
|
252
|
-
actions.push(( (new SubmenuAction('from.template', ( localize(
|
|
252
|
+
actions.push(( (new SubmenuAction('from.template', ( localize(11197, "New Profile From Template")), templateActions))));
|
|
253
253
|
}
|
|
254
254
|
actions.push(( (new Separator())));
|
|
255
|
-
actions.push(( (new Action('importProfile', ( localize(
|
|
255
|
+
actions.push(( (new Action('importProfile', ( localize(11195, "Import Profile...")), undefined, true, () => this.importProfile()))));
|
|
256
256
|
return actions;
|
|
257
257
|
}
|
|
258
258
|
async importProfile() {
|
|
@@ -261,13 +261,13 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
261
261
|
const updateQuickPickItems = (value) => {
|
|
262
262
|
const quickPickItems = [];
|
|
263
263
|
if (value) {
|
|
264
|
-
quickPickItems.push({ label: quickPick.value, description: ( localize(
|
|
264
|
+
quickPickItems.push({ label: quickPick.value, description: ( localize(11198, "Import from URL")) });
|
|
265
265
|
}
|
|
266
|
-
quickPickItems.push({ label: ( localize(
|
|
266
|
+
quickPickItems.push({ label: ( localize(11199, "Select File...")) });
|
|
267
267
|
quickPick.items = quickPickItems;
|
|
268
268
|
};
|
|
269
|
-
quickPick.title = ( localize(
|
|
270
|
-
quickPick.placeholder = ( localize(
|
|
269
|
+
quickPick.title = ( localize(11200, "Import from Profile Template..."));
|
|
270
|
+
quickPick.placeholder = ( localize(11201, "Provide Profile Template URL"));
|
|
271
271
|
quickPick.ignoreFocusOut = true;
|
|
272
272
|
disposables.add(quickPick.onDidChangeValue(updateQuickPickItems));
|
|
273
273
|
updateQuickPickItems();
|
|
@@ -302,7 +302,7 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
302
302
|
canSelectFiles: true,
|
|
303
303
|
canSelectMany: false,
|
|
304
304
|
filters: PROFILE_FILTER,
|
|
305
|
-
title: ( localize(
|
|
305
|
+
title: ( localize(11202, "Select Profile Template File")),
|
|
306
306
|
});
|
|
307
307
|
if (!profileLocation) {
|
|
308
308
|
return null;
|
|
@@ -379,7 +379,7 @@ let ProfileElementRenderer = class ProfileElementRenderer {
|
|
|
379
379
|
const label = append(container, $('.profile-list-item-label'));
|
|
380
380
|
const dirty = append(container, $(`span${ThemeIcon.asCSSSelector(Codicon.circleFilled)}`));
|
|
381
381
|
const description = append(container, $('.profile-list-item-description'));
|
|
382
|
-
append(description, $(`span${ThemeIcon.asCSSSelector(Codicon.check)}`), $('span', undefined, ( localize(
|
|
382
|
+
append(description, $(`span${ThemeIcon.asCSSSelector(Codicon.check)}`), $('span', undefined, ( localize(11203, "Active"))));
|
|
383
383
|
const actionsContainer = append(container, $('.profile-tree-item-actions-container'));
|
|
384
384
|
const actionBar = disposables.add(this.instantiationService.createInstance(WorkbenchToolBar, actionsContainer, {
|
|
385
385
|
hoverDelegate: disposables.add(createInstantHoverDelegate()),
|
|
@@ -723,15 +723,15 @@ class AbstractProfileResourceTreeRenderer extends Disposable {
|
|
|
723
723
|
getResourceTypeTitle(resourceType) {
|
|
724
724
|
switch (resourceType) {
|
|
725
725
|
case "settings" :
|
|
726
|
-
return ( localize(
|
|
726
|
+
return ( localize(11204, "Settings"));
|
|
727
727
|
case "keybindings" :
|
|
728
|
-
return ( localize(
|
|
728
|
+
return ( localize(11205, "Keyboard Shortcuts"));
|
|
729
729
|
case "snippets" :
|
|
730
|
-
return ( localize(
|
|
730
|
+
return ( localize(11206, "Snippets"));
|
|
731
731
|
case "tasks" :
|
|
732
|
-
return ( localize(
|
|
732
|
+
return ( localize(11207, "Tasks"));
|
|
733
733
|
case "extensions" :
|
|
734
|
-
return ( localize(
|
|
734
|
+
return ( localize(11208, "Extensions"));
|
|
735
735
|
}
|
|
736
736
|
return '';
|
|
737
737
|
}
|
|
@@ -760,18 +760,18 @@ let ProfileNameRenderer = class ProfileNameRenderer extends ProfilePropertyRende
|
|
|
760
760
|
const elementDisposables = disposables.add(( (new DisposableStore())));
|
|
761
761
|
let profileElement;
|
|
762
762
|
const nameContainer = append(parent, $('.profile-row-container'));
|
|
763
|
-
append(nameContainer, $('.profile-label-element', undefined, ( localize(
|
|
763
|
+
append(nameContainer, $('.profile-label-element', undefined, ( localize(11209, "Name"))));
|
|
764
764
|
const nameInput = disposables.add(( (new InputBox(nameContainer, this.contextViewService, {
|
|
765
765
|
inputBoxStyles: getInputBoxStyle({
|
|
766
766
|
inputBorder: settingsTextInputBorder
|
|
767
767
|
}),
|
|
768
|
-
ariaLabel: ( localize(
|
|
769
|
-
placeholder: ( localize(
|
|
768
|
+
ariaLabel: ( localize(11210, "Profile Name")),
|
|
769
|
+
placeholder: ( localize(11210, "Profile Name")),
|
|
770
770
|
validationOptions: {
|
|
771
771
|
validation: (value) => {
|
|
772
772
|
if (!value) {
|
|
773
773
|
return {
|
|
774
|
-
content: ( localize(
|
|
774
|
+
content: ( localize(11211, "Profile name is required and must be a non-empty value.")),
|
|
775
775
|
type: 2
|
|
776
776
|
};
|
|
777
777
|
}
|
|
@@ -785,7 +785,7 @@ let ProfileNameRenderer = class ProfileNameRenderer extends ProfilePropertyRende
|
|
|
785
785
|
value = value.trim();
|
|
786
786
|
if (initialName !== value && ( (this.userDataProfilesService.profiles.some(p => !p.isTransient && p.name === value)))) {
|
|
787
787
|
return {
|
|
788
|
-
content: ( localize(
|
|
788
|
+
content: ( localize(11212, "Profile with name {0} already exists.", value)),
|
|
789
789
|
type: 2
|
|
790
790
|
};
|
|
791
791
|
}
|
|
@@ -815,10 +815,10 @@ let ProfileNameRenderer = class ProfileNameRenderer extends ProfilePropertyRende
|
|
|
815
815
|
nameInput.enable();
|
|
816
816
|
}
|
|
817
817
|
if (isDefaultProfile) {
|
|
818
|
-
nameInput.setTooltip(( localize(
|
|
818
|
+
nameInput.setTooltip(( localize(11213, "Name cannot be changed for the default profile")));
|
|
819
819
|
}
|
|
820
820
|
else {
|
|
821
|
-
nameInput.setTooltip(( localize(
|
|
821
|
+
nameInput.setTooltip(( localize(11210, "Profile Name")));
|
|
822
822
|
}
|
|
823
823
|
};
|
|
824
824
|
return {
|
|
@@ -856,9 +856,9 @@ let ProfileIconRenderer = class ProfileIconRenderer extends ProfilePropertyRende
|
|
|
856
856
|
const elementDisposables = disposables.add(( (new DisposableStore())));
|
|
857
857
|
let profileElement;
|
|
858
858
|
const iconContainer = append(parent, $('.profile-row-container'));
|
|
859
|
-
append(iconContainer, $('.profile-label-element', undefined, ( localize(
|
|
859
|
+
append(iconContainer, $('.profile-label-element', undefined, ( localize(11214, "Icon"))));
|
|
860
860
|
const iconValueContainer = append(iconContainer, $('.profile-icon-container'));
|
|
861
|
-
const iconElement = append(iconValueContainer, $(`${ThemeIcon.asCSSSelector(DEFAULT_ICON)}`, { 'tabindex': '0', 'role': 'button', 'aria-label': ( localize(
|
|
861
|
+
const iconElement = append(iconValueContainer, $(`${ThemeIcon.asCSSSelector(DEFAULT_ICON)}`, { 'tabindex': '0', 'role': 'button', 'aria-label': ( localize(11215, "Profile Icon")) }));
|
|
862
862
|
const iconHover = disposables.add(this.hoverService.setupManagedHover(this.hoverDelegate, iconElement, ''));
|
|
863
863
|
const iconSelectBox = disposables.add(this.instantiationService.createInstance(WorkbenchIconSelectBox, { icons: ICONS, inputBoxStyles: defaultInputBoxStyles }));
|
|
864
864
|
let hoverWidget;
|
|
@@ -917,14 +917,14 @@ let ProfileIconRenderer = class ProfileIconRenderer extends ProfilePropertyRende
|
|
|
917
917
|
profileElement.root.icon = selectedIcon.id;
|
|
918
918
|
}
|
|
919
919
|
}));
|
|
920
|
-
append(iconValueContainer, $('.profile-description-element', undefined, ( localize(
|
|
920
|
+
append(iconValueContainer, $('.profile-description-element', undefined, ( localize(11216, "Profile icon to be shown in the activity bar"))));
|
|
921
921
|
const renderIcon = (profileElement) => {
|
|
922
922
|
if (profileElement?.root instanceof UserDataProfileElement && profileElement.root.profile.isDefault) {
|
|
923
923
|
iconValueContainer.classList.add('disabled');
|
|
924
|
-
iconHover.update(( localize(
|
|
924
|
+
iconHover.update(( localize(11217, "Icon cannot be changed for the default profile")));
|
|
925
925
|
}
|
|
926
926
|
else {
|
|
927
|
-
iconHover.update(( localize(
|
|
927
|
+
iconHover.update(( localize(11218, "Click to change icon")));
|
|
928
928
|
iconValueContainer.classList.remove('disabled');
|
|
929
929
|
}
|
|
930
930
|
if (profileElement.root.icon) {
|
|
@@ -964,9 +964,9 @@ let UseForCurrentWindowPropertyRenderer = class UseForCurrentWindowPropertyRende
|
|
|
964
964
|
const elementDisposables = disposables.add(( (new DisposableStore())));
|
|
965
965
|
let profileElement;
|
|
966
966
|
const useForCurrentWindowContainer = append(parent, $('.profile-row-container'));
|
|
967
|
-
append(useForCurrentWindowContainer, $('.profile-label-element', undefined, ( localize(
|
|
967
|
+
append(useForCurrentWindowContainer, $('.profile-label-element', undefined, ( localize(11219, "Use for Current Window"))));
|
|
968
968
|
const useForCurrentWindowValueContainer = append(useForCurrentWindowContainer, $('.profile-use-for-current-container'));
|
|
969
|
-
const useForCurrentWindowTitle = ( localize(
|
|
969
|
+
const useForCurrentWindowTitle = ( localize(11220, "Use this profile for the current window"));
|
|
970
970
|
const useForCurrentWindowCheckbox = disposables.add(( (new Checkbox(useForCurrentWindowTitle, false, defaultCheckboxStyles))));
|
|
971
971
|
append(useForCurrentWindowValueContainer, useForCurrentWindowCheckbox.domNode);
|
|
972
972
|
const useForCurrentWindowLabel = append(useForCurrentWindowValueContainer, $('.profile-description-element', undefined, useForCurrentWindowTitle));
|
|
@@ -1016,9 +1016,9 @@ class UseAsDefaultProfileRenderer extends ProfilePropertyRenderer {
|
|
|
1016
1016
|
const elementDisposables = disposables.add(( (new DisposableStore())));
|
|
1017
1017
|
let profileElement;
|
|
1018
1018
|
const useAsDefaultProfileContainer = append(parent, $('.profile-row-container'));
|
|
1019
|
-
append(useAsDefaultProfileContainer, $('.profile-label-element', undefined, ( localize(
|
|
1019
|
+
append(useAsDefaultProfileContainer, $('.profile-label-element', undefined, ( localize(11221, "Use for New Windows"))));
|
|
1020
1020
|
const useAsDefaultProfileValueContainer = append(useAsDefaultProfileContainer, $('.profile-use-as-default-container'));
|
|
1021
|
-
const useAsDefaultProfileTitle = ( localize(
|
|
1021
|
+
const useAsDefaultProfileTitle = ( localize(11222, "Use this profile as the default for new windows"));
|
|
1022
1022
|
const useAsDefaultProfileCheckbox = disposables.add(( (new Checkbox(useAsDefaultProfileTitle, false, defaultCheckboxStyles))));
|
|
1023
1023
|
append(useAsDefaultProfileValueContainer, useAsDefaultProfileCheckbox.domNode);
|
|
1024
1024
|
const useAsDefaultProfileLabel = append(useAsDefaultProfileValueContainer, $('.profile-description-element', undefined, useAsDefaultProfileTitle));
|
|
@@ -1065,11 +1065,11 @@ let CopyFromProfileRenderer = class CopyFromProfileRenderer extends ProfilePrope
|
|
|
1065
1065
|
const elementDisposables = disposables.add(( (new DisposableStore())));
|
|
1066
1066
|
let profileElement;
|
|
1067
1067
|
const copyFromContainer = append(parent, $('.profile-row-container.profile-copy-from-container'));
|
|
1068
|
-
append(copyFromContainer, $('.profile-label-element', undefined, ( localize(
|
|
1069
|
-
append(copyFromContainer, $('.profile-description-element', undefined, ( localize(
|
|
1068
|
+
append(copyFromContainer, $('.profile-label-element', undefined, ( localize(11223, "Copy from"))));
|
|
1069
|
+
append(copyFromContainer, $('.profile-description-element', undefined, ( localize(11224, "Select the profile source from which you want to copy contents"))));
|
|
1070
1070
|
const copyFromSelectBox = disposables.add(this.instantiationService.createInstance(SelectBox, [], 0, this.contextViewService, defaultSelectBoxStyles, {
|
|
1071
1071
|
useCustomDrawn: true,
|
|
1072
|
-
ariaLabel: ( localize(
|
|
1072
|
+
ariaLabel: ( localize(11225, "Copy profile from")),
|
|
1073
1073
|
}));
|
|
1074
1074
|
copyFromSelectBox.render(append(copyFromContainer, $('.profile-select-container')));
|
|
1075
1075
|
const render = (profileElement, copyFromOptions) => {
|
|
@@ -1113,7 +1113,7 @@ let CopyFromProfileRenderer = class CopyFromProfileRenderer extends ProfilePrope
|
|
|
1113
1113
|
getCopyFromOptions(profileElement) {
|
|
1114
1114
|
const separator = { text: '\u2500\u2500\u2500\u2500\u2500\u2500', isDisabled: true };
|
|
1115
1115
|
const copyFromOptions = [];
|
|
1116
|
-
copyFromOptions.push({ text: ( localize(
|
|
1116
|
+
copyFromOptions.push({ text: ( localize(11226, "None")) });
|
|
1117
1117
|
for (const [copyFromTemplate, name] of profileElement.copyFromTemplates) {
|
|
1118
1118
|
if (!( (this.templates.some(
|
|
1119
1119
|
template => this.uriIdentityService.extUri.isEqual(( (URI.parse(template.url))), copyFromTemplate)
|
|
@@ -1122,12 +1122,12 @@ let CopyFromProfileRenderer = class CopyFromProfileRenderer extends ProfilePrope
|
|
|
1122
1122
|
}
|
|
1123
1123
|
}
|
|
1124
1124
|
if (this.templates.length) {
|
|
1125
|
-
copyFromOptions.push({ ...separator, decoratorRight: ( localize(
|
|
1125
|
+
copyFromOptions.push({ ...separator, decoratorRight: ( localize(11227, "Profile Templates")) });
|
|
1126
1126
|
for (const template of this.templates) {
|
|
1127
1127
|
copyFromOptions.push({ text: template.name, id: template.url, source: ( (URI.parse(template.url))) });
|
|
1128
1128
|
}
|
|
1129
1129
|
}
|
|
1130
|
-
copyFromOptions.push({ ...separator, decoratorRight: ( localize(
|
|
1130
|
+
copyFromOptions.push({ ...separator, decoratorRight: ( localize(11228, "Existing Profiles")) });
|
|
1131
1131
|
for (const profile of this.userDataProfilesService.profiles) {
|
|
1132
1132
|
if (!profile.isTransient) {
|
|
1133
1133
|
copyFromOptions.push({ text: profile.name, id: profile.id, source: profile });
|
|
@@ -1159,11 +1159,11 @@ let ContentsProfileRenderer = class ContentsProfileRenderer extends ProfilePrope
|
|
|
1159
1159
|
const elementDisposables = disposables.add(( (new DisposableStore())));
|
|
1160
1160
|
let profileElement;
|
|
1161
1161
|
const configureRowContainer = append(parent, $('.profile-row-container'));
|
|
1162
|
-
append(configureRowContainer, $('.profile-label-element', undefined, ( localize(
|
|
1162
|
+
append(configureRowContainer, $('.profile-label-element', undefined, ( localize(11229, "Contents"))));
|
|
1163
1163
|
const contentsDescriptionElement = append(configureRowContainer, $('.profile-description-element'));
|
|
1164
1164
|
const contentsTreeHeader = append(configureRowContainer, $('.profile-content-tree-header'));
|
|
1165
|
-
const optionsLabel = $('.options-header', undefined, $('span', undefined, ( localize(
|
|
1166
|
-
append(contentsTreeHeader, $(''), $('', undefined, ( localize(
|
|
1165
|
+
const optionsLabel = $('.options-header', undefined, $('span', undefined, ( localize(11230, "Source"))));
|
|
1166
|
+
append(contentsTreeHeader, $(''), $('', undefined, ( localize(11229, "Contents"))), optionsLabel, $(''));
|
|
1167
1167
|
const delegate = ( (new ProfileContentTreeElementDelegate()));
|
|
1168
1168
|
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, [
|
|
1169
1169
|
this.instantiationService.createInstance(ExistingProfileResourceTreeRenderer),
|
|
@@ -1235,27 +1235,27 @@ let ContentsProfileRenderer = class ContentsProfileRenderer extends ProfilePrope
|
|
|
1235
1235
|
clearNode(contentsDescriptionElement);
|
|
1236
1236
|
const markdown = ( (new MarkdownString()));
|
|
1237
1237
|
if (element.root instanceof UserDataProfileElement && element.root.profile.isDefault) {
|
|
1238
|
-
markdown.appendMarkdown(( localize(
|
|
1238
|
+
markdown.appendMarkdown(( localize(11231, "Browse contents of this profile\n")));
|
|
1239
1239
|
}
|
|
1240
1240
|
else {
|
|
1241
|
-
markdown.appendMarkdown(( localize(
|
|
1241
|
+
markdown.appendMarkdown(( localize(11232, "Configure source of contents for this profile\n")));
|
|
1242
1242
|
if (element.root instanceof NewProfileElement) {
|
|
1243
1243
|
const copyFromName = element.root.getCopyFromName();
|
|
1244
1244
|
const optionName = copyFromName === this.userDataProfilesService.defaultProfile.name
|
|
1245
|
-
? ( localize(
|
|
1245
|
+
? ( localize(11233, "{0} (Copy)", copyFromName))
|
|
1246
1246
|
: copyFromName;
|
|
1247
1247
|
if (optionName) {
|
|
1248
1248
|
markdown
|
|
1249
1249
|
.appendMarkdown(( localize(
|
|
1250
|
-
|
|
1250
|
+
11234,
|
|
1251
1251
|
"- *{0}:* Copy contents from the {1} profile\n",
|
|
1252
1252
|
optionName,
|
|
1253
1253
|
copyFromName
|
|
1254
1254
|
)));
|
|
1255
1255
|
}
|
|
1256
1256
|
markdown
|
|
1257
|
-
.appendMarkdown(( localize(
|
|
1258
|
-
.appendMarkdown(( localize(
|
|
1257
|
+
.appendMarkdown(( localize(11235, "- *Default:* Use contents from the Default profile\n")))
|
|
1258
|
+
.appendMarkdown(( localize(11236, "- *None:* Create empty contents\n")));
|
|
1259
1259
|
}
|
|
1260
1260
|
}
|
|
1261
1261
|
append(contentsDescriptionElement, elementDisposables.add(renderMarkdown(markdown)).element);
|
|
@@ -1316,7 +1316,7 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1316
1316
|
const elementDisposables = disposables.add(( (new DisposableStore())));
|
|
1317
1317
|
let profileElement;
|
|
1318
1318
|
const profileWorkspacesRowContainer = append(parent, $('.profile-row-container'));
|
|
1319
|
-
append(profileWorkspacesRowContainer, $('.profile-label-element', undefined, ( localize(
|
|
1319
|
+
append(profileWorkspacesRowContainer, $('.profile-label-element', undefined, ( localize(11237, "Folders & Workspaces"))));
|
|
1320
1320
|
const profileWorkspacesDescriptionElement = append(profileWorkspacesRowContainer, $('.profile-description-element'));
|
|
1321
1321
|
const workspacesTableContainer = append(profileWorkspacesRowContainer, $('.profile-associations-table'));
|
|
1322
1322
|
const table = this.workspacesTable = disposables.add(this.instantiationService.createInstance((WorkbenchTable), 'ProfileEditor-AssociationsTable', workspacesTableContainer, new class {
|
|
@@ -1335,14 +1335,14 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1335
1335
|
project(row) { return row; },
|
|
1336
1336
|
},
|
|
1337
1337
|
{
|
|
1338
|
-
label: ( localize(
|
|
1338
|
+
label: ( localize(11238, "Host")),
|
|
1339
1339
|
tooltip: '',
|
|
1340
1340
|
weight: 2,
|
|
1341
1341
|
templateId: WorkspaceUriHostColumnRenderer.TEMPLATE_ID,
|
|
1342
1342
|
project(row) { return row; },
|
|
1343
1343
|
},
|
|
1344
1344
|
{
|
|
1345
|
-
label: ( localize(
|
|
1345
|
+
label: ( localize(11239, "Path")),
|
|
1346
1346
|
tooltip: '',
|
|
1347
1347
|
weight: 7,
|
|
1348
1348
|
templateId: WorkspaceUriPathColumnRenderer.TEMPLATE_ID,
|
|
@@ -1371,16 +1371,16 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1371
1371
|
getAriaLabel: (item) => {
|
|
1372
1372
|
const hostLabel = getHostLabel(this.labelService, item.workspace);
|
|
1373
1373
|
if (hostLabel === undefined || hostLabel.length === 0) {
|
|
1374
|
-
return ( localize(
|
|
1374
|
+
return ( localize(11240, "{0}, trusted", this.labelService.getUriLabel(item.workspace)));
|
|
1375
1375
|
}
|
|
1376
1376
|
return ( localize(
|
|
1377
|
-
|
|
1377
|
+
11241,
|
|
1378
1378
|
"{0} on {1}, trusted",
|
|
1379
1379
|
this.labelService.getUriLabel(item.workspace),
|
|
1380
1380
|
hostLabel
|
|
1381
1381
|
));
|
|
1382
1382
|
},
|
|
1383
|
-
getWidgetAriaLabel: () => ( localize(
|
|
1383
|
+
getWidgetAriaLabel: () => ( localize(11242, "Trusted Folders & Workspaces"))
|
|
1384
1384
|
},
|
|
1385
1385
|
identityProvider: {
|
|
1386
1386
|
getId(element) {
|
|
@@ -1399,15 +1399,15 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1399
1399
|
})));
|
|
1400
1400
|
const addButtonBarElement = append(profileWorkspacesRowContainer, $('.profile-workspaces-button-container'));
|
|
1401
1401
|
const buttonBar = disposables.add(( (new ButtonBar(addButtonBarElement))));
|
|
1402
|
-
const addButton = this._register(buttonBar.addButton({ title: ( localize(
|
|
1403
|
-
addButton.label = ( localize(
|
|
1402
|
+
const addButton = this._register(buttonBar.addButton({ title: ( localize(11243, "Add Folder")), ...defaultButtonStyles }));
|
|
1403
|
+
addButton.label = ( localize(11243, "Add Folder"));
|
|
1404
1404
|
disposables.add(addButton.onDidClick(async () => {
|
|
1405
1405
|
const uris = await this.fileDialogService.showOpenDialog({
|
|
1406
1406
|
canSelectFiles: false,
|
|
1407
1407
|
canSelectFolders: true,
|
|
1408
1408
|
canSelectMany: true,
|
|
1409
|
-
openLabel: ( localize(
|
|
1410
|
-
title: ( localize(
|
|
1409
|
+
openLabel: ( localize(11244, "Add Folder")),
|
|
1410
|
+
title: ( localize(11245, "Select Folders To Add"))
|
|
1411
1411
|
});
|
|
1412
1412
|
if (uris) {
|
|
1413
1413
|
if (profileElement?.root instanceof UserDataProfileElement) {
|
|
@@ -1422,7 +1422,7 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1422
1422
|
}));
|
|
1423
1423
|
const updateTable = () => {
|
|
1424
1424
|
if (profileElement?.root instanceof UserDataProfileElement && profileElement.root.workspaces?.length) {
|
|
1425
|
-
profileWorkspacesDescriptionElement.textContent = ( localize(
|
|
1425
|
+
profileWorkspacesDescriptionElement.textContent = ( localize(11246, "Following folders and workspaces are using this profile"));
|
|
1426
1426
|
workspacesTableContainer.classList.remove('hide');
|
|
1427
1427
|
table.splice(0, table.length, ( (profileElement.root.workspaces
|
|
1428
1428
|
.map(workspace => ({ workspace, profileElement: profileElement.root }))))
|
|
@@ -1430,7 +1430,7 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1430
1430
|
this.layout();
|
|
1431
1431
|
}
|
|
1432
1432
|
else {
|
|
1433
|
-
profileWorkspacesDescriptionElement.textContent = ( localize(
|
|
1433
|
+
profileWorkspacesDescriptionElement.textContent = ( localize(11247, "No folders or workspaces are using this profile"));
|
|
1434
1434
|
workspacesTableContainer.classList.add('hide');
|
|
1435
1435
|
}
|
|
1436
1436
|
};
|
|
@@ -1504,13 +1504,13 @@ let ExistingProfileResourceTreeRenderer = class ExistingProfileResourceTreeRende
|
|
|
1504
1504
|
}
|
|
1505
1505
|
const updateRadioItems = () => {
|
|
1506
1506
|
templateData.radio.setItems([{
|
|
1507
|
-
text: ( localize(
|
|
1508
|
-
tooltip: ( localize(
|
|
1507
|
+
text: ( localize(11248, "Default")),
|
|
1508
|
+
tooltip: ( localize(11249, "Use {0} from the Default profile", resourceTypeTitle)),
|
|
1509
1509
|
isActive: root.getFlag(element.resourceType)
|
|
1510
1510
|
},
|
|
1511
1511
|
{
|
|
1512
1512
|
text: root.name,
|
|
1513
|
-
tooltip: ( localize(
|
|
1513
|
+
tooltip: ( localize(11250, "Use {0} from the {1} profile", resourceTypeTitle, root.name)),
|
|
1514
1514
|
isActive: !root.getFlag(element.resourceType)
|
|
1515
1515
|
}]);
|
|
1516
1516
|
};
|
|
@@ -1578,22 +1578,22 @@ let NewProfileResourceTreeRenderer = class NewProfileResourceTreeRenderer extend
|
|
|
1578
1578
|
templateData.label.textContent = resourceTypeTitle;
|
|
1579
1579
|
const renderRadioItems = () => {
|
|
1580
1580
|
const options = [{
|
|
1581
|
-
text: ( localize(
|
|
1582
|
-
tooltip: ( localize(
|
|
1581
|
+
text: ( localize(11248, "Default")),
|
|
1582
|
+
tooltip: ( localize(11249, "Use {0} from the Default profile", resourceTypeTitle)),
|
|
1583
1583
|
},
|
|
1584
1584
|
{
|
|
1585
|
-
text: ( localize(
|
|
1586
|
-
tooltip: ( localize(
|
|
1585
|
+
text: ( localize(11251, "None")),
|
|
1586
|
+
tooltip: ( localize(11252, "Create empty {0}", resourceTypeTitle))
|
|
1587
1587
|
}];
|
|
1588
1588
|
const copyFromName = root.getCopyFromName();
|
|
1589
1589
|
const name = copyFromName === this.userDataProfilesService.defaultProfile.name
|
|
1590
|
-
? ( localize(
|
|
1590
|
+
? ( localize(11233, "{0} (Copy)", copyFromName))
|
|
1591
1591
|
: copyFromName;
|
|
1592
1592
|
if (root.copyFrom && name) {
|
|
1593
1593
|
templateData.radio.setItems([
|
|
1594
1594
|
{
|
|
1595
1595
|
text: name,
|
|
1596
|
-
tooltip: name ? ( localize(
|
|
1596
|
+
tooltip: name ? ( localize(11253, "Copy {0} from the {1} profile", resourceTypeTitle, name)) : ( localize(11254, "Copy")),
|
|
1597
1597
|
},
|
|
1598
1598
|
...options
|
|
1599
1599
|
]);
|
|
@@ -1811,7 +1811,7 @@ let ChangeProfileAction = class ChangeProfileAction extends Action {
|
|
|
1811
1811
|
super('changeProfile', '', ThemeIcon.asClassName(editIcon));
|
|
1812
1812
|
this.item = item;
|
|
1813
1813
|
this.userDataProfilesService = userDataProfilesService;
|
|
1814
|
-
this.tooltip = ( localize(
|
|
1814
|
+
this.tooltip = ( localize(11255, "Change Profile"));
|
|
1815
1815
|
}
|
|
1816
1816
|
getSwitchProfileActions() {
|
|
1817
1817
|
return (
|
|
@@ -1887,7 +1887,7 @@ let WorkspaceUriActionsColumnRenderer = class WorkspaceUriActionsColumnRenderer
|
|
|
1887
1887
|
class: ThemeIcon.asClassName(Codicon.window),
|
|
1888
1888
|
enabled: !this.uriIdentityService.extUri.isEqual(item.workspace, item.profileElement.getCurrentWorkspace()),
|
|
1889
1889
|
id: 'openWorkspace',
|
|
1890
|
-
tooltip: ( localize(
|
|
1890
|
+
tooltip: ( localize(11256, "Open in New Window")),
|
|
1891
1891
|
run: () => item.profileElement.openWorkspace(item.workspace)
|
|
1892
1892
|
};
|
|
1893
1893
|
}
|
|
@@ -1897,7 +1897,7 @@ let WorkspaceUriActionsColumnRenderer = class WorkspaceUriActionsColumnRenderer
|
|
|
1897
1897
|
class: ThemeIcon.asClassName(removeIcon),
|
|
1898
1898
|
enabled: this.userDataProfileManagementService.getDefaultProfileToUse().id !== item.profileElement.profile.id,
|
|
1899
1899
|
id: 'deleteTrustedUri',
|
|
1900
|
-
tooltip: ( localize(
|
|
1900
|
+
tooltip: ( localize(11257, "Delete Path")),
|
|
1901
1901
|
run: () => item.profileElement.updateWorkspaces([], [item.workspace])
|
|
1902
1902
|
};
|
|
1903
1903
|
}
|
|
@@ -1912,7 +1912,7 @@ WorkspaceUriActionsColumnRenderer = WorkspaceUriActionsColumnRenderer_1 = ( (__d
|
|
|
1912
1912
|
( (__param(3, IUriIdentityService)))
|
|
1913
1913
|
], WorkspaceUriActionsColumnRenderer)));
|
|
1914
1914
|
function getHostLabel(labelService, workspaceUri) {
|
|
1915
|
-
return workspaceUri.authority ? labelService.getHostLabel(workspaceUri.scheme, workspaceUri.authority) : ( localize(
|
|
1915
|
+
return workspaceUri.authority ? labelService.getHostLabel(workspaceUri.scheme, workspaceUri.authority) : ( localize(11258, "Local"));
|
|
1916
1916
|
}
|
|
1917
1917
|
let UserDataProfilesEditorInput = class UserDataProfilesEditorInput extends EditorInput {
|
|
1918
1918
|
static { UserDataProfilesEditorInput_1 = this; }
|
|
@@ -1933,7 +1933,7 @@ let UserDataProfilesEditorInput = class UserDataProfilesEditorInput extends Edit
|
|
|
1933
1933
|
this._register(this.model.onDidChange(e => this.dirty = ( (this.model.profiles.some(profile => profile instanceof NewProfileElement)))));
|
|
1934
1934
|
}
|
|
1935
1935
|
get typeId() { return UserDataProfilesEditorInput_1.ID; }
|
|
1936
|
-
getName() { return ( localize(
|
|
1936
|
+
getName() { return ( localize(11259, "Profiles")); }
|
|
1937
1937
|
getIcon() { return defaultUserDataProfileIcon; }
|
|
1938
1938
|
async resolve() {
|
|
1939
1939
|
await this.model.resolve();
|
|
@@ -168,7 +168,7 @@ let ExtensionsResource = class ExtensionsResource {
|
|
|
168
168
|
return;
|
|
169
169
|
}
|
|
170
170
|
progress?.(( localize(
|
|
171
|
-
|
|
171
|
+
9002,
|
|
172
172
|
"Installing extension {0}...",
|
|
173
173
|
installExtensionInfo.extension.displayName ?? installExtensionInfo.extension.identifier.id
|
|
174
174
|
)));
|
|
@@ -261,7 +261,7 @@ class ExtensionsResourceTreeItem {
|
|
|
261
261
|
constructor() {
|
|
262
262
|
this.type = "extensions" ;
|
|
263
263
|
this.handle = "extensions" ;
|
|
264
|
-
this.label = { label: ( localize(
|
|
264
|
+
this.label = { label: ( localize(9003, "Extensions")) };
|
|
265
265
|
this.collapsibleState = TreeItemCollapsibleState.Expanded;
|
|
266
266
|
this.contextValue = "extensions" ;
|
|
267
267
|
this.excludedExtensions = ( (new Set()));
|
|
@@ -275,7 +275,7 @@ class ExtensionsResourceTreeItem {
|
|
|
275
275
|
handle: e.identifier.id.toLowerCase(),
|
|
276
276
|
parent: this,
|
|
277
277
|
label: { label: e.displayName || e.identifier.id },
|
|
278
|
-
description: e.applicationScoped ? ( localize(
|
|
278
|
+
description: e.applicationScoped ? ( localize(9004, "All Profiles")) : undefined,
|
|
279
279
|
collapsibleState: TreeItemCollapsibleState.None,
|
|
280
280
|
checkbox: that.checkbox ? {
|
|
281
281
|
get isChecked() { return !( (that.excludedExtensions.has(e.identifier.id.toLowerCase()))); },
|
|
@@ -287,9 +287,9 @@ class ExtensionsResourceTreeItem {
|
|
|
287
287
|
that.excludedExtensions.add(e.identifier.id.toLowerCase());
|
|
288
288
|
}
|
|
289
289
|
},
|
|
290
|
-
tooltip: ( localize(
|
|
290
|
+
tooltip: ( localize(9005, "Select {0} Extension", e.displayName || e.identifier.id)),
|
|
291
291
|
accessibilityInformation: {
|
|
292
|
-
label: ( localize(
|
|
292
|
+
label: ( localize(9005, "Select {0} Extension", e.displayName || e.identifier.id)),
|
|
293
293
|
}
|
|
294
294
|
} : undefined,
|
|
295
295
|
themeIcon: Codicon.extensions,
|
|
@@ -83,7 +83,7 @@ class GlobalStateResourceTreeItem {
|
|
|
83
83
|
this.uriIdentityService = uriIdentityService;
|
|
84
84
|
this.type = "globalState" ;
|
|
85
85
|
this.handle = "globalState" ;
|
|
86
|
-
this.label = { label: ( localize(
|
|
86
|
+
this.label = { label: ( localize(8997, "UI State")) };
|
|
87
87
|
this.collapsibleState = TreeItemCollapsibleState.Collapsed;
|
|
88
88
|
}
|
|
89
89
|
async getChildren() {
|
|
@@ -80,7 +80,7 @@ let KeybindingsResourceTreeItem = class KeybindingsResourceTreeItem {
|
|
|
80
80
|
this.instantiationService = instantiationService;
|
|
81
81
|
this.type = "keybindings" ;
|
|
82
82
|
this.handle = "keybindings" ;
|
|
83
|
-
this.label = { label: ( localize(
|
|
83
|
+
this.label = { label: ( localize(8998, "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 = "settings" ;
|
|
103
103
|
this.handle = "settings" ;
|
|
104
|
-
this.label = { label: ( localize(
|
|
104
|
+
this.label = { label: ( localize(8996, "Settings")) };
|
|
105
105
|
this.collapsibleState = TreeItemCollapsibleState.Expanded;
|
|
106
106
|
}
|
|
107
107
|
async getChildren() {
|
|
@@ -92,7 +92,7 @@ let SnippetsResourceTreeItem = class SnippetsResourceTreeItem {
|
|
|
92
92
|
this.uriIdentityService = uriIdentityService;
|
|
93
93
|
this.type = "snippets" ;
|
|
94
94
|
this.handle = ( (this.profile.snippetsHome.toString()));
|
|
95
|
-
this.label = { label: ( localize(
|
|
95
|
+
this.label = { label: ( localize(9000, "Snippets")) };
|
|
96
96
|
this.collapsibleState = TreeItemCollapsibleState.Collapsed;
|
|
97
97
|
this.excludedSnippets = ( (new ResourceSet()));
|
|
98
98
|
}
|
|
@@ -120,7 +120,7 @@ let SnippetsResourceTreeItem = class SnippetsResourceTreeItem {
|
|
|
120
120
|
},
|
|
121
121
|
accessibilityInformation: {
|
|
122
122
|
label: ( localize(
|
|
123
|
-
|
|
123
|
+
9001,
|
|
124
124
|
"Select Snippet {0}",
|
|
125
125
|
this.uriIdentityService.extUri.basename(resource)
|
|
126
126
|
)),
|
|
@@ -79,7 +79,7 @@ let TasksResourceTreeItem = class TasksResourceTreeItem {
|
|
|
79
79
|
this.instantiationService = instantiationService;
|
|
80
80
|
this.type = "tasks" ;
|
|
81
81
|
this.handle = "tasks" ;
|
|
82
|
-
this.label = { label: ( localize(
|
|
82
|
+
this.label = { label: ( localize(8999, "Tasks")) };
|
|
83
83
|
this.collapsibleState = TreeItemCollapsibleState.Expanded;
|
|
84
84
|
}
|
|
85
85
|
async getChildren() {
|
|
@@ -85,7 +85,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
85
85
|
sticky: true,
|
|
86
86
|
cancellable: true,
|
|
87
87
|
}, async (progress) => {
|
|
88
|
-
const reportProgress = (message) => progress.report({ message: ( localize(
|
|
88
|
+
const reportProgress = (message) => progress.report({ message: ( localize(3685, "Create Profile: {0}", message)) });
|
|
89
89
|
creationPromise = createCancelablePromise(async (token) => {
|
|
90
90
|
const userDataProfilesExportState = disposables.add(this.instantiationService.createInstance(UserDataProfileExportState, from, { ...options?.resourceTypeFlags, extensions: false }));
|
|
91
91
|
const profileTemplate = await userDataProfilesExportState.getProfileTemplate(options.name ?? from.name, options?.icon);
|
|
@@ -101,7 +101,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
101
101
|
try {
|
|
102
102
|
await creationPromise;
|
|
103
103
|
if (profile && (options?.resourceTypeFlags?.extensions ?? true)) {
|
|
104
|
-
reportProgress(( localize(
|
|
104
|
+
reportProgress(( localize(3686, "Installing Extensions...")));
|
|
105
105
|
await this.instantiationService.createInstance(ExtensionsResource).copy(from, profile, false);
|
|
106
106
|
}
|
|
107
107
|
}
|
|
@@ -125,7 +125,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
125
125
|
sticky: true,
|
|
126
126
|
cancellable: true,
|
|
127
127
|
}, async (progress) => {
|
|
128
|
-
const reportProgress = (message) => progress.report({ message: ( localize(
|
|
128
|
+
const reportProgress = (message) => progress.report({ message: ( localize(3685, "Create Profile: {0}", message)) });
|
|
129
129
|
creationPromise = createCancelablePromise(async (token) => {
|
|
130
130
|
profile = await this.getProfileToImport({ ...profileTemplate, name: options.name ?? profileTemplate.name }, !!options.transient, options);
|
|
131
131
|
if (!profile) {
|
|
@@ -150,42 +150,42 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
150
150
|
}
|
|
151
151
|
async applyProfileTemplate(profileTemplate, profile, options, reportProgress, token) {
|
|
152
152
|
if (profileTemplate.settings && (options.resourceTypeFlags?.settings ?? true) && !profile.useDefaultFlags?.settings) {
|
|
153
|
-
reportProgress(( localize(
|
|
153
|
+
reportProgress(( localize(3687, "Creating Settings...")));
|
|
154
154
|
await this.instantiationService.createInstance(SettingsResource).apply(profileTemplate.settings, profile);
|
|
155
155
|
}
|
|
156
156
|
if (token.isCancellationRequested) {
|
|
157
157
|
return;
|
|
158
158
|
}
|
|
159
159
|
if (profileTemplate.keybindings && (options.resourceTypeFlags?.keybindings ?? true) && !profile.useDefaultFlags?.keybindings) {
|
|
160
|
-
reportProgress(( localize(
|
|
160
|
+
reportProgress(( localize(3688, "Creating Keyboard Shortcuts...")));
|
|
161
161
|
await this.instantiationService.createInstance(KeybindingsResource).apply(profileTemplate.keybindings, profile);
|
|
162
162
|
}
|
|
163
163
|
if (token.isCancellationRequested) {
|
|
164
164
|
return;
|
|
165
165
|
}
|
|
166
166
|
if (profileTemplate.tasks && (options.resourceTypeFlags?.tasks ?? true) && !profile.useDefaultFlags?.tasks) {
|
|
167
|
-
reportProgress(( localize(
|
|
167
|
+
reportProgress(( localize(3689, "Creating Tasks...")));
|
|
168
168
|
await this.instantiationService.createInstance(TasksResource).apply(profileTemplate.tasks, profile);
|
|
169
169
|
}
|
|
170
170
|
if (token.isCancellationRequested) {
|
|
171
171
|
return;
|
|
172
172
|
}
|
|
173
173
|
if (profileTemplate.snippets && (options.resourceTypeFlags?.snippets ?? true) && !profile.useDefaultFlags?.snippets) {
|
|
174
|
-
reportProgress(( localize(
|
|
174
|
+
reportProgress(( localize(3690, "Creating Snippets...")));
|
|
175
175
|
await this.instantiationService.createInstance(SnippetsResource).apply(profileTemplate.snippets, profile);
|
|
176
176
|
}
|
|
177
177
|
if (token.isCancellationRequested) {
|
|
178
178
|
return;
|
|
179
179
|
}
|
|
180
180
|
if (profileTemplate.globalState && !profile.useDefaultFlags?.globalState) {
|
|
181
|
-
reportProgress(( localize(
|
|
181
|
+
reportProgress(( localize(3691, "Applying UI State...")));
|
|
182
182
|
await this.instantiationService.createInstance(GlobalStateResource).apply(profileTemplate.globalState, profile);
|
|
183
183
|
}
|
|
184
184
|
if (token.isCancellationRequested) {
|
|
185
185
|
return;
|
|
186
186
|
}
|
|
187
187
|
if (profileTemplate.extensions && (options.resourceTypeFlags?.extensions ?? true) && !profile.useDefaultFlags?.extensions) {
|
|
188
|
-
reportProgress(( localize(
|
|
188
|
+
reportProgress(( localize(3686, "Installing Extensions...")));
|
|
189
189
|
await this.instantiationService.createInstance(ExtensionsResource).apply(profileTemplate.extensions, profile, reportProgress, token);
|
|
190
190
|
}
|
|
191
191
|
}
|
|
@@ -202,18 +202,18 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
202
202
|
async createTroubleshootProfile() {
|
|
203
203
|
const userDataProfilesExportState = this.instantiationService.createInstance(UserDataProfileExportState, this.userDataProfileService.currentProfile, undefined);
|
|
204
204
|
try {
|
|
205
|
-
const profileTemplate = await userDataProfilesExportState.getProfileTemplate(( localize(
|
|
205
|
+
const profileTemplate = await userDataProfilesExportState.getProfileTemplate(( localize(3692, "Troubleshoot Issue")), undefined);
|
|
206
206
|
await this.progressService.withProgress({
|
|
207
207
|
location: 15 ,
|
|
208
208
|
delay: 1000,
|
|
209
209
|
sticky: true,
|
|
210
210
|
}, async (progress) => {
|
|
211
|
-
const reportProgress = (message) => progress.report({ message: ( localize(
|
|
211
|
+
const reportProgress = (message) => progress.report({ message: ( localize(3693, "Setting up Troubleshoot Profile: {0}", message)) });
|
|
212
212
|
const profile = await this.doCreateProfile(profileTemplate, true, false, { useDefaultFlags: this.userDataProfileService.currentProfile.useDefaultFlags }, reportProgress);
|
|
213
213
|
if (profile) {
|
|
214
|
-
reportProgress(( localize(
|
|
214
|
+
reportProgress(( localize(3694, "Applying Extensions...")));
|
|
215
215
|
await this.instantiationService.createInstance(ExtensionsResource).copy(this.userDataProfileService.currentProfile, profile, true);
|
|
216
|
-
reportProgress(( localize(
|
|
216
|
+
reportProgress(( localize(3695, "Switching Profile...")));
|
|
217
217
|
await this.userDataProfileManagementService.switchProfile(profile);
|
|
218
218
|
}
|
|
219
219
|
});
|
|
@@ -231,7 +231,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
231
231
|
try {
|
|
232
232
|
await this.progressService.withProgress({
|
|
233
233
|
location,
|
|
234
|
-
title: ( localize(
|
|
234
|
+
title: ( localize(3696, "{0}: Exporting...", PROFILES_CATEGORY.value)),
|
|
235
235
|
}, async (progress) => {
|
|
236
236
|
const id = await this.pickProfileContentHandler(profile.name);
|
|
237
237
|
if (!id) {
|
|
@@ -245,17 +245,17 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
245
245
|
if (!saveResult) {
|
|
246
246
|
return;
|
|
247
247
|
}
|
|
248
|
-
const message = ( localize(
|
|
248
|
+
const message = ( localize(3697, "Profile '{0}' was exported successfully.", profile.name));
|
|
249
249
|
if (profileContentHandler.extensionId) {
|
|
250
250
|
const buttons = [];
|
|
251
251
|
const link = this.productService.webUrl ? `${this.productService.webUrl}/${PROFILE_URL_AUTHORITY}/${id}/${saveResult.id}` : ( (toUserDataProfileUri(`/${id}/${saveResult.id}`, this.productService).toString()));
|
|
252
252
|
buttons.push({
|
|
253
|
-
label: ( localize(
|
|
253
|
+
label: ( localize(3698, "&&Copy Link")),
|
|
254
254
|
run: () => this.clipboardService.writeText(link)
|
|
255
255
|
});
|
|
256
256
|
if (this.productService.webUrl) {
|
|
257
257
|
buttons.push({
|
|
258
|
-
label: ( localize(
|
|
258
|
+
label: ( localize(3699, "&&Open Link")),
|
|
259
259
|
run: async () => {
|
|
260
260
|
await this.openerService.open(link);
|
|
261
261
|
}
|
|
@@ -263,7 +263,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
263
263
|
}
|
|
264
264
|
else {
|
|
265
265
|
buttons.push({
|
|
266
|
-
label: ( localize(
|
|
266
|
+
label: ( localize(3700, "&&Open in {0}", profileContentHandler.name)),
|
|
267
267
|
run: async () => {
|
|
268
268
|
await this.openerService.open(( (saveResult.link.toString())));
|
|
269
269
|
}
|
|
@@ -273,7 +273,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
273
273
|
type: Severity$1.Info,
|
|
274
274
|
message,
|
|
275
275
|
buttons,
|
|
276
|
-
cancelButton: ( localize(
|
|
276
|
+
cancelButton: ( localize(3701, "Close"))
|
|
277
277
|
});
|
|
278
278
|
}
|
|
279
279
|
else {
|
|
@@ -295,10 +295,10 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
295
295
|
profileTemplate = JSON.parse(profileContent);
|
|
296
296
|
}
|
|
297
297
|
catch (error) {
|
|
298
|
-
throw ( (new Error(localize(
|
|
298
|
+
throw ( (new Error(localize(3702, "This profile is not valid."))));
|
|
299
299
|
}
|
|
300
300
|
if (!isUserDataProfileTemplate(profileTemplate)) {
|
|
301
|
-
throw ( (new Error(localize(
|
|
301
|
+
throw ( (new Error(localize(3702, "This profile is not valid."))));
|
|
302
302
|
}
|
|
303
303
|
if (options?.name) {
|
|
304
304
|
profileTemplate.name = options.name;
|
|
@@ -332,27 +332,27 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
332
332
|
return undefined;
|
|
333
333
|
}
|
|
334
334
|
if (profileTemplate.settings && !profile.useDefaultFlags?.settings) {
|
|
335
|
-
progress(( localize(
|
|
335
|
+
progress(( localize(3703, "Applying Settings...")));
|
|
336
336
|
await this.instantiationService.createInstance(SettingsResource).apply(profileTemplate.settings, profile);
|
|
337
337
|
}
|
|
338
338
|
if (profileTemplate.keybindings && !profile.useDefaultFlags?.keybindings) {
|
|
339
|
-
progress(( localize(
|
|
339
|
+
progress(( localize(3704, "Applying Keyboard Shortcuts...")));
|
|
340
340
|
await this.instantiationService.createInstance(KeybindingsResource).apply(profileTemplate.keybindings, profile);
|
|
341
341
|
}
|
|
342
342
|
if (profileTemplate.tasks && !profile.useDefaultFlags?.tasks) {
|
|
343
|
-
progress(( localize(
|
|
343
|
+
progress(( localize(3705, "Applying Tasks...")));
|
|
344
344
|
await this.instantiationService.createInstance(TasksResource).apply(profileTemplate.tasks, profile);
|
|
345
345
|
}
|
|
346
346
|
if (profileTemplate.snippets && !profile.useDefaultFlags?.snippets) {
|
|
347
|
-
progress(( localize(
|
|
347
|
+
progress(( localize(3706, "Applying Snippets...")));
|
|
348
348
|
await this.instantiationService.createInstance(SnippetsResource).apply(profileTemplate.snippets, profile);
|
|
349
349
|
}
|
|
350
350
|
if (profileTemplate.globalState && !profile.useDefaultFlags?.globalState) {
|
|
351
|
-
progress(( localize(
|
|
351
|
+
progress(( localize(3707, "Applying State...")));
|
|
352
352
|
await this.instantiationService.createInstance(GlobalStateResource).apply(profileTemplate.globalState, profile);
|
|
353
353
|
}
|
|
354
354
|
if (profileTemplate.extensions && extensions && !profile.useDefaultFlags?.extensions) {
|
|
355
|
-
progress(( localize(
|
|
355
|
+
progress(( localize(3694, "Applying Extensions...")));
|
|
356
356
|
await this.instantiationService.createInstance(ExtensionsResource).apply(profileTemplate.extensions, profile);
|
|
357
357
|
}
|
|
358
358
|
return profile;
|
|
@@ -405,7 +405,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
405
405
|
options.push({ id, label: profileContentHandler.name, description: profileContentHandler.description });
|
|
406
406
|
}
|
|
407
407
|
const result = await this.quickInputService.pick(options.reverse(), {
|
|
408
|
-
title: ( localize(
|
|
408
|
+
title: ( localize(3708, "Export '{0}' profile as...", name)),
|
|
409
409
|
hideInput: true
|
|
410
410
|
});
|
|
411
411
|
return result?.id;
|
|
@@ -420,11 +420,11 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
420
420
|
const { confirmed } = await this.dialogService.confirm({
|
|
421
421
|
type: Severity$1.Info,
|
|
422
422
|
message: ( localize(
|
|
423
|
-
|
|
423
|
+
3709,
|
|
424
424
|
"Profile with name '{0}' already exists. Do you want to replace its contents?",
|
|
425
425
|
profileName
|
|
426
426
|
)),
|
|
427
|
-
primaryButton: ( localize(
|
|
427
|
+
primaryButton: ( localize(3710, "&&Replace"))
|
|
428
428
|
});
|
|
429
429
|
if (!confirmed) {
|
|
430
430
|
return undefined;
|
|
@@ -468,12 +468,12 @@ let FileUserDataProfileContentHandler = class FileUserDataProfileContentHandler
|
|
|
468
468
|
this.fileService = fileService;
|
|
469
469
|
this.productService = productService;
|
|
470
470
|
this.textFileService = textFileService;
|
|
471
|
-
this.name = ( localize(
|
|
472
|
-
this.description = ( localize(
|
|
471
|
+
this.name = ( localize(3711, "Local"));
|
|
472
|
+
this.description = ( localize(3712, "file"));
|
|
473
473
|
}
|
|
474
474
|
async saveProfile(name, content, token) {
|
|
475
475
|
const link = await this.fileDialogService.showSaveDialog({
|
|
476
|
-
title: ( localize(
|
|
476
|
+
title: ( localize(3713, "Save Profile")),
|
|
477
477
|
filters: PROFILE_FILTER,
|
|
478
478
|
defaultUri: this.uriIdentityService.extUri.joinPath(await this.fileDialogService.defaultFilePath(), `${name}.${PROFILE_EXTENSION}`),
|
|
479
479
|
});
|
|
@@ -500,7 +500,7 @@ let FileUserDataProfileContentHandler = class FileUserDataProfileContentHandler
|
|
|
500
500
|
canSelectFiles: true,
|
|
501
501
|
canSelectMany: false,
|
|
502
502
|
filters: PROFILE_FILTER,
|
|
503
|
-
title: ( localize(
|
|
503
|
+
title: ( localize(3714, "Select Profile")),
|
|
504
504
|
});
|
|
505
505
|
return profileLocation ? profileLocation[0] : null;
|
|
506
506
|
}
|
|
@@ -547,13 +547,13 @@ let UserDataProfileImportExportState = class UserDataProfileImportExportState ex
|
|
|
547
547
|
for (const root of this.roots) {
|
|
548
548
|
root.checkbox = {
|
|
549
549
|
isChecked: !root.isFromDefaultProfile(),
|
|
550
|
-
tooltip: ( localize(
|
|
550
|
+
tooltip: ( localize(3715, "Select {0}", root.label.label)),
|
|
551
551
|
accessibilityInformation: {
|
|
552
|
-
label: ( localize(
|
|
552
|
+
label: ( localize(3715, "Select {0}", root.label.label)),
|
|
553
553
|
}
|
|
554
554
|
};
|
|
555
555
|
if (root.isFromDefaultProfile()) {
|
|
556
|
-
root.description = ( localize(
|
|
556
|
+
root.description = ( localize(3716, "From Default Profile"));
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
559
|
return this.roots;
|
|
@@ -715,11 +715,11 @@ let UserDataProfileExportState = class UserDataProfileExportState extends UserDa
|
|
|
715
715
|
let name = this.profile.name;
|
|
716
716
|
if (this.profile.isDefault) {
|
|
717
717
|
name = await this.quickInputService.input({
|
|
718
|
-
placeHolder: ( localize(
|
|
719
|
-
title: ( localize(
|
|
718
|
+
placeHolder: ( localize(3717, "Name the profile")),
|
|
719
|
+
title: ( localize(3718, "Export Profile")),
|
|
720
720
|
async validateInput(input) {
|
|
721
721
|
if (!input.trim()) {
|
|
722
|
-
return ( localize(
|
|
722
|
+
return ( localize(3719, "Profile name must be provided."));
|
|
723
723
|
}
|
|
724
724
|
return undefined;
|
|
725
725
|
},
|
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
|
+
3720,
|
|
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
|
+
3721,
|
|
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
|
+
3722,
|
|
64
64
|
"The current profile has been updated. Please reload to switch back to the updated profile"
|
|
65
65
|
)));
|
|
66
66
|
}
|
|
@@ -122,7 +122,7 @@ let UserDataProfileManagementService = class UserDataProfileManagementService ex
|
|
|
122
122
|
throw ( (new Error(`Profile ${profile.name} does not exist`)));
|
|
123
123
|
}
|
|
124
124
|
if (profile.isDefault) {
|
|
125
|
-
throw ( (new Error(localize(
|
|
125
|
+
throw ( (new Error(localize(3723, "Cannot rename the default profile"))));
|
|
126
126
|
}
|
|
127
127
|
const updatedProfile = await this.userDataProfilesService.updateProfile(profile, updateOptions);
|
|
128
128
|
this.telemetryService.publicLog2('profileManagementActionExecuted', { id: 'updateProfile' });
|
|
@@ -133,7 +133,7 @@ let UserDataProfileManagementService = class UserDataProfileManagementService ex
|
|
|
133
133
|
throw ( (new Error(`Profile ${profile.name} does not exist`)));
|
|
134
134
|
}
|
|
135
135
|
if (profile.isDefault) {
|
|
136
|
-
throw ( (new Error(localize(
|
|
136
|
+
throw ( (new Error(localize(3724, "Cannot delete the default profile"))));
|
|
137
137
|
}
|
|
138
138
|
await this.userDataProfilesService.removeProfile(profile);
|
|
139
139
|
this.telemetryService.publicLog2('profileManagementActionExecuted', { id: 'removeProfile' });
|
|
@@ -178,7 +178,7 @@ let UserDataProfileManagementService = class UserDataProfileManagementService ex
|
|
|
178
178
|
const shouldRestartExtensionHosts = this.userDataProfileService.currentProfile.id !== profile.id || !equals(this.userDataProfileService.currentProfile.useDefaultFlags, profile.useDefaultFlags);
|
|
179
179
|
if (shouldRestartExtensionHosts) {
|
|
180
180
|
if (!isRemoteWindow) {
|
|
181
|
-
if (!(await this.extensionService.stopExtensionHosts(( localize(
|
|
181
|
+
if (!(await this.extensionService.stopExtensionHosts(( localize(3725, "Switching to a profile."))))) {
|
|
182
182
|
if (( (this.userDataProfilesService.profiles.some(p => p.id === this.userDataProfileService.currentProfile.id)))) {
|
|
183
183
|
await this.userDataProfilesService.setProfileForWorkspace(toWorkspaceIdentifier(this.workspaceContextService.getWorkspace()), this.userDataProfileService.currentProfile);
|
|
184
184
|
}
|
|
@@ -190,8 +190,8 @@ let UserDataProfileManagementService = class UserDataProfileManagementService ex
|
|
|
190
190
|
if (shouldRestartExtensionHosts) {
|
|
191
191
|
if (isRemoteWindow) {
|
|
192
192
|
const { confirmed } = await this.dialogService.confirm({
|
|
193
|
-
message: reloadMessage ?? ( localize(
|
|
194
|
-
primaryButton: ( localize(
|
|
193
|
+
message: reloadMessage ?? ( localize(3726, "Switching a profile requires reloading VS Code.")),
|
|
194
|
+
primaryButton: ( localize(3727, "&&Reload")),
|
|
195
195
|
});
|
|
196
196
|
if (confirmed) {
|
|
197
197
|
await this.hostService.reload();
|