@codingame/monaco-vscode-user-data-profile-service-override 6.0.3 → 7.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.
@@ -2,7 +2,7 @@ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
2
  import { Disposable, MutableDisposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
3
3
  import { isWeb } from 'vscode/vscode/vs/base/common/platform';
4
4
  import { localizeWithPath, localize2WithPath } from 'vscode/vscode/vs/nls';
5
- import { MenuRegistry, MenuId, registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
5
+ import { MenuId, MenuRegistry, registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
6
6
  import { IMenuService } from 'vscode/vscode/vs/platform/actions/common/actions.service';
7
7
  import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
8
8
  import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
@@ -25,15 +25,23 @@ import { IOpenerService } from 'vscode/vscode/vs/platform/opener/common/opener.s
25
25
  import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
26
26
  import { EditorPaneDescriptor } from 'vscode/vscode/vs/workbench/browser/editor';
27
27
  import { EditorExtensions } from 'vscode/vscode/vs/workbench/common/editor';
28
- import { UserDataProfilesEditor, UserDataProfilesEditorInput, UserDataProfilesEditorInputSerializer } from './userDataProfilesEditor.js';
28
+ import { UserDataProfilesEditorInput, UserDataProfilesEditor, UserDataProfilesEditorInputSerializer } from './userDataProfilesEditor.js';
29
29
  import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
30
30
  import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
31
31
  import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
32
+ import { IHostService } from 'vscode/vscode/vs/workbench/services/host/browser/host.service';
33
+ import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
34
+ import { Extensions, ConfigurationScope } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
35
+ import { workbenchConfigurationNodeBase } from 'vscode/vscode/vs/workbench/common/configuration';
36
+ import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService.service';
32
37
 
33
38
  const _moduleId = "vs/workbench/contrib/userDataProfile/browser/userDataProfile";
39
+ const OpenProfileMenu = ( (new MenuId('OpenProfile')));
40
+ const CONFIG_ENABLE_NEW_PROFILES_UI = 'workbench.experimental.enableNewProfilesUI';
41
+ const CONTEXT_ENABLE_NEW_PROFILES_UI = ( (ContextKeyExpr.equals('config.workbench.experimental.enableNewProfilesUI', true)));
34
42
  let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContribution extends Disposable {
35
43
  static { this.ID = 'workbench.contrib.userDataProfiles'; }
36
- constructor(userDataProfileService, userDataProfilesService, userDataProfileManagementService, userDataProfileImportExportService, telemetryService, workspaceContextService, workspaceTagsService, contextKeyService, lifecycleService) {
44
+ constructor(userDataProfileService, userDataProfilesService, userDataProfileManagementService, userDataProfileImportExportService, telemetryService, workspaceContextService, workspaceTagsService, contextKeyService, configurationService, editorGroupsService, instantiationService, productService, lifecycleService) {
37
45
  super();
38
46
  this.userDataProfileService = userDataProfileService;
39
47
  this.userDataProfilesService = userDataProfilesService;
@@ -42,6 +50,10 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
42
50
  this.telemetryService = telemetryService;
43
51
  this.workspaceContextService = workspaceContextService;
44
52
  this.workspaceTagsService = workspaceTagsService;
53
+ this.configurationService = configurationService;
54
+ this.editorGroupsService = editorGroupsService;
55
+ this.instantiationService = instantiationService;
56
+ this.productService = productService;
45
57
  this.lifecycleService = lifecycleService;
46
58
  this.startTime = Date.now();
47
59
  this.profilesDisposable = this._register(( (new MutableDisposable())));
@@ -58,6 +70,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
58
70
  this.hasProfilesContext = HAS_PROFILES_CONTEXT.bindTo(contextKeyService);
59
71
  this.hasProfilesContext.set(this.userDataProfilesService.profiles.length > 1);
60
72
  this._register(this.userDataProfilesService.onDidChangeProfiles(e => this.hasProfilesContext.set(this.userDataProfilesService.profiles.length > 1)));
73
+ this.registerConfiguration();
61
74
  this.registerEditor();
62
75
  this.registerActions();
63
76
  if (isWeb) {
@@ -65,8 +78,28 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
65
78
  }
66
79
  this.reportWorkspaceProfileInfo();
67
80
  }
81
+ openProfilesEditor() {
82
+ return this.editorGroupsService.activeGroup.openEditor(( (new UserDataProfilesEditorInput(this.instantiationService))));
83
+ }
84
+ isNewProfilesUIEnabled() {
85
+ return this.configurationService.getValue(CONFIG_ENABLE_NEW_PROFILES_UI) === true;
86
+ }
87
+ registerConfiguration() {
88
+ ( (Registry.as(Extensions.Configuration)))
89
+ .registerConfiguration({
90
+ ...workbenchConfigurationNodeBase,
91
+ properties: {
92
+ [CONFIG_ENABLE_NEW_PROFILES_UI]: {
93
+ type: 'boolean',
94
+ description: ( localizeWithPath(_moduleId, 0, "Enables the new profiles UI.")),
95
+ default: this.productService.quality !== 'stable',
96
+ scope: ConfigurationScope.APPLICATION,
97
+ }
98
+ }
99
+ });
100
+ }
68
101
  registerEditor() {
69
- ( (Registry.as(EditorExtensions.EditorPane))).registerEditorPane(EditorPaneDescriptor.create(UserDataProfilesEditor, UserDataProfilesEditor.ID, ( localizeWithPath(_moduleId, 0, "Profiles Editor"))), [
102
+ ( (Registry.as(EditorExtensions.EditorPane))).registerEditorPane(EditorPaneDescriptor.create(UserDataProfilesEditor, UserDataProfilesEditor.ID, ( localizeWithPath(_moduleId, 1, "Profiles Editor"))), [
70
103
  ( (new SyncDescriptor(UserDataProfilesEditorInput)))
71
104
  ]);
72
105
  ( (Registry.as(EditorExtensions.EditorFactory))).registerEditorSerializer(UserDataProfilesEditorInput.ID, UserDataProfilesEditorInputSerializer);
@@ -75,6 +108,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
75
108
  this.registerProfileSubMenu();
76
109
  this._register(this.registerManageProfilesAction());
77
110
  this._register(this.registerSwitchProfileAction());
111
+ this.registerOpenProfileSubMenu();
78
112
  this.registerProfilesActions();
79
113
  this._register(this.userDataProfilesService.onDidChangeProfiles(() => this.registerProfilesActions()));
80
114
  this.registerCurrentProfilesActions();
@@ -88,11 +122,15 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
88
122
  const getProfilesTitle = () => {
89
123
  return ( localizeWithPath(
90
124
  _moduleId,
91
- 1,
125
+ 2,
92
126
  "Profile ({0})",
93
127
  this.userDataProfileService.currentProfile.name
94
128
  ));
95
129
  };
130
+ const when = ( (ContextKeyExpr.or(
131
+ (CONTEXT_ENABLE_NEW_PROFILES_UI.negate()),
132
+ HAS_PROFILES_CONTEXT
133
+ )));
96
134
  MenuRegistry.appendMenuItem(MenuId.GlobalActivity, {
97
135
  get title() {
98
136
  return getProfilesTitle();
@@ -100,6 +138,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
100
138
  submenu: ProfilesMenu,
101
139
  group: '2_configuration',
102
140
  order: 1,
141
+ when,
103
142
  });
104
143
  MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, {
105
144
  get title() {
@@ -108,56 +147,25 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
108
147
  submenu: ProfilesMenu,
109
148
  group: '2_configuration',
110
149
  order: 1,
111
- when: PROFILES_ENABLEMENT_CONTEXT,
150
+ when,
112
151
  });
113
152
  }
114
- registerManageProfilesAction() {
115
- const disposables = ( (new DisposableStore()));
116
- const when = ( (ContextKeyExpr.equals('config.workbench.experimental.enableNewProfilesUI', true)));
117
- disposables.add(registerAction2(class ManageProfilesAction extends Action2 {
118
- constructor() {
119
- super({
120
- id: `workbench.profiles.actions.manageProfiles`,
121
- title: {
122
- ...( localize2WithPath(_moduleId, 2, "Profiles")),
123
- mnemonicTitle: ( localizeWithPath(_moduleId, 3, "&&Profiles")),
124
- },
125
- menu: [
126
- {
127
- id: MenuId.GlobalActivity,
128
- group: '2_configuration',
129
- when,
130
- order: 1
131
- },
132
- {
133
- id: MenuId.MenubarPreferencesMenu,
134
- group: '2_configuration',
135
- when,
136
- order: 1
137
- }
138
- ]
139
- });
140
- }
141
- run(accessor) {
142
- const editorGroupsService = accessor.get(IEditorGroupsService);
143
- const instantiationService = accessor.get(IInstantiationService);
144
- return editorGroupsService.activeGroup.openEditor(( (new UserDataProfilesEditorInput(instantiationService))));
145
- }
146
- }));
147
- disposables.add(MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
148
- command: {
149
- id: 'workbench.profiles.actions.manageProfiles',
150
- category: Categories.Preferences,
151
- title: ( localize2WithPath(_moduleId, 4, "Open Profiles (UI)")),
152
- precondition: when,
153
- },
154
- }));
155
- return disposables;
153
+ registerOpenProfileSubMenu() {
154
+ MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
155
+ title: ( localizeWithPath(_moduleId, 3, "New Window with Profile")),
156
+ submenu: OpenProfileMenu,
157
+ group: '1_new',
158
+ order: 4,
159
+ when: HAS_PROFILES_CONTEXT,
160
+ });
156
161
  }
157
162
  registerProfilesActions() {
158
163
  this.profilesDisposable.value = ( (new DisposableStore()));
159
164
  for (const profile of this.userDataProfilesService.profiles) {
160
- this.profilesDisposable.value.add(this.registerProfileEntryAction(profile));
165
+ if (!profile.isTransient) {
166
+ this.profilesDisposable.value.add(this.registerProfileEntryAction(profile));
167
+ this.profilesDisposable.value.add(this.registerNewWindowAction(profile));
168
+ }
161
169
  }
162
170
  }
163
171
  registerProfileEntryAction(profile) {
@@ -189,12 +197,41 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
189
197
  }
190
198
  });
191
199
  }
200
+ registerNewWindowAction(profile) {
201
+ const disposables = ( (new DisposableStore()));
202
+ const id = `workbench.action.openProfile.${profile.name.toLowerCase().replace('/\s+/', '_')}`;
203
+ disposables.add(registerAction2(class NewWindowAction extends Action2 {
204
+ constructor() {
205
+ super({
206
+ id,
207
+ title: ( localize2WithPath(_moduleId, 4, "{0}", profile.name)),
208
+ menu: {
209
+ id: OpenProfileMenu,
210
+ when: HAS_PROFILES_CONTEXT
211
+ }
212
+ });
213
+ }
214
+ run(accessor) {
215
+ const hostService = accessor.get(IHostService);
216
+ return hostService.openWindow({ remoteAuthority: null, forceProfile: profile.name });
217
+ }
218
+ }));
219
+ disposables.add(MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
220
+ command: {
221
+ id,
222
+ category: PROFILES_CATEGORY,
223
+ title: ( localize2WithPath(_moduleId, 5, "Open {0} Profile", profile.name)),
224
+ precondition: HAS_PROFILES_CONTEXT
225
+ },
226
+ }));
227
+ return disposables;
228
+ }
192
229
  registerSwitchProfileAction() {
193
230
  return registerAction2(class SwitchProfileAction extends Action2 {
194
231
  constructor() {
195
232
  super({
196
233
  id: `workbench.profiles.actions.switchProfile`,
197
- title: ( localize2WithPath(_moduleId, 5, 'Switch Profile...')),
234
+ title: ( localize2WithPath(_moduleId, 6, 'Switch Profile...')),
198
235
  category: PROFILES_CATEGORY,
199
236
  f1: true,
200
237
  precondition: PROFILES_ENABLEMENT_CONTEXT,
@@ -210,7 +247,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
210
247
  action,
211
248
  label: action.checked ? `$(check) ${action.label}` : action.label,
212
249
  })))), {
213
- placeHolder: ( localizeWithPath(_moduleId, 6, "Select Profile"))
250
+ placeHolder: ( localizeWithPath(_moduleId, 7, "Select Profile"))
214
251
  });
215
252
  await result?.action.run();
216
253
  }
@@ -227,31 +264,78 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
227
264
  this.currentprofileActionsDisposable.value.add(this.registerExportCurrentProfileAction());
228
265
  this.currentprofileActionsDisposable.value.add(this.registerImportProfileAction());
229
266
  }
267
+ registerManageProfilesAction() {
268
+ const disposables = ( (new DisposableStore()));
269
+ disposables.add(registerAction2(class ManageProfilesAction extends Action2 {
270
+ constructor() {
271
+ super({
272
+ id: `workbench.profiles.actions.manageProfiles`,
273
+ title: {
274
+ ...( localize2WithPath(_moduleId, 8, "Profiles")),
275
+ mnemonicTitle: ( localizeWithPath(_moduleId, 9, "&&Profiles")),
276
+ },
277
+ menu: [
278
+ {
279
+ id: MenuId.GlobalActivity,
280
+ group: '2_configuration',
281
+ order: 1,
282
+ when: CONTEXT_ENABLE_NEW_PROFILES_UI,
283
+ },
284
+ {
285
+ id: MenuId.MenubarPreferencesMenu,
286
+ group: '2_configuration',
287
+ order: 1,
288
+ when: CONTEXT_ENABLE_NEW_PROFILES_UI,
289
+ },
290
+ ]
291
+ });
292
+ }
293
+ run(accessor) {
294
+ const editorGroupsService = accessor.get(IEditorGroupsService);
295
+ const instantiationService = accessor.get(IInstantiationService);
296
+ return editorGroupsService.activeGroup.openEditor(( (new UserDataProfilesEditorInput(instantiationService))));
297
+ }
298
+ }));
299
+ disposables.add(MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
300
+ command: {
301
+ id: 'workbench.profiles.actions.manageProfiles',
302
+ category: Categories.Preferences,
303
+ title: ( localize2WithPath(_moduleId, 10, "Open Profiles (UI)")),
304
+ precondition: CONTEXT_ENABLE_NEW_PROFILES_UI,
305
+ },
306
+ }));
307
+ return disposables;
308
+ }
230
309
  registerEditCurrentProfileAction() {
231
310
  const that = this;
232
311
  return registerAction2(class RenameCurrentProfileAction extends Action2 {
233
312
  constructor() {
234
- const when = ( (ContextKeyExpr.and( (ContextKeyExpr.notEquals(
313
+ const precondition = ( (ContextKeyExpr.and( (ContextKeyExpr.notEquals(
235
314
  CURRENT_PROFILE_CONTEXT.key,
236
315
  that.userDataProfilesService.defaultProfile.id
237
316
  )), (IS_CURRENT_PROFILE_TRANSIENT_CONTEXT.toNegated()))));
238
317
  super({
239
318
  id: `workbench.profiles.actions.editCurrentProfile`,
240
- title: ( localize2WithPath(_moduleId, 7, "Edit Profile...")),
241
- precondition: when,
319
+ title: ( localize2WithPath(_moduleId, 11, "Edit Profile...")),
320
+ precondition,
242
321
  f1: true,
243
322
  menu: [
244
323
  {
245
324
  id: ProfilesMenu,
246
325
  group: '2_manage_current',
247
- when,
326
+ when: ( (ContextKeyExpr.and(precondition, (CONTEXT_ENABLE_NEW_PROFILES_UI.negate())))),
248
327
  order: 2
249
328
  }
250
329
  ]
251
330
  });
252
331
  }
253
- run() {
254
- return that.userDataProfileImportExportService.editProfile(that.userDataProfileService.currentProfile);
332
+ run(accessor) {
333
+ if (that.isNewProfilesUIEnabled()) {
334
+ return that.openProfilesEditor();
335
+ }
336
+ else {
337
+ return that.userDataProfileImportExportService.editProfile(that.userDataProfileService.currentProfile);
338
+ }
255
339
  }
256
340
  });
257
341
  }
@@ -261,15 +345,14 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
261
345
  constructor() {
262
346
  super({
263
347
  id,
264
- title: ( localize2WithPath(_moduleId, 8, "Show Profile Contents")),
348
+ title: ( localize2WithPath(_moduleId, 12, "Show Profile Contents")),
265
349
  category: PROFILES_CATEGORY,
266
350
  menu: [
267
351
  {
268
352
  id: ProfilesMenu,
269
353
  group: '2_manage_current',
270
- order: 3
271
- }, {
272
- id: MenuId.CommandPalette
354
+ order: 3,
355
+ when: ( (CONTEXT_ENABLE_NEW_PROFILES_UI.negate()))
273
356
  }
274
357
  ]
275
358
  });
@@ -288,14 +371,15 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
288
371
  constructor() {
289
372
  super({
290
373
  id,
291
- title: ( localize2WithPath(_moduleId, 9, "Export Profile...")),
374
+ title: ( localize2WithPath(_moduleId, 13, "Export Profile...")),
292
375
  category: PROFILES_CATEGORY,
293
376
  precondition: ( (IS_PROFILE_EXPORT_IN_PROGRESS_CONTEXT.toNegated())),
294
377
  menu: [
295
378
  {
296
379
  id: ProfilesMenu,
297
380
  group: '4_import_export_profiles',
298
- order: 1
381
+ order: 1,
382
+ when: ( (CONTEXT_ENABLE_NEW_PROFILES_UI.negate())),
299
383
  }, {
300
384
  id: MenuId.CommandPalette
301
385
  }
@@ -303,8 +387,12 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
303
387
  });
304
388
  }
305
389
  async run(accessor) {
306
- const userDataProfileImportExportService = accessor.get(IUserDataProfileImportExportService);
307
- return userDataProfileImportExportService.exportProfile();
390
+ if (that.isNewProfilesUIEnabled()) {
391
+ return that.openProfilesEditor();
392
+ }
393
+ else {
394
+ return that.userDataProfileImportExportService.exportProfile2();
395
+ }
308
396
  }
309
397
  }));
310
398
  disposables.add(MenuRegistry.appendMenuItem(MenuId.MenubarShare, {
@@ -312,7 +400,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
312
400
  id,
313
401
  title: ( localize2WithPath(
314
402
  _moduleId,
315
- 10,
403
+ 14,
316
404
  "Export Profile ({0})...",
317
405
  that.userDataProfileService.currentProfile.name
318
406
  )),
@@ -329,14 +417,17 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
329
417
  constructor() {
330
418
  super({
331
419
  id,
332
- title: ( localize2WithPath(_moduleId, 11, "Import Profile...")),
420
+ title: ( localize2WithPath(_moduleId, 15, "Import Profile...")),
333
421
  category: PROFILES_CATEGORY,
334
422
  precondition: ( (IS_PROFILE_IMPORT_IN_PROGRESS_CONTEXT.toNegated())),
335
423
  menu: [
336
424
  {
337
425
  id: ProfilesMenu,
338
426
  group: '4_import_export_profiles',
339
- when: PROFILES_ENABLEMENT_CONTEXT,
427
+ when: ( (ContextKeyExpr.and(
428
+ PROFILES_ENABLEMENT_CONTEXT,
429
+ (CONTEXT_ENABLE_NEW_PROFILES_UI.negate())
430
+ ))),
340
431
  order: 2
341
432
  }, {
342
433
  id: MenuId.CommandPalette,
@@ -356,19 +447,19 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
356
447
  const updateQuickPickItems = (value) => {
357
448
  const quickPickItems = [];
358
449
  if (value) {
359
- quickPickItems.push({ label: quickPick.value, description: ( localizeWithPath(_moduleId, 12, "Import from URL")) });
450
+ quickPickItems.push({ label: quickPick.value, description: ( localizeWithPath(_moduleId, 16, "Import from URL")) });
360
451
  }
361
- quickPickItems.push({ label: ( localizeWithPath(_moduleId, 13, "Select File...")) });
452
+ quickPickItems.push({ label: ( localizeWithPath(_moduleId, 17, "Select File...")) });
362
453
  if (profileTemplateQuickPickItems.length) {
363
454
  quickPickItems.push({
364
455
  type: 'separator',
365
- label: ( localizeWithPath(_moduleId, 14, "Profile Templates"))
456
+ label: ( localizeWithPath(_moduleId, 18, "Profile Templates"))
366
457
  }, ...profileTemplateQuickPickItems);
367
458
  }
368
459
  quickPick.items = quickPickItems;
369
460
  };
370
- quickPick.title = ( localizeWithPath(_moduleId, 15, "Import from Profile Template..."));
371
- quickPick.placeholder = ( localizeWithPath(_moduleId, 16, "Provide Profile Template URL"));
461
+ quickPick.title = ( localizeWithPath(_moduleId, 19, "Import from Profile Template..."));
462
+ quickPick.placeholder = ( localizeWithPath(_moduleId, 20, "Provide Profile Template URL"));
372
463
  quickPick.ignoreFocusOut = true;
373
464
  disposables.add(quickPick.onDidChangeValue(updateQuickPickItems));
374
465
  updateQuickPickItems();
@@ -390,7 +481,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
390
481
  }
391
482
  }
392
483
  catch (error) {
393
- notificationService.error(( localizeWithPath(_moduleId, 17, "Error while creating profile: {0}", getErrorMessage(error))));
484
+ notificationService.error(( localizeWithPath(_moduleId, 21, "Error while creating profile: {0}", getErrorMessage(error))));
394
485
  }
395
486
  }));
396
487
  disposables.add(quickPick.onDidHide(() => disposables.dispose()));
@@ -402,7 +493,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
402
493
  canSelectFiles: true,
403
494
  canSelectMany: false,
404
495
  filters: PROFILE_FILTER,
405
- title: ( localizeWithPath(_moduleId, 18, "Select Profile Template File")),
496
+ title: ( localizeWithPath(_moduleId, 22, "Select Profile Template File")),
406
497
  });
407
498
  if (!profileLocation) {
408
499
  return null;
@@ -413,7 +504,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
413
504
  disposables.add(MenuRegistry.appendMenuItem(MenuId.MenubarShare, {
414
505
  command: {
415
506
  id,
416
- title: ( localize2WithPath(_moduleId, 19, "Import Profile...")),
507
+ title: ( localize2WithPath(_moduleId, 23, "Import Profile...")),
417
508
  precondition: PROFILES_ENABLEMENT_CONTEXT,
418
509
  },
419
510
  }));
@@ -425,7 +516,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
425
516
  constructor() {
426
517
  super({
427
518
  id: 'workbench.profiles.actions.createFromCurrentProfile',
428
- title: ( localize2WithPath(_moduleId, 20, "Save Current Profile As...")),
519
+ title: ( localize2WithPath(_moduleId, 24, "Save Current Profile As...")),
429
520
  category: PROFILES_CATEGORY,
430
521
  f1: true,
431
522
  precondition: PROFILES_ENABLEMENT_CONTEXT
@@ -442,7 +533,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
442
533
  constructor() {
443
534
  super({
444
535
  id: 'workbench.profiles.actions.createProfile',
445
- title: ( localize2WithPath(_moduleId, 21, "Create Profile...")),
536
+ title: ( localize2WithPath(_moduleId, 25, "Create Profile...")),
446
537
  category: PROFILES_CATEGORY,
447
538
  precondition: PROFILES_ENABLEMENT_CONTEXT,
448
539
  f1: true,
@@ -450,14 +541,22 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
450
541
  {
451
542
  id: ProfilesMenu,
452
543
  group: '3_manage_profiles',
453
- when: PROFILES_ENABLEMENT_CONTEXT,
544
+ when: ( (ContextKeyExpr.and(
545
+ PROFILES_ENABLEMENT_CONTEXT,
546
+ (CONTEXT_ENABLE_NEW_PROFILES_UI.negate())
547
+ ))),
454
548
  order: 1
455
549
  }
456
550
  ]
457
551
  });
458
552
  }
459
553
  async run(accessor) {
460
- return that.userDataProfileImportExportService.createProfile();
554
+ if (that.isNewProfilesUIEnabled()) {
555
+ return that.openProfilesEditor();
556
+ }
557
+ else {
558
+ return that.userDataProfileImportExportService.createProfile();
559
+ }
461
560
  }
462
561
  }));
463
562
  }
@@ -466,7 +565,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
466
565
  constructor() {
467
566
  super({
468
567
  id: 'workbench.profiles.actions.deleteProfile',
469
- title: ( localize2WithPath(_moduleId, 22, "Delete Profile...")),
568
+ title: ( localize2WithPath(_moduleId, 26, "Delete Profile...")),
470
569
  category: PROFILES_CATEGORY,
471
570
  f1: true,
472
571
  precondition: ( (ContextKeyExpr.and(PROFILES_ENABLEMENT_CONTEXT, HAS_PROFILES_CONTEXT))),
@@ -474,7 +573,10 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
474
573
  {
475
574
  id: ProfilesMenu,
476
575
  group: '3_manage_profiles',
477
- when: PROFILES_ENABLEMENT_CONTEXT,
576
+ when: ( (ContextKeyExpr.and(
577
+ PROFILES_ENABLEMENT_CONTEXT,
578
+ (CONTEXT_ENABLE_NEW_PROFILES_UI.negate())
579
+ ))),
478
580
  order: 2
479
581
  }
480
582
  ]
@@ -490,11 +592,11 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
490
592
  if (profiles.length) {
491
593
  const picks = await quickInputService.pick(( (profiles.map(profile => ({
492
594
  label: profile.name,
493
- description: profile.id === userDataProfileService.currentProfile.id ? ( localizeWithPath(_moduleId, 23, "Current")) : undefined,
595
+ description: profile.id === userDataProfileService.currentProfile.id ? ( localizeWithPath(_moduleId, 27, "Current")) : undefined,
494
596
  profile
495
597
  })))), {
496
- title: ( localizeWithPath(_moduleId, 24, "Delete Profile...")),
497
- placeHolder: ( localizeWithPath(_moduleId, 25, "Select Profiles to Delete")),
598
+ title: ( localizeWithPath(_moduleId, 28, "Delete Profile...")),
599
+ placeHolder: ( localizeWithPath(_moduleId, 29, "Select Profiles to Delete")),
498
600
  canPickMany: true
499
601
  });
500
602
  if (picks) {
@@ -555,7 +657,11 @@ UserDataProfilesWorkbenchContribution = ( (__decorate([
555
657
  ( (__param(5, IWorkspaceContextService))),
556
658
  ( (__param(6, IWorkspaceTagsService))),
557
659
  ( (__param(7, IContextKeyService))),
558
- ( (__param(8, ILifecycleService)))
660
+ ( (__param(8, IConfigurationService))),
661
+ ( (__param(9, IEditorGroupsService))),
662
+ ( (__param(10, IInstantiationService))),
663
+ ( (__param(11, IProductService))),
664
+ ( (__param(12, ILifecycleService)))
559
665
  ], UserDataProfilesWorkbenchContribution)));
560
666
 
561
- export { UserDataProfilesWorkbenchContribution };
667
+ export { OpenProfileMenu, UserDataProfilesWorkbenchContribution };