@codingame/monaco-vscode-user-data-profile-service-override 8.0.4 → 9.0.2

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.
Files changed (19) hide show
  1. package/package.json +2 -2
  2. package/vscode/src/vs/base/browser/ui/radio/radio.js +2 -2
  3. package/vscode/src/vs/platform/userDataSync/common/keybindingsSync.js +2 -2
  4. package/vscode/src/vs/platform/userDataSync/common/settingsSync.js +1 -1
  5. package/vscode/src/vs/workbench/contrib/userDataProfile/browser/media/userDataProfilesEditor.css.js +1 -1
  6. package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfile.contribution.js +1 -6
  7. package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfile.js +73 -372
  8. package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfileActions.js +6 -110
  9. package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditor.js +151 -69
  10. package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditorModel.js +93 -56
  11. package/vscode/src/vs/workbench/services/userDataProfile/browser/extensionsResource.js +5 -5
  12. package/vscode/src/vs/workbench/services/userDataProfile/browser/globalStateResource.js +2 -17
  13. package/vscode/src/vs/workbench/services/userDataProfile/browser/keybindingsResource.js +1 -1
  14. package/vscode/src/vs/workbench/services/userDataProfile/browser/settingsResource.js +1 -1
  15. package/vscode/src/vs/workbench/services/userDataProfile/browser/snippetsResource.js +2 -2
  16. package/vscode/src/vs/workbench/services/userDataProfile/browser/tasksResource.js +1 -1
  17. package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileImportExportService.js +67 -887
  18. package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.js +8 -8
  19. package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilePreview.js +0 -24
@@ -1,22 +1,13 @@
1
- import { Separator } from 'vscode/vscode/vs/base/common/actions';
2
- import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
3
- import { localize2, localize } from 'vscode/vscode/vs/nls';
1
+ import { localize2 } from 'vscode/vscode/vs/nls';
4
2
  import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
5
- import { createAndFillInActionBarActions } from 'vscode/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
6
3
  import { Action2, registerAction2 } from 'vscode/vscode/vs/platform/actions/common/actions';
7
- import { IMenuService } from 'vscode/vscode/vs/platform/actions/common/actions.service';
8
- import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
9
- import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
10
- import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
11
- import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
12
- import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput.service';
13
4
  import { IUserDataProfilesService } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfile.service';
14
- import { PROFILES_CATEGORY, PROFILES_ENABLEMENT_CONTEXT, HAS_PROFILES_CONTEXT, MANAGE_PROFILES_ACTION_ID, ProfilesMenu } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile';
15
- import { IUserDataProfileManagementService, IUserDataProfileService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
5
+ import { PROFILES_CATEGORY, PROFILES_ENABLEMENT_CONTEXT } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile';
6
+ import { IUserDataProfileManagementService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
16
7
 
17
8
  class CreateTransientProfileAction extends Action2 {
18
9
  static { this.ID = 'workbench.profiles.actions.createTemporaryProfile'; }
19
- static { this.TITLE = ( localize2(8846, "Create a Temporary Profile")); }
10
+ static { this.TITLE = ( localize2(8875, "Create a Temporary Profile")); }
20
11
  constructor() {
21
12
  super({
22
13
  id: CreateTransientProfileAction.ID,
@@ -31,104 +22,11 @@ class CreateTransientProfileAction extends Action2 {
31
22
  }
32
23
  }
33
24
  registerAction2(CreateTransientProfileAction);
34
- class RenameProfileAction extends Action2 {
35
- static { this.ID = 'workbench.profiles.actions.renameProfile'; }
36
- constructor() {
37
- super({
38
- id: RenameProfileAction.ID,
39
- title: ( localize2(8847, "Rename...")),
40
- category: PROFILES_CATEGORY,
41
- f1: true,
42
- precondition: ( (ContextKeyExpr.and(PROFILES_ENABLEMENT_CONTEXT, HAS_PROFILES_CONTEXT))),
43
- });
44
- }
45
- async run(accessor, profile) {
46
- const quickInputService = accessor.get(IQuickInputService);
47
- const userDataProfileService = accessor.get(IUserDataProfileService);
48
- const userDataProfilesService = accessor.get(IUserDataProfilesService);
49
- const userDataProfileManagementService = accessor.get(IUserDataProfileManagementService);
50
- const notificationService = accessor.get(INotificationService);
51
- if (!profile) {
52
- profile = await this.pickProfile(quickInputService, userDataProfileService, userDataProfilesService);
53
- }
54
- if (!profile || profile.isDefault) {
55
- return;
56
- }
57
- const name = await quickInputService.input({
58
- value: profile.name,
59
- title: ( localize(8848, 'Rename {0}', profile.name)),
60
- validateInput: async (value) => {
61
- if (profile.name !== value && ( (userDataProfilesService.profiles.some(p => p.name === value)))) {
62
- return ( localize(8849, "Profile with name {0} already exists.", value));
63
- }
64
- return undefined;
65
- }
66
- });
67
- if (name && name !== profile.name) {
68
- try {
69
- await userDataProfileManagementService.updateProfile(profile, { name });
70
- }
71
- catch (error) {
72
- notificationService.error(error);
73
- }
74
- }
75
- }
76
- async pickProfile(quickInputService, userDataProfileService, userDataProfilesService) {
77
- const profiles = userDataProfilesService.profiles.filter(p => !p.isDefault && !p.isTransient);
78
- if (!profiles.length) {
79
- return undefined;
80
- }
81
- const pick = await quickInputService.pick(( (profiles.map(profile => ({
82
- label: profile.name,
83
- description: profile.id === userDataProfileService.currentProfile.id ? ( localize(8850, "Current")) : undefined,
84
- profile
85
- })))), {
86
- title: ( localize(8851, "Rename Profile...")),
87
- placeHolder: ( localize(8852, "Select Profile to Rename")),
88
- });
89
- return pick?.profile;
90
- }
91
- }
92
- registerAction2(RenameProfileAction);
93
- registerAction2(class ManageProfilesAction extends Action2 {
94
- constructor() {
95
- super({
96
- id: MANAGE_PROFILES_ACTION_ID,
97
- title: ( localize2(8853, "Manage...")),
98
- category: PROFILES_CATEGORY,
99
- precondition: ( (ContextKeyExpr.and(PROFILES_ENABLEMENT_CONTEXT, HAS_PROFILES_CONTEXT))),
100
- });
101
- }
102
- async run(accessor) {
103
- const quickInputService = accessor.get(IQuickInputService);
104
- const menuService = accessor.get(IMenuService);
105
- const contextKeyService = accessor.get(IContextKeyService);
106
- const commandService = accessor.get(ICommandService);
107
- const menu = menuService.getMenuActions(ProfilesMenu, contextKeyService);
108
- const actions = [];
109
- createAndFillInActionBarActions(menu, actions);
110
- if (actions.length) {
111
- const picks = ( (actions.map(action => {
112
- if (action instanceof Separator) {
113
- return { type: 'separator' };
114
- }
115
- return {
116
- id: action.id,
117
- label: `${action.label}${action.checked ? ` $(${Codicon.check.id})` : ''}`,
118
- };
119
- })));
120
- const pick = await quickInputService.pick(picks, { canPickMany: false, title: PROFILES_CATEGORY.value });
121
- if (pick?.id) {
122
- await commandService.executeCommand(pick.id);
123
- }
124
- }
125
- }
126
- });
127
25
  registerAction2(class CleanupProfilesAction extends Action2 {
128
26
  constructor() {
129
27
  super({
130
28
  id: 'workbench.profiles.actions.cleanupProfiles',
131
- title: ( localize2(8854, "Cleanup Profiles")),
29
+ title: ( localize2(8876, "Cleanup Profiles")),
132
30
  category: Categories.Developer,
133
31
  f1: true,
134
32
  precondition: PROFILES_ENABLEMENT_CONTEXT,
@@ -142,7 +40,7 @@ registerAction2(class ResetWorkspacesAction extends Action2 {
142
40
  constructor() {
143
41
  super({
144
42
  id: 'workbench.profiles.actions.resetWorkspaces',
145
- title: ( localize2(8855, "Reset Workspace Profiles Associations")),
43
+ title: ( localize2(8877, "Reset Workspace Profiles Associations")),
146
44
  category: Categories.Developer,
147
45
  f1: true,
148
46
  precondition: PROFILES_ENABLEMENT_CONTEXT,
@@ -153,5 +51,3 @@ registerAction2(class ResetWorkspacesAction extends Action2 {
153
51
  return userDataProfilesService.resetWorkspaces();
154
52
  }
155
53
  });
156
-
157
- export { RenameProfileAction };