@codingame/monaco-vscode-user-data-profile-service-override 30.0.0 → 31.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfile.js +29 -27
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfileActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditor.js +79 -79
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditorModel.js +26 -26
- package/vscode/src/vs/workbench/services/userDataProfile/browser/extensionsResource.js +5 -5
- package/vscode/src/vs/workbench/services/userDataProfile/browser/globalStateResource.js +1 -1
- package/vscode/src/vs/workbench/services/userDataProfile/browser/keybindingsResource.js +1 -1
- package/vscode/src/vs/workbench/services/userDataProfile/browser/mcpProfileResource.js +1 -1
- package/vscode/src/vs/workbench/services/userDataProfile/browser/settingsResource.js +1 -1
- package/vscode/src/vs/workbench/services/userDataProfile/browser/snippetsResource.js +2 -2
- package/vscode/src/vs/workbench/services/userDataProfile/browser/tasksResource.js +1 -1
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileImportExportService.js +39 -39
- 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": "
|
|
3
|
+
"version": "31.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - user-data-profile service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "
|
|
18
|
+
"@codingame/monaco-vscode-api": "31.0.0"
|
|
19
19
|
},
|
|
20
20
|
"main": "index.js",
|
|
21
21
|
"module": "index.js",
|
|
@@ -3,6 +3,7 @@ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib
|
|
|
3
3
|
import { Disposable, MutableDisposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
4
|
import { isWeb } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
5
5
|
import { localize, localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
6
|
+
import { IsSessionsWindowContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contextkeys';
|
|
6
7
|
import { MenuId, MenuRegistry, registerAction2, Action2 } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
7
8
|
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
8
9
|
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
@@ -108,7 +109,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
108
109
|
}
|
|
109
110
|
registerEditor() {
|
|
110
111
|
( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(
|
|
111
|
-
EditorPaneDescriptor.create(UserDataProfilesEditor, UserDataProfilesEditor.ID, ( localize(
|
|
112
|
+
EditorPaneDescriptor.create(UserDataProfilesEditor, UserDataProfilesEditor.ID, ( localize(15082, "Profiles Editor"))),
|
|
112
113
|
[( new SyncDescriptor(UserDataProfilesEditorInput))]
|
|
113
114
|
);
|
|
114
115
|
( Registry.as(EditorExtensions.EditorFactory)).registerEditorSerializer(UserDataProfilesEditorInput.ID, UserDataProfilesEditorInputSerializer);
|
|
@@ -126,7 +127,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
126
127
|
if (uriIdentityService.extUri.extname(resource) === `.${PROFILE_EXTENSION}`) {
|
|
127
128
|
const template = await userDataProfileImportExportService.resolveProfileTemplate(resource);
|
|
128
129
|
if (!template) {
|
|
129
|
-
notificationService.warn(( localize(
|
|
130
|
+
notificationService.warn(( localize(15083, "The dropped profile is invalid.")));
|
|
130
131
|
editorService.openEditor(textEditorService.createTextEditor({
|
|
131
132
|
resource
|
|
132
133
|
}));
|
|
@@ -164,7 +165,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
164
165
|
}
|
|
165
166
|
registerProfileSubMenu() {
|
|
166
167
|
const getProfilesTitle = () => {
|
|
167
|
-
return localize(
|
|
168
|
+
return localize(15084, "Profile ({0})", this.userDataProfileService.currentProfile.name);
|
|
168
169
|
};
|
|
169
170
|
MenuRegistry.appendMenuItem(MenuId.GlobalActivity, {
|
|
170
171
|
get title() {
|
|
@@ -182,15 +183,16 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
182
183
|
submenu: ProfilesMenu,
|
|
183
184
|
group: "2_configuration",
|
|
184
185
|
order: 1,
|
|
185
|
-
when: HAS_PROFILES_CONTEXT
|
|
186
|
+
when: ( ContextKeyExpr.and(HAS_PROFILES_CONTEXT, ( IsSessionsWindowContext.negate())))
|
|
186
187
|
});
|
|
187
188
|
}
|
|
188
189
|
registerOpenProfileSubMenu() {
|
|
189
190
|
MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
|
|
190
|
-
title: ( localize(
|
|
191
|
+
title: ( localize(15085, "New Window with Profile")),
|
|
191
192
|
submenu: OpenProfileMenu,
|
|
192
193
|
group: "1_new",
|
|
193
|
-
order: 4
|
|
194
|
+
order: 4,
|
|
195
|
+
when: ( IsSessionsWindowContext.negate())
|
|
194
196
|
});
|
|
195
197
|
}
|
|
196
198
|
registerProfilesActions() {
|
|
@@ -210,7 +212,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
210
212
|
id: `workbench.profiles.actions.profileEntry.${profile.id}`,
|
|
211
213
|
title: profile.name,
|
|
212
214
|
metadata: {
|
|
213
|
-
description: ( localize2(
|
|
215
|
+
description: ( localize2(15086, "Switch to {0} profile", profile.name))
|
|
214
216
|
},
|
|
215
217
|
toggled: ( ContextKeyExpr.equals(CURRENT_PROFILE_CONTEXT.key, profile.id)),
|
|
216
218
|
menu: [{
|
|
@@ -231,7 +233,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
231
233
|
constructor() {
|
|
232
234
|
super({
|
|
233
235
|
id: `workbench.profiles.actions.newWindowWithProfile`,
|
|
234
|
-
title: ( localize2(
|
|
236
|
+
title: ( localize2(15087, "New Window with Profile...")),
|
|
235
237
|
category: PROFILES_CATEGORY,
|
|
236
238
|
precondition: HAS_PROFILES_CONTEXT,
|
|
237
239
|
f1: true
|
|
@@ -245,8 +247,8 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
245
247
|
label: profile.name,
|
|
246
248
|
profile
|
|
247
249
|
}))), {
|
|
248
|
-
title: ( localize(
|
|
249
|
-
placeHolder: ( localize(
|
|
250
|
+
title: ( localize(15088, "New Window with Profile")),
|
|
251
|
+
placeHolder: ( localize(15089, "Select Profile")),
|
|
250
252
|
canPickMany: false
|
|
251
253
|
});
|
|
252
254
|
if (pick) {
|
|
@@ -266,9 +268,9 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
266
268
|
constructor() {
|
|
267
269
|
super({
|
|
268
270
|
id,
|
|
269
|
-
title: ( localize2(
|
|
271
|
+
title: ( localize2(15090, "{0}", profile.name)),
|
|
270
272
|
metadata: {
|
|
271
|
-
description: ( localize2(
|
|
273
|
+
description: ( localize2(15091, "Open New Window with {0} Profile", profile.name))
|
|
272
274
|
},
|
|
273
275
|
menu: {
|
|
274
276
|
id: OpenProfileMenu,
|
|
@@ -289,7 +291,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
289
291
|
command: {
|
|
290
292
|
id,
|
|
291
293
|
category: PROFILES_CATEGORY,
|
|
292
|
-
title: ( localize2(
|
|
294
|
+
title: ( localize2(15092, "Open {0} Profile", profile.name)),
|
|
293
295
|
precondition
|
|
294
296
|
}
|
|
295
297
|
}));
|
|
@@ -301,7 +303,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
301
303
|
constructor() {
|
|
302
304
|
super({
|
|
303
305
|
id: `workbench.profiles.actions.switchProfile`,
|
|
304
|
-
title: ( localize2(
|
|
306
|
+
title: ( localize2(15093, "Switch Profile...")),
|
|
305
307
|
category: PROFILES_CATEGORY,
|
|
306
308
|
f1: true
|
|
307
309
|
});
|
|
@@ -317,7 +319,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
317
319
|
});
|
|
318
320
|
}
|
|
319
321
|
const result = await quickInputService.pick(items.sort((a, b) => a.profile.name.localeCompare(b.profile.name)), {
|
|
320
|
-
placeHolder: ( localize(
|
|
322
|
+
placeHolder: ( localize(15094, "Select Profile"))
|
|
321
323
|
});
|
|
322
324
|
if (result) {
|
|
323
325
|
await that.userDataProfileManagementService.switchProfile(result.profile);
|
|
@@ -332,8 +334,8 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
332
334
|
super({
|
|
333
335
|
id: `workbench.profiles.actions.manageProfiles`,
|
|
334
336
|
title: {
|
|
335
|
-
...( localize2(
|
|
336
|
-
mnemonicTitle: ( localize(
|
|
337
|
+
...( localize2(15095, "Profiles")),
|
|
338
|
+
mnemonicTitle: ( localize(15096, "&&Profiles"))
|
|
337
339
|
},
|
|
338
340
|
menu: [{
|
|
339
341
|
id: MenuId.GlobalActivity,
|
|
@@ -344,7 +346,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
344
346
|
id: MenuId.MenubarPreferencesMenu,
|
|
345
347
|
group: "2_configuration",
|
|
346
348
|
order: 1,
|
|
347
|
-
when: ( HAS_PROFILES_CONTEXT.negate())
|
|
349
|
+
when: ( ContextKeyExpr.and(( HAS_PROFILES_CONTEXT.negate()), ( IsSessionsWindowContext.negate())))
|
|
348
350
|
}, {
|
|
349
351
|
id: ProfilesMenu,
|
|
350
352
|
group: "1_manage",
|
|
@@ -362,7 +364,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
362
364
|
command: {
|
|
363
365
|
id: "workbench.profiles.actions.manageProfiles",
|
|
364
366
|
category: Categories.Preferences,
|
|
365
|
-
title: ( localize2(
|
|
367
|
+
title: ( localize2(15097, "Open Profiles (UI)"))
|
|
366
368
|
}
|
|
367
369
|
}));
|
|
368
370
|
return disposables;
|
|
@@ -375,7 +377,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
375
377
|
constructor() {
|
|
376
378
|
super({
|
|
377
379
|
id,
|
|
378
|
-
title: ( localize2(
|
|
380
|
+
title: ( localize2(15098, "Export Profile...")),
|
|
379
381
|
category: PROFILES_CATEGORY,
|
|
380
382
|
f1: true
|
|
381
383
|
});
|
|
@@ -389,7 +391,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
389
391
|
command: {
|
|
390
392
|
id,
|
|
391
393
|
title: ( localize2(
|
|
392
|
-
|
|
394
|
+
15099,
|
|
393
395
|
"Export Profile ({0})...",
|
|
394
396
|
that.userDataProfileService.currentProfile.name
|
|
395
397
|
))
|
|
@@ -403,7 +405,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
403
405
|
constructor() {
|
|
404
406
|
super({
|
|
405
407
|
id: "workbench.profiles.actions.createFromCurrentProfile",
|
|
406
|
-
title: ( localize2(
|
|
408
|
+
title: ( localize2(15100, "Save Current Profile As...")),
|
|
407
409
|
category: PROFILES_CATEGORY,
|
|
408
410
|
f1: true
|
|
409
411
|
});
|
|
@@ -420,7 +422,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
420
422
|
constructor() {
|
|
421
423
|
super({
|
|
422
424
|
id: "workbench.profiles.actions.createProfile",
|
|
423
|
-
title: ( localize2(
|
|
425
|
+
title: ( localize2(15101, "New Profile...")),
|
|
424
426
|
category: PROFILES_CATEGORY,
|
|
425
427
|
f1: true,
|
|
426
428
|
menu: [{
|
|
@@ -441,7 +443,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
441
443
|
constructor() {
|
|
442
444
|
super({
|
|
443
445
|
id: "workbench.profiles.actions.deleteProfile",
|
|
444
|
-
title: ( localize2(
|
|
446
|
+
title: ( localize2(15102, "Delete Profile...")),
|
|
445
447
|
category: PROFILES_CATEGORY,
|
|
446
448
|
f1: true,
|
|
447
449
|
precondition: HAS_PROFILES_CONTEXT
|
|
@@ -457,11 +459,11 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
457
459
|
if (profiles.length) {
|
|
458
460
|
const picks = await quickInputService.pick(( profiles.map(profile => ({
|
|
459
461
|
label: profile.name,
|
|
460
|
-
description: profile.id === userDataProfileService.currentProfile.id ? ( localize(
|
|
462
|
+
description: profile.id === userDataProfileService.currentProfile.id ? ( localize(15103, "Current")) : undefined,
|
|
461
463
|
profile
|
|
462
464
|
}))), {
|
|
463
|
-
title: ( localize(
|
|
464
|
-
placeHolder: ( localize(
|
|
465
|
+
title: ( localize(15104, "Delete Profile...")),
|
|
466
|
+
placeHolder: ( localize(15105, "Select Profiles to Delete")),
|
|
465
467
|
canPickMany: true
|
|
466
468
|
});
|
|
467
469
|
if (picks) {
|
|
@@ -11,7 +11,7 @@ class CreateTransientProfileAction extends Action2 {
|
|
|
11
11
|
this.ID = "workbench.profiles.actions.createTemporaryProfile";
|
|
12
12
|
}
|
|
13
13
|
static {
|
|
14
|
-
this.TITLE = ( localize2(
|
|
14
|
+
this.TITLE = ( localize2(15106, "New Window with Temporary Profile"));
|
|
15
15
|
}
|
|
16
16
|
constructor() {
|
|
17
17
|
super({
|
|
@@ -32,7 +32,7 @@ registerAction2(class CleanupProfilesAction extends Action2 {
|
|
|
32
32
|
constructor() {
|
|
33
33
|
super({
|
|
34
34
|
id: "workbench.profiles.actions.cleanupProfiles",
|
|
35
|
-
title: ( localize2(
|
|
35
|
+
title: ( localize2(15107, "Cleanup Profiles")),
|
|
36
36
|
category: Categories.Developer,
|
|
37
37
|
f1: true
|
|
38
38
|
});
|
|
@@ -45,7 +45,7 @@ registerAction2(class ResetWorkspacesAction extends Action2 {
|
|
|
45
45
|
constructor() {
|
|
46
46
|
super({
|
|
47
47
|
id: "workbench.profiles.actions.resetWorkspaces",
|
|
48
|
-
title: ( localize2(
|
|
48
|
+
title: ( localize2(15108, "Reset Workspace Profiles Associations")),
|
|
49
49
|
category: Categories.Developer,
|
|
50
50
|
f1: true
|
|
51
51
|
});
|