@codingame/monaco-vscode-user-data-profile-service-override 11.1.2 → 12.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/index.d.ts +2 -1
- package/index.js +126 -1
- package/package.json +31 -8
- package/vscode/src/vs/base/browser/ui/radio/radio.css.js +1 -1
- package/vscode/src/vs/base/browser/ui/radio/radio.d.ts +37 -0
- package/vscode/src/vs/base/browser/ui/radio/radio.js +1 -0
- package/vscode/src/vs/platform/userDataProfile/browser/userDataProfile.d.ts +16 -0
- package/vscode/src/vs/platform/userDataProfile/browser/userDataProfile.js +3 -2
- package/vscode/src/vs/platform/userDataProfile/common/userDataProfileStorageService.d.ts +42 -0
- package/vscode/src/vs/platform/userDataProfile/common/userDataProfileStorageService.js +10 -11
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/media/userDataProfilesEditor.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfile.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfile.contribution.js +3 -2
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfile.d.ts +53 -0
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfile.js +65 -63
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfileActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfileActions.js +5 -4
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditor.d.ts +73 -0
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditor.js +298 -307
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditorModel.d.ts +236 -0
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditorModel.js +168 -166
- package/vscode/src/vs/workbench/contrib/userDataProfile/common/userDataProfile.d.ts +7 -0
- package/vscode/src/vs/workbench/services/userData/browser/userDataInit.d.ts +19 -0
- package/vscode/src/vs/workbench/services/userData/browser/userDataInit.js +4 -2
- package/vscode/src/vs/workbench/services/userDataProfile/browser/extensionsResource.d.ts +77 -0
- package/vscode/src/vs/workbench/services/userDataProfile/browser/extensionsResource.js +83 -82
- package/vscode/src/vs/workbench/services/userDataProfile/browser/globalStateResource.d.ts +58 -0
- package/vscode/src/vs/workbench/services/userDataProfile/browser/globalStateResource.js +31 -28
- package/vscode/src/vs/workbench/services/userDataProfile/browser/keybindingsResource.d.ts +47 -0
- package/vscode/src/vs/workbench/services/userDataProfile/browser/keybindingsResource.js +24 -24
- package/vscode/src/vs/workbench/services/userDataProfile/browser/media/userDataProfileView.css.js +1 -1
- package/vscode/src/vs/workbench/services/userDataProfile/browser/settingsResource.d.ts +48 -0
- package/vscode/src/vs/workbench/services/userDataProfile/browser/settingsResource.js +29 -29
- package/vscode/src/vs/workbench/services/userDataProfile/browser/snippetsResource.d.ts +43 -0
- package/vscode/src/vs/workbench/services/userDataProfile/browser/snippetsResource.js +54 -54
- package/vscode/src/vs/workbench/services/userDataProfile/browser/tasksResource.d.ts +45 -0
- package/vscode/src/vs/workbench/services/userDataProfile/browser/tasksResource.js +24 -24
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileImportExportService.d.ts +63 -0
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileImportExportService.js +106 -111
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileInit.d.ts +32 -0
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileInit.js +11 -8
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.d.ts +58 -0
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.js +35 -33
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileStorageService.d.ts +18 -0
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileStorageService.js +7 -5
- package/vscode/src/vs/workbench/services/userDataSync/browser/userDataSyncInit.d.ts +45 -0
- package/vscode/src/vs/workbench/services/userDataSync/browser/userDataSyncInit.js +25 -22
- package/vscode/src/vs/workbench/services/userDataSync/common/userDataSyncUtil.d.ts +18 -0
- package/vscode/src/vs/workbench/services/userDataSync/common/userDataSyncUtil.js +3 -1
- package/userDataProfile.js +0 -125
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { Disposable, MutableDisposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
4
|
import { isWeb } from 'vscode/vscode/vs/base/common/platform';
|
|
4
5
|
import { localize, localize2 } from 'vscode/vscode/vs/nls';
|
|
@@ -6,8 +7,9 @@ import { MenuId, MenuRegistry, registerAction2, Action2 } from 'vscode/vscode/vs
|
|
|
6
7
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
7
8
|
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
8
9
|
import { IUserDataProfilesService } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfile.service';
|
|
10
|
+
import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
9
11
|
import { ILifecycleService } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle.service';
|
|
10
|
-
import { CURRENT_PROFILE_CONTEXT, IS_CURRENT_PROFILE_TRANSIENT_CONTEXT, HAS_PROFILES_CONTEXT, isProfileURL, PROFILES_CATEGORY, PROFILES_TITLE } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile';
|
|
12
|
+
import { CURRENT_PROFILE_CONTEXT, IS_CURRENT_PROFILE_TRANSIENT_CONTEXT, HAS_PROFILES_CONTEXT, isProfileURL, PROFILES_CATEGORY, PROFILES_TITLE } from '@codingame/monaco-vscode-e72c94ca-257a-5b75-8b68-5a5fa3c18255-common/vscode/vs/workbench/services/userDataProfile/common/userDataProfile';
|
|
11
13
|
import { IUserDataProfileService, IUserDataProfileManagementService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
|
|
12
14
|
import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
13
15
|
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
|
|
@@ -18,7 +20,7 @@ import { IWorkspaceTagsService } from 'vscode/vscode/vs/workbench/contrib/tags/c
|
|
|
18
20
|
import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
|
|
19
21
|
import { IOpenerService } from 'vscode/vscode/vs/platform/opener/common/opener.service';
|
|
20
22
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
21
|
-
import { EditorPaneDescriptor } from 'vscode/vscode/vs/workbench/browser/editor';
|
|
23
|
+
import { EditorPaneDescriptor } from '@codingame/monaco-vscode-9e888134-1a6f-58d9-b0e6-0fc047448366-common/vscode/vs/workbench/browser/editor';
|
|
22
24
|
import { EditorExtensions } from 'vscode/vscode/vs/workbench/common/editor';
|
|
23
25
|
import { UserDataProfilesEditorInput, UserDataProfilesEditor, UserDataProfilesEditorInputSerializer } from './userDataProfilesEditor.js';
|
|
24
26
|
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
@@ -28,8 +30,8 @@ import { IHostService } from 'vscode/vscode/vs/workbench/services/host/browser/h
|
|
|
28
30
|
import { IURLService } from 'vscode/vscode/vs/platform/url/common/url.service';
|
|
29
31
|
import { IBrowserWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/browser/environmentService.service';
|
|
30
32
|
|
|
31
|
-
const OpenProfileMenu = (
|
|
32
|
-
const ProfilesMenu = (
|
|
33
|
+
const OpenProfileMenu = ( new MenuId('OpenProfile'));
|
|
34
|
+
const ProfilesMenu = ( new MenuId('Profiles'));
|
|
33
35
|
let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContribution extends Disposable {
|
|
34
36
|
static { this.ID = 'workbench.contrib.userDataProfiles'; }
|
|
35
37
|
constructor(userDataProfileService, userDataProfilesService, userDataProfileManagementService, telemetryService, workspaceContextService, workspaceTagsService, contextKeyService, editorGroupsService, instantiationService, lifecycleService, urlService, environmentService) {
|
|
@@ -44,7 +46,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
44
46
|
this.instantiationService = instantiationService;
|
|
45
47
|
this.lifecycleService = lifecycleService;
|
|
46
48
|
this.urlService = urlService;
|
|
47
|
-
this.profilesDisposable = this._register((
|
|
49
|
+
this.profilesDisposable = this._register(( new MutableDisposable()));
|
|
48
50
|
this.currentProfileContext = CURRENT_PROFILE_CONTEXT.bindTo(contextKeyService);
|
|
49
51
|
this.isCurrentProfileTransientContext = IS_CURRENT_PROFILE_TRANSIENT_CONTEXT.bindTo(contextKeyService);
|
|
50
52
|
this.currentProfileContext.set(this.userDataProfileService.currentProfile.id);
|
|
@@ -60,11 +62,11 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
60
62
|
this.registerActions();
|
|
61
63
|
this._register(this.urlService.registerHandler(this));
|
|
62
64
|
if (isWeb) {
|
|
63
|
-
lifecycleService.when(
|
|
65
|
+
lifecycleService.when(LifecyclePhase.Eventually).then(() => userDataProfilesService.cleanUp());
|
|
64
66
|
}
|
|
65
67
|
this.reportWorkspaceProfileInfo();
|
|
66
68
|
if (environmentService.options?.profileToPreview) {
|
|
67
|
-
lifecycleService.when(
|
|
69
|
+
lifecycleService.when(LifecyclePhase.Restored).then(() => this.handleURL(URI.revive(environmentService.options.profileToPreview)));
|
|
68
70
|
}
|
|
69
71
|
}
|
|
70
72
|
async handleURL(uri) {
|
|
@@ -78,14 +80,14 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
78
80
|
return false;
|
|
79
81
|
}
|
|
80
82
|
async openProfilesEditor() {
|
|
81
|
-
const editor = await this.editorGroupsService.activeGroup.openEditor((
|
|
83
|
+
const editor = await this.editorGroupsService.activeGroup.openEditor(( new UserDataProfilesEditorInput(this.instantiationService)));
|
|
82
84
|
return editor;
|
|
83
85
|
}
|
|
84
86
|
registerEditor() {
|
|
85
|
-
(
|
|
86
|
-
(
|
|
87
|
+
( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(EditorPaneDescriptor.create(UserDataProfilesEditor, UserDataProfilesEditor.ID, ( localize(10477, "Profiles Editor"))), [
|
|
88
|
+
( new SyncDescriptor(UserDataProfilesEditorInput))
|
|
87
89
|
]);
|
|
88
|
-
(
|
|
90
|
+
( Registry.as(EditorExtensions.EditorFactory)).registerEditorSerializer(UserDataProfilesEditorInput.ID, UserDataProfilesEditorInputSerializer);
|
|
89
91
|
}
|
|
90
92
|
registerActions() {
|
|
91
93
|
this.registerProfileSubMenu();
|
|
@@ -103,7 +105,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
103
105
|
}
|
|
104
106
|
registerProfileSubMenu() {
|
|
105
107
|
const getProfilesTitle = () => {
|
|
106
|
-
return
|
|
108
|
+
return localize(10478, "Profile ({0})", this.userDataProfileService.currentProfile.name);
|
|
107
109
|
};
|
|
108
110
|
MenuRegistry.appendMenuItem(MenuId.GlobalActivity, {
|
|
109
111
|
get title() {
|
|
@@ -126,14 +128,14 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
126
128
|
}
|
|
127
129
|
registerOpenProfileSubMenu() {
|
|
128
130
|
MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
|
|
129
|
-
title: ( localize(
|
|
131
|
+
title: ( localize(10479, "New Window with Profile")),
|
|
130
132
|
submenu: OpenProfileMenu,
|
|
131
133
|
group: '1_new',
|
|
132
134
|
order: 4,
|
|
133
135
|
});
|
|
134
136
|
}
|
|
135
137
|
registerProfilesActions() {
|
|
136
|
-
this.profilesDisposable.value = (
|
|
138
|
+
this.profilesDisposable.value = ( new DisposableStore());
|
|
137
139
|
for (const profile of this.userDataProfilesService.profiles) {
|
|
138
140
|
if (!profile.isTransient) {
|
|
139
141
|
this.profilesDisposable.value.add(this.registerProfileEntryAction(profile));
|
|
@@ -149,9 +151,9 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
149
151
|
id: `workbench.profiles.actions.profileEntry.${profile.id}`,
|
|
150
152
|
title: profile.name,
|
|
151
153
|
metadata: {
|
|
152
|
-
description: ( localize2(
|
|
154
|
+
description: ( localize2(10480, "Switch to {0} profile", profile.name)),
|
|
153
155
|
},
|
|
154
|
-
toggled: (
|
|
156
|
+
toggled: ( ContextKeyExpr.equals(CURRENT_PROFILE_CONTEXT.key, profile.id)),
|
|
155
157
|
menu: [
|
|
156
158
|
{
|
|
157
159
|
id: ProfilesMenu,
|
|
@@ -172,7 +174,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
172
174
|
constructor() {
|
|
173
175
|
super({
|
|
174
176
|
id: `workbench.profiles.actions.newWindowWithProfile`,
|
|
175
|
-
title: ( localize2(
|
|
177
|
+
title: ( localize2(10481, "New Window with Profile...")),
|
|
176
178
|
category: PROFILES_CATEGORY,
|
|
177
179
|
precondition: HAS_PROFILES_CONTEXT,
|
|
178
180
|
f1: true,
|
|
@@ -182,12 +184,12 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
182
184
|
const quickInputService = accessor.get(IQuickInputService);
|
|
183
185
|
const userDataProfilesService = accessor.get(IUserDataProfilesService);
|
|
184
186
|
const hostService = accessor.get(IHostService);
|
|
185
|
-
const pick = await quickInputService.pick((
|
|
187
|
+
const pick = await quickInputService.pick(( userDataProfilesService.profiles.map(profile => ({
|
|
186
188
|
label: profile.name,
|
|
187
189
|
profile
|
|
188
|
-
})))
|
|
189
|
-
title: ( localize(
|
|
190
|
-
placeHolder: ( localize(
|
|
190
|
+
}))), {
|
|
191
|
+
title: ( localize(10482, "New Window with Profile")),
|
|
192
|
+
placeHolder: ( localize(10483, "Select Profile")),
|
|
191
193
|
canPickMany: false
|
|
192
194
|
});
|
|
193
195
|
if (pick) {
|
|
@@ -197,15 +199,15 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
197
199
|
});
|
|
198
200
|
}
|
|
199
201
|
registerNewWindowAction(profile) {
|
|
200
|
-
const disposables = (
|
|
202
|
+
const disposables = ( new DisposableStore());
|
|
201
203
|
const id = `workbench.action.openProfile.${profile.name.replace('/\s+/', '_')}`;
|
|
202
204
|
disposables.add(registerAction2(class NewWindowAction extends Action2 {
|
|
203
205
|
constructor() {
|
|
204
206
|
super({
|
|
205
207
|
id,
|
|
206
|
-
title: ( localize2(
|
|
208
|
+
title: ( localize2(10484, "{0}", profile.name)),
|
|
207
209
|
metadata: {
|
|
208
|
-
description: ( localize2(
|
|
210
|
+
description: ( localize2(10485, "Open New Window with {0} Profile", profile.name)),
|
|
209
211
|
},
|
|
210
212
|
menu: {
|
|
211
213
|
id: OpenProfileMenu,
|
|
@@ -223,7 +225,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
223
225
|
command: {
|
|
224
226
|
id,
|
|
225
227
|
category: PROFILES_CATEGORY,
|
|
226
|
-
title: ( localize2(
|
|
228
|
+
title: ( localize2(10486, "Open {0} Profile", profile.name)),
|
|
227
229
|
precondition: HAS_PROFILES_CONTEXT
|
|
228
230
|
},
|
|
229
231
|
}));
|
|
@@ -235,7 +237,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
235
237
|
constructor() {
|
|
236
238
|
super({
|
|
237
239
|
id: `workbench.profiles.actions.switchProfile`,
|
|
238
|
-
title: ( localize2(
|
|
240
|
+
title: ( localize2(10487, 'Switch Profile...')),
|
|
239
241
|
category: PROFILES_CATEGORY,
|
|
240
242
|
f1: true,
|
|
241
243
|
});
|
|
@@ -251,7 +253,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
251
253
|
});
|
|
252
254
|
}
|
|
253
255
|
const result = await quickInputService.pick(items.sort((a, b) => a.profile.name.localeCompare(b.profile.name)), {
|
|
254
|
-
placeHolder: ( localize(
|
|
256
|
+
placeHolder: ( localize(10488, "Select Profile"))
|
|
255
257
|
});
|
|
256
258
|
if (result) {
|
|
257
259
|
await that.userDataProfileManagementService.switchProfile(result.profile);
|
|
@@ -260,27 +262,27 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
260
262
|
});
|
|
261
263
|
}
|
|
262
264
|
registerManageProfilesAction() {
|
|
263
|
-
const disposables = (
|
|
265
|
+
const disposables = ( new DisposableStore());
|
|
264
266
|
disposables.add(registerAction2(class ManageProfilesAction extends Action2 {
|
|
265
267
|
constructor() {
|
|
266
268
|
super({
|
|
267
269
|
id: `workbench.profiles.actions.manageProfiles`,
|
|
268
270
|
title: {
|
|
269
|
-
...( localize2(
|
|
270
|
-
mnemonicTitle: ( localize(
|
|
271
|
+
...( localize2(10489, "Profiles")),
|
|
272
|
+
mnemonicTitle: ( localize(10490, "&&Profiles")),
|
|
271
273
|
},
|
|
272
274
|
menu: [
|
|
273
275
|
{
|
|
274
276
|
id: MenuId.GlobalActivity,
|
|
275
277
|
group: '2_configuration',
|
|
276
278
|
order: 1,
|
|
277
|
-
when: (
|
|
279
|
+
when: ( HAS_PROFILES_CONTEXT.negate())
|
|
278
280
|
},
|
|
279
281
|
{
|
|
280
282
|
id: MenuId.MenubarPreferencesMenu,
|
|
281
283
|
group: '2_configuration',
|
|
282
284
|
order: 1,
|
|
283
|
-
when: (
|
|
285
|
+
when: ( HAS_PROFILES_CONTEXT.negate())
|
|
284
286
|
},
|
|
285
287
|
{
|
|
286
288
|
id: ProfilesMenu,
|
|
@@ -293,27 +295,27 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
293
295
|
run(accessor) {
|
|
294
296
|
const editorGroupsService = accessor.get(IEditorGroupsService);
|
|
295
297
|
const instantiationService = accessor.get(IInstantiationService);
|
|
296
|
-
return editorGroupsService.activeGroup.openEditor((
|
|
298
|
+
return editorGroupsService.activeGroup.openEditor(( new UserDataProfilesEditorInput(instantiationService)));
|
|
297
299
|
}
|
|
298
300
|
}));
|
|
299
301
|
disposables.add(MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
300
302
|
command: {
|
|
301
303
|
id: 'workbench.profiles.actions.manageProfiles',
|
|
302
304
|
category: Categories.Preferences,
|
|
303
|
-
title: ( localize2(
|
|
305
|
+
title: ( localize2(10491, "Open Profiles (UI)")),
|
|
304
306
|
},
|
|
305
307
|
}));
|
|
306
308
|
return disposables;
|
|
307
309
|
}
|
|
308
310
|
registerExportCurrentProfileAction() {
|
|
309
311
|
const that = this;
|
|
310
|
-
const disposables = (
|
|
312
|
+
const disposables = ( new DisposableStore());
|
|
311
313
|
const id = 'workbench.profiles.actions.exportProfile';
|
|
312
314
|
disposables.add(registerAction2(class ExportProfileAction extends Action2 {
|
|
313
315
|
constructor() {
|
|
314
316
|
super({
|
|
315
317
|
id,
|
|
316
|
-
title: ( localize2(
|
|
318
|
+
title: ( localize2(10492, "Export Profile...")),
|
|
317
319
|
category: PROFILES_CATEGORY,
|
|
318
320
|
f1: true,
|
|
319
321
|
});
|
|
@@ -327,7 +329,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
327
329
|
command: {
|
|
328
330
|
id,
|
|
329
331
|
title: ( localize2(
|
|
330
|
-
|
|
332
|
+
10493,
|
|
331
333
|
"Export Profile ({0})...",
|
|
332
334
|
that.userDataProfileService.currentProfile.name
|
|
333
335
|
)),
|
|
@@ -341,7 +343,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
341
343
|
constructor() {
|
|
342
344
|
super({
|
|
343
345
|
id: 'workbench.profiles.actions.createFromCurrentProfile',
|
|
344
|
-
title: ( localize2(
|
|
346
|
+
title: ( localize2(10494, "Save Current Profile As...")),
|
|
345
347
|
category: PROFILES_CATEGORY,
|
|
346
348
|
f1: true,
|
|
347
349
|
});
|
|
@@ -358,7 +360,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
358
360
|
constructor() {
|
|
359
361
|
super({
|
|
360
362
|
id: 'workbench.profiles.actions.createProfile',
|
|
361
|
-
title: ( localize2(
|
|
363
|
+
title: ( localize2(10495, "New Profile...")),
|
|
362
364
|
category: PROFILES_CATEGORY,
|
|
363
365
|
f1: true,
|
|
364
366
|
menu: [
|
|
@@ -381,7 +383,7 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
381
383
|
constructor() {
|
|
382
384
|
super({
|
|
383
385
|
id: 'workbench.profiles.actions.deleteProfile',
|
|
384
|
-
title: ( localize2(
|
|
386
|
+
title: ( localize2(10496, "Delete Profile...")),
|
|
385
387
|
category: PROFILES_CATEGORY,
|
|
386
388
|
f1: true,
|
|
387
389
|
precondition: HAS_PROFILES_CONTEXT,
|
|
@@ -395,18 +397,18 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
395
397
|
const notificationService = accessor.get(INotificationService);
|
|
396
398
|
const profiles = userDataProfilesService.profiles.filter(p => !p.isDefault && !p.isTransient);
|
|
397
399
|
if (profiles.length) {
|
|
398
|
-
const picks = await quickInputService.pick((
|
|
400
|
+
const picks = await quickInputService.pick(( profiles.map(profile => ({
|
|
399
401
|
label: profile.name,
|
|
400
|
-
description: profile.id === userDataProfileService.currentProfile.id ? ( localize(
|
|
402
|
+
description: profile.id === userDataProfileService.currentProfile.id ? ( localize(10497, "Current")) : undefined,
|
|
401
403
|
profile
|
|
402
|
-
})))
|
|
403
|
-
title: ( localize(
|
|
404
|
-
placeHolder: ( localize(
|
|
404
|
+
}))), {
|
|
405
|
+
title: ( localize(10498, "Delete Profile...")),
|
|
406
|
+
placeHolder: ( localize(10499, "Select Profiles to Delete")),
|
|
405
407
|
canPickMany: true
|
|
406
408
|
});
|
|
407
409
|
if (picks) {
|
|
408
410
|
try {
|
|
409
|
-
await Promise.all((
|
|
411
|
+
await Promise.all(( picks.map(pick => userDataProfileManagementService.removeProfile(pick.profile))));
|
|
410
412
|
}
|
|
411
413
|
catch (error) {
|
|
412
414
|
notificationService.error(error);
|
|
@@ -429,12 +431,12 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
429
431
|
});
|
|
430
432
|
}
|
|
431
433
|
run(accessor) {
|
|
432
|
-
return accessor.get(IOpenerService).open((
|
|
434
|
+
return accessor.get(IOpenerService).open(( URI.parse('https://aka.ms/vscode-profiles-help')));
|
|
433
435
|
}
|
|
434
436
|
}));
|
|
435
437
|
}
|
|
436
438
|
async reportWorkspaceProfileInfo() {
|
|
437
|
-
await this.lifecycleService.when(
|
|
439
|
+
await this.lifecycleService.when(LifecyclePhase.Eventually);
|
|
438
440
|
if (this.userDataProfilesService.profiles.length > 1) {
|
|
439
441
|
this.telemetryService.publicLog2('profiles:count', { count: this.userDataProfilesService.profiles.length - 1 });
|
|
440
442
|
}
|
|
@@ -445,19 +447,19 @@ let UserDataProfilesWorkbenchContribution = class UserDataProfilesWorkbenchContr
|
|
|
445
447
|
});
|
|
446
448
|
}
|
|
447
449
|
};
|
|
448
|
-
UserDataProfilesWorkbenchContribution = (
|
|
449
|
-
(
|
|
450
|
-
(
|
|
451
|
-
(
|
|
452
|
-
(
|
|
453
|
-
(
|
|
454
|
-
(
|
|
455
|
-
(
|
|
456
|
-
(
|
|
457
|
-
(
|
|
458
|
-
(
|
|
459
|
-
(
|
|
460
|
-
(
|
|
461
|
-
], UserDataProfilesWorkbenchContribution))
|
|
450
|
+
UserDataProfilesWorkbenchContribution = ( __decorate([
|
|
451
|
+
( __param(0, IUserDataProfileService)),
|
|
452
|
+
( __param(1, IUserDataProfilesService)),
|
|
453
|
+
( __param(2, IUserDataProfileManagementService)),
|
|
454
|
+
( __param(3, ITelemetryService)),
|
|
455
|
+
( __param(4, IWorkspaceContextService)),
|
|
456
|
+
( __param(5, IWorkspaceTagsService)),
|
|
457
|
+
( __param(6, IContextKeyService)),
|
|
458
|
+
( __param(7, IEditorGroupsService)),
|
|
459
|
+
( __param(8, IInstantiationService)),
|
|
460
|
+
( __param(9, ILifecycleService)),
|
|
461
|
+
( __param(10, IURLService)),
|
|
462
|
+
( __param(11, IBrowserWorkbenchEnvironmentService))
|
|
463
|
+
], UserDataProfilesWorkbenchContribution));
|
|
462
464
|
|
|
463
465
|
export { OpenProfileMenu, UserDataProfilesWorkbenchContribution };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
|
|
1
2
|
import { localize2 } from 'vscode/vscode/vs/nls';
|
|
2
3
|
import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
|
|
3
4
|
import { Action2, registerAction2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
4
5
|
import { IUserDataProfilesService } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfile.service';
|
|
5
|
-
import { PROFILES_CATEGORY } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile';
|
|
6
|
+
import { PROFILES_CATEGORY } from '@codingame/monaco-vscode-e72c94ca-257a-5b75-8b68-5a5fa3c18255-common/vscode/vs/workbench/services/userDataProfile/common/userDataProfile';
|
|
6
7
|
import { IUserDataProfileManagementService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
|
|
7
8
|
|
|
8
9
|
class CreateTransientProfileAction extends Action2 {
|
|
9
10
|
static { this.ID = 'workbench.profiles.actions.createTemporaryProfile'; }
|
|
10
|
-
static { this.TITLE = ( localize2(
|
|
11
|
+
static { this.TITLE = ( localize2(10500, "Create a Temporary Profile")); }
|
|
11
12
|
constructor() {
|
|
12
13
|
super({
|
|
13
14
|
id: CreateTransientProfileAction.ID,
|
|
@@ -25,7 +26,7 @@ registerAction2(class CleanupProfilesAction extends Action2 {
|
|
|
25
26
|
constructor() {
|
|
26
27
|
super({
|
|
27
28
|
id: 'workbench.profiles.actions.cleanupProfiles',
|
|
28
|
-
title: ( localize2(
|
|
29
|
+
title: ( localize2(10501, "Cleanup Profiles")),
|
|
29
30
|
category: Categories.Developer,
|
|
30
31
|
f1: true,
|
|
31
32
|
});
|
|
@@ -38,7 +39,7 @@ registerAction2(class ResetWorkspacesAction extends Action2 {
|
|
|
38
39
|
constructor() {
|
|
39
40
|
super({
|
|
40
41
|
id: 'workbench.profiles.actions.resetWorkspaces',
|
|
41
|
-
title: ( localize2(
|
|
42
|
+
title: ( localize2(10502, "Reset Workspace Profiles Associations")),
|
|
42
43
|
category: Categories.Developer,
|
|
43
44
|
f1: true,
|
|
44
45
|
});
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Dimension, IDomPosition } from "vscode/vscode/vs/base/browser/dom";
|
|
2
|
+
import { ThemeIcon } from "vscode/vscode/vs/base/common/themables";
|
|
3
|
+
import { IContextMenuService } from "vscode/vscode/vs/platform/contextview/browser/contextView.service";
|
|
4
|
+
import { IInstantiationService } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
|
|
5
|
+
import { IStorageService } from "vscode/vscode/vs/platform/storage/common/storage.service";
|
|
6
|
+
import { ITelemetryService } from "vscode/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
7
|
+
import { IThemeService } from "vscode/vscode/vs/platform/theme/common/themeService.service";
|
|
8
|
+
import { IUserDataProfile } from "vscode/vscode/vs/platform/userDataProfile/common/userDataProfile";
|
|
9
|
+
import { EditorPane } from "@codingame/monaco-vscode-9e888134-1a6f-58d9-b0e6-0fc047448366-common/vscode/vs/workbench/browser/parts/editor/editorPane";
|
|
10
|
+
import { IEditorOpenContext, IEditorSerializer, IUntypedEditorInput } from "vscode/vscode/vs/workbench/common/editor";
|
|
11
|
+
import { EditorInput } from "vscode/vscode/vs/workbench/common/editor/editorInput";
|
|
12
|
+
import { IUserDataProfilesEditor } from "../common/userDataProfile.js";
|
|
13
|
+
import { IEditorGroup } from "vscode/vscode/vs/workbench/services/editor/common/editorGroupsService";
|
|
14
|
+
import { CancellationToken } from "vscode/vscode/vs/base/common/cancellation";
|
|
15
|
+
import { IEditorOptions } from "vscode/vscode/vs/platform/editor/common/editor";
|
|
16
|
+
import { URI } from "vscode/vscode/vs/base/common/uri";
|
|
17
|
+
import { IFileDialogService } from "vscode/vscode/vs/platform/dialogs/common/dialogs.service";
|
|
18
|
+
import { IQuickInputService } from "vscode/vscode/vs/platform/quickinput/common/quickInput.service";
|
|
19
|
+
import { UserDataProfilesEditorModel } from "./userDataProfilesEditorModel.js";
|
|
20
|
+
export declare const profilesSashBorder: string;
|
|
21
|
+
export declare class UserDataProfilesEditor extends EditorPane implements IUserDataProfilesEditor {
|
|
22
|
+
private readonly quickInputService;
|
|
23
|
+
private readonly fileDialogService;
|
|
24
|
+
private readonly contextMenuService;
|
|
25
|
+
private readonly instantiationService;
|
|
26
|
+
static readonly ID: string;
|
|
27
|
+
private container;
|
|
28
|
+
private splitView;
|
|
29
|
+
private profilesList;
|
|
30
|
+
private profileWidget;
|
|
31
|
+
private model;
|
|
32
|
+
private templates;
|
|
33
|
+
constructor(group: IEditorGroup, telemetryService: ITelemetryService, themeService: IThemeService, storageService: IStorageService, quickInputService: IQuickInputService, fileDialogService: IFileDialogService, contextMenuService: IContextMenuService, instantiationService: IInstantiationService);
|
|
34
|
+
layout(dimension: Dimension, position?: IDomPosition | undefined): void;
|
|
35
|
+
protected createEditor(parent: HTMLElement): void;
|
|
36
|
+
updateStyles(): void;
|
|
37
|
+
private renderSidebar;
|
|
38
|
+
private renderNewProfileButton;
|
|
39
|
+
private getCreateFromTemplateActions;
|
|
40
|
+
private registerListeners;
|
|
41
|
+
private getTreeContextMenuActions;
|
|
42
|
+
private importProfile;
|
|
43
|
+
createNewProfile(copyFrom?: URI | IUserDataProfile): Promise<void>;
|
|
44
|
+
selectProfile(profile: IUserDataProfile): void;
|
|
45
|
+
private getProfileUriFromFileSystem;
|
|
46
|
+
setInput(input: UserDataProfilesEditorInput, options: IEditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise<void>;
|
|
47
|
+
focus(): void;
|
|
48
|
+
private updateProfilesList;
|
|
49
|
+
}
|
|
50
|
+
export declare class UserDataProfilesEditorInput extends EditorInput {
|
|
51
|
+
private readonly instantiationService;
|
|
52
|
+
static readonly ID: string;
|
|
53
|
+
readonly resource: undefined;
|
|
54
|
+
private readonly model;
|
|
55
|
+
private _dirty;
|
|
56
|
+
get dirty(): boolean;
|
|
57
|
+
set dirty(dirty: boolean);
|
|
58
|
+
constructor(instantiationService: IInstantiationService);
|
|
59
|
+
get typeId(): string;
|
|
60
|
+
getName(): string;
|
|
61
|
+
getIcon(): ThemeIcon | undefined;
|
|
62
|
+
resolve(): Promise<UserDataProfilesEditorModel>;
|
|
63
|
+
isDirty(): boolean;
|
|
64
|
+
save(): Promise<EditorInput>;
|
|
65
|
+
revert(): Promise<void>;
|
|
66
|
+
matches(otherInput: EditorInput | IUntypedEditorInput): boolean;
|
|
67
|
+
dispose(): void;
|
|
68
|
+
}
|
|
69
|
+
export declare class UserDataProfilesEditorInputSerializer implements IEditorSerializer {
|
|
70
|
+
canSerialize(editorInput: EditorInput): boolean;
|
|
71
|
+
serialize(editorInput: EditorInput): string;
|
|
72
|
+
deserialize(instantiationService: IInstantiationService): EditorInput;
|
|
73
|
+
}
|