@codingame/monaco-vscode-user-data-profile-service-override 5.3.0 → 6.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 +2 -2
- package/vscode/src/vs/platform/userDataProfile/common/userDataProfileStorageService.js +7 -9
- package/vscode/src/vs/platform/userDataSync/common/extensionsSync.js +21 -20
- package/vscode/src/vs/platform/userDataSync/common/globalStateSync.js +26 -25
- package/vscode/src/vs/platform/userDataSync/common/keybindingsSync.js +26 -25
- package/vscode/src/vs/platform/userDataSync/common/settingsSync.js +20 -18
- package/vscode/src/vs/platform/userDataSync/common/snippetsSync.js +40 -40
- package/vscode/src/vs/platform/userDataSync/common/tasksSync.js +14 -14
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/media/userDataProfilesEditor.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfile.contribution.js +4 -3
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfile.js +91 -25
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditor.js +943 -0
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditorModel.js +481 -0
- package/vscode/src/vs/workbench/services/userData/browser/userDataInit.js +2 -1
- package/vscode/src/vs/workbench/services/userDataProfile/browser/extensionsResource.js +14 -8
- package/vscode/src/vs/workbench/services/userDataProfile/browser/globalStateResource.js +10 -8
- package/vscode/src/vs/workbench/services/userDataProfile/browser/keybindingsResource.js +5 -4
- package/vscode/src/vs/workbench/services/userDataProfile/browser/settingsResource.js +7 -6
- package/vscode/src/vs/workbench/services/userDataProfile/browser/snippetsResource.js +4 -3
- package/vscode/src/vs/workbench/services/userDataProfile/browser/tasksResource.js +5 -4
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileImportExportService.js +119 -70
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileInit.js +9 -7
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.js +1 -0
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileStorageService.js +4 -3
- package/vscode/src/vs/workbench/services/userDataSync/browser/userDataSyncInit.js +15 -13
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { VSBuffer } from 'vscode/vscode/vs/base/common/buffer';
|
|
3
|
-
import { FileOperationError } from 'vscode/vscode/vs/platform/files/common/files';
|
|
3
|
+
import { FileOperationError, FileOperationResult } from 'vscode/vscode/vs/platform/files/common/files';
|
|
4
4
|
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
|
|
5
5
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
6
6
|
import { IUserDataProfileService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
|
|
7
7
|
import { platform } from 'vscode/vscode/vs/base/common/platform';
|
|
8
8
|
import { TreeItemCollapsibleState } from 'vscode/vscode/vs/workbench/common/views';
|
|
9
|
+
import { ProfileResourceType } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfile';
|
|
9
10
|
import { API_OPEN_EDITOR_COMMAND_ID } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorCommands';
|
|
10
11
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
11
12
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
@@ -61,7 +62,7 @@ let KeybindingsResource = class KeybindingsResource {
|
|
|
61
62
|
);
|
|
62
63
|
}
|
|
63
64
|
catch (error) {
|
|
64
|
-
if (error instanceof FileOperationError && error.fileOperationResult ===
|
|
65
|
+
if (error instanceof FileOperationError && error.fileOperationResult === FileOperationResult.FILE_NOT_FOUND) {
|
|
65
66
|
return null;
|
|
66
67
|
}
|
|
67
68
|
else {
|
|
@@ -79,8 +80,8 @@ let KeybindingsResourceTreeItem = class KeybindingsResourceTreeItem {
|
|
|
79
80
|
this.profile = profile;
|
|
80
81
|
this.uriIdentityService = uriIdentityService;
|
|
81
82
|
this.instantiationService = instantiationService;
|
|
82
|
-
this.type =
|
|
83
|
-
this.handle =
|
|
83
|
+
this.type = ProfileResourceType.Keybindings;
|
|
84
|
+
this.handle = ProfileResourceType.Keybindings;
|
|
84
85
|
this.label = { label: ( localizeWithPath(_moduleId, 0, "Keyboard Shortcuts")) };
|
|
85
86
|
this.collapsibleState = TreeItemCollapsibleState.Expanded;
|
|
86
87
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { VSBuffer } from 'vscode/vscode/vs/base/common/buffer';
|
|
3
|
-
import { Extensions } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
4
|
-
import { FileOperationError } from 'vscode/vscode/vs/platform/files/common/files';
|
|
3
|
+
import { Extensions, ConfigurationScope } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
4
|
+
import { FileOperationError, FileOperationResult } from 'vscode/vscode/vs/platform/files/common/files';
|
|
5
5
|
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
|
|
6
6
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
7
7
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
@@ -9,6 +9,7 @@ import { IUserDataProfileService } from 'vscode/vscode/vs/workbench/services/use
|
|
|
9
9
|
import { updateIgnoredSettings } from 'vscode/vscode/vs/platform/userDataSync/common/settingsMerge';
|
|
10
10
|
import { IUserDataSyncUtilService } from 'vscode/vscode/vs/platform/userDataSync/common/userDataSync.service';
|
|
11
11
|
import { TreeItemCollapsibleState } from 'vscode/vscode/vs/workbench/common/views';
|
|
12
|
+
import { ProfileResourceType } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfile';
|
|
12
13
|
import { API_OPEN_EDITOR_COMMAND_ID } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorCommands';
|
|
13
14
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
14
15
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
@@ -70,7 +71,7 @@ let SettingsResource = class SettingsResource {
|
|
|
70
71
|
}
|
|
71
72
|
getIgnoredSettings() {
|
|
72
73
|
const allSettings = ( (Registry.as(Extensions.Configuration))).getConfigurationProperties();
|
|
73
|
-
const ignoredSettings = ( (Object.keys(allSettings))).filter(key => allSettings[key]?.scope ===
|
|
74
|
+
const ignoredSettings = ( (Object.keys(allSettings))).filter(key => allSettings[key]?.scope === ConfigurationScope.MACHINE || allSettings[key]?.scope === ConfigurationScope.MACHINE_OVERRIDABLE);
|
|
74
75
|
return ignoredSettings;
|
|
75
76
|
}
|
|
76
77
|
async getLocalFileContent(profile) {
|
|
@@ -81,7 +82,7 @@ let SettingsResource = class SettingsResource {
|
|
|
81
82
|
);
|
|
82
83
|
}
|
|
83
84
|
catch (error) {
|
|
84
|
-
if (error instanceof FileOperationError && error.fileOperationResult ===
|
|
85
|
+
if (error instanceof FileOperationError && error.fileOperationResult === FileOperationResult.FILE_NOT_FOUND) {
|
|
85
86
|
return null;
|
|
86
87
|
}
|
|
87
88
|
else {
|
|
@@ -100,8 +101,8 @@ let SettingsResourceTreeItem = class SettingsResourceTreeItem {
|
|
|
100
101
|
this.profile = profile;
|
|
101
102
|
this.uriIdentityService = uriIdentityService;
|
|
102
103
|
this.instantiationService = instantiationService;
|
|
103
|
-
this.type =
|
|
104
|
-
this.handle =
|
|
104
|
+
this.type = ProfileResourceType.Settings;
|
|
105
|
+
this.handle = ProfileResourceType.Settings;
|
|
105
106
|
this.label = { label: ( localizeWithPath(_moduleId, 0, "Settings")) };
|
|
106
107
|
this.collapsibleState = TreeItemCollapsibleState.Expanded;
|
|
107
108
|
}
|
|
@@ -2,10 +2,11 @@ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
|
2
2
|
import { VSBuffer } from 'vscode/vscode/vs/base/common/buffer';
|
|
3
3
|
import { ResourceSet } from 'vscode/vscode/vs/base/common/map';
|
|
4
4
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
5
|
-
import { FileOperationError } from 'vscode/vscode/vs/platform/files/common/files';
|
|
5
|
+
import { FileOperationError, FileOperationResult } from 'vscode/vscode/vs/platform/files/common/files';
|
|
6
6
|
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
|
|
7
7
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
8
8
|
import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
9
|
+
import { ProfileResourceType } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfile';
|
|
9
10
|
import { API_OPEN_EDITOR_COMMAND_ID } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorCommands';
|
|
10
11
|
import { TreeItemCollapsibleState } from 'vscode/vscode/vs/workbench/common/views';
|
|
11
12
|
import { IUserDataProfileService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
|
|
@@ -63,7 +64,7 @@ let SnippetsResource = class SnippetsResource {
|
|
|
63
64
|
stat = await this.fileService.resolve(profile.snippetsHome);
|
|
64
65
|
}
|
|
65
66
|
catch (e) {
|
|
66
|
-
if (e instanceof FileOperationError && e.fileOperationResult ===
|
|
67
|
+
if (e instanceof FileOperationError && e.fileOperationResult === FileOperationResult.FILE_NOT_FOUND) {
|
|
67
68
|
return snippets;
|
|
68
69
|
}
|
|
69
70
|
else {
|
|
@@ -91,7 +92,7 @@ let SnippetsResourceTreeItem = class SnippetsResourceTreeItem {
|
|
|
91
92
|
this.profile = profile;
|
|
92
93
|
this.instantiationService = instantiationService;
|
|
93
94
|
this.uriIdentityService = uriIdentityService;
|
|
94
|
-
this.type =
|
|
95
|
+
this.type = ProfileResourceType.Snippets;
|
|
95
96
|
this.handle = ( (this.profile.snippetsHome.toString()));
|
|
96
97
|
this.label = { label: ( localizeWithPath(_moduleId, 0, "Snippets")) };
|
|
97
98
|
this.collapsibleState = TreeItemCollapsibleState.Collapsed;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { VSBuffer } from 'vscode/vscode/vs/base/common/buffer';
|
|
3
3
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
4
|
-
import { FileOperationError } from 'vscode/vscode/vs/platform/files/common/files';
|
|
4
|
+
import { FileOperationError, FileOperationResult } from 'vscode/vscode/vs/platform/files/common/files';
|
|
5
5
|
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
|
|
6
6
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
7
7
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
8
8
|
import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
9
|
+
import { ProfileResourceType } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfile';
|
|
9
10
|
import { API_OPEN_EDITOR_COMMAND_ID } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorCommands';
|
|
10
11
|
import { TreeItemCollapsibleState } from 'vscode/vscode/vs/workbench/common/views';
|
|
11
12
|
import { IUserDataProfileService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
|
|
@@ -60,7 +61,7 @@ let TasksResource = class TasksResource {
|
|
|
60
61
|
);
|
|
61
62
|
}
|
|
62
63
|
catch (error) {
|
|
63
|
-
if (error instanceof FileOperationError && error.fileOperationResult ===
|
|
64
|
+
if (error instanceof FileOperationError && error.fileOperationResult === FileOperationResult.FILE_NOT_FOUND) {
|
|
64
65
|
return null;
|
|
65
66
|
}
|
|
66
67
|
else {
|
|
@@ -78,8 +79,8 @@ let TasksResourceTreeItem = class TasksResourceTreeItem {
|
|
|
78
79
|
this.profile = profile;
|
|
79
80
|
this.uriIdentityService = uriIdentityService;
|
|
80
81
|
this.instantiationService = instantiationService;
|
|
81
|
-
this.type =
|
|
82
|
-
this.handle =
|
|
82
|
+
this.type = ProfileResourceType.Tasks;
|
|
83
|
+
this.handle = ProfileResourceType.Tasks;
|
|
83
84
|
this.label = { label: ( localizeWithPath(_moduleId, 0, "User Tasks")) };
|
|
84
85
|
this.collapsibleState = TreeItemCollapsibleState.Expanded;
|
|
85
86
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import './media/userDataProfileView.css.js';
|
|
3
3
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
4
|
-
import
|
|
4
|
+
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
5
5
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
6
6
|
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
|
|
7
7
|
import { Event, Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
@@ -14,14 +14,15 @@ import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/commo
|
|
|
14
14
|
import { ITextFileService } from 'vscode/vscode/vs/workbench/services/textfile/common/textfiles.service';
|
|
15
15
|
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
|
|
16
16
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
17
|
-
import { Extensions, TreeItemCollapsibleState } from 'vscode/vscode/vs/workbench/common/views';
|
|
17
|
+
import { Extensions, ViewContainerLocation, TreeItemCollapsibleState } from 'vscode/vscode/vs/workbench/common/views';
|
|
18
18
|
import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views.service';
|
|
19
19
|
import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
20
|
-
import { isUserDataProfile, toUserDataProfile } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfile';
|
|
20
|
+
import { isUserDataProfile, ProfileResourceType, toUserDataProfile } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfile';
|
|
21
21
|
import { IUserDataProfilesService } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfile.service';
|
|
22
22
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
23
23
|
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
24
24
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
25
|
+
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
25
26
|
import { ViewPaneContainer } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPaneContainer';
|
|
26
27
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
27
28
|
import { TreeView, TreeViewPane } from 'vscode/vscode/vs/workbench/browser/parts/views/treeView';
|
|
@@ -42,7 +43,9 @@ import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/te
|
|
|
42
43
|
import { defaultInputBoxStyles, defaultSelectBoxStyles, defaultButtonStyles } from 'vscode/vscode/vs/platform/theme/browser/defaultStyles';
|
|
43
44
|
import { generateUuid } from 'vscode/vscode/vs/base/common/uuid';
|
|
44
45
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
46
|
+
import { EditorsOrder } from 'vscode/vscode/vs/workbench/common/editor';
|
|
45
47
|
import { getErrorMessage, onUnexpectedError } from 'vscode/vscode/vs/base/common/errors';
|
|
48
|
+
import { ProgressLocation } from 'vscode/vscode/vs/platform/progress/common/progress';
|
|
46
49
|
import { IProgressService } from 'vscode/vscode/vs/platform/progress/common/progress.service';
|
|
47
50
|
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
48
51
|
import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
@@ -64,6 +67,7 @@ import { registerAction2, Action2, MenuId } from 'vscode/vscode/vs/platform/acti
|
|
|
64
67
|
import { getAllCodicons, Codicon } from 'vscode/vscode/vs/base/common/codicons';
|
|
65
68
|
import { Barrier } from 'vscode/vscode/vs/base/common/async';
|
|
66
69
|
import { IExtensionManagementService } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagement.service';
|
|
70
|
+
import { ExtensionType } from 'vscode/vscode/vs/platform/extensions/common/extensions';
|
|
67
71
|
import { areSameExtensions } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagementUtil';
|
|
68
72
|
import { MarkdownString } from 'vscode/vscode/vs/base/common/htmlContent';
|
|
69
73
|
import { renderMarkdown } from 'vscode/vscode/vs/base/browser/markdownRenderer';
|
|
@@ -71,9 +75,11 @@ import { showWindowLogActionId } from 'vscode/vscode/vs/workbench/services/log/c
|
|
|
71
75
|
import { SelectBox } from 'vscode/vscode/vs/base/browser/ui/selectBox/selectBox';
|
|
72
76
|
import { ThemeIcon } from 'vscode/vscode/vs/base/common/themables';
|
|
73
77
|
import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover.service';
|
|
78
|
+
import { HoverPosition } from 'vscode/vscode/vs/base/browser/ui/hover/hoverWidget';
|
|
74
79
|
import { DEFAULT_ICON, ICONS } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfileIcons';
|
|
75
80
|
import { WorkbenchIconSelectBox } from 'vscode/vscode/vs/workbench/services/userDataProfile/browser/iconSelectBox';
|
|
76
81
|
import { StandardKeyboardEvent } from 'vscode/vscode/vs/base/browser/keyboardEvent';
|
|
82
|
+
import { KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
77
83
|
import { IAccessibleViewInformationService } from 'vscode/vscode/vs/workbench/services/accessibility/common/accessibleViewInformationService.service';
|
|
78
84
|
|
|
79
85
|
var UserDataProfileImportExportService_1;
|
|
@@ -128,7 +134,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
128
134
|
))),
|
|
129
135
|
icon: defaultUserDataProfileIcon,
|
|
130
136
|
hideIfEmpty: true,
|
|
131
|
-
},
|
|
137
|
+
}, ViewContainerLocation.Sidebar);
|
|
132
138
|
urlService.registerHandler(this);
|
|
133
139
|
}
|
|
134
140
|
isProfileURL(uri) {
|
|
@@ -174,7 +180,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
174
180
|
try {
|
|
175
181
|
const mode = options?.mode ?? 'preview';
|
|
176
182
|
const profileTemplate = await this.progressService.withProgress({
|
|
177
|
-
location:
|
|
183
|
+
location: ProgressLocation.Window,
|
|
178
184
|
command: showWindowLogActionId,
|
|
179
185
|
title: ( localizeWithPath(
|
|
180
186
|
_moduleId,
|
|
@@ -216,11 +222,11 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
216
222
|
}
|
|
217
223
|
const disposables = ( (new DisposableStore()));
|
|
218
224
|
const title = profile ? ( localizeWithPath(_moduleId, 5, "Edit {0} Profile...", profile.name)) : ( localizeWithPath(_moduleId, 6, "Create New Profile..."));
|
|
219
|
-
const settings = { id:
|
|
220
|
-
const keybindings = { id:
|
|
221
|
-
const snippets = { id:
|
|
222
|
-
const tasks = { id:
|
|
223
|
-
const extensions = { id:
|
|
225
|
+
const settings = { id: ProfileResourceType.Settings, label: ( localizeWithPath(_moduleId, 7, "Settings")), picked: !profile?.useDefaultFlags?.settings };
|
|
226
|
+
const keybindings = { id: ProfileResourceType.Keybindings, label: ( localizeWithPath(_moduleId, 8, "Keyboard Shortcuts")), picked: !profile?.useDefaultFlags?.keybindings };
|
|
227
|
+
const snippets = { id: ProfileResourceType.Snippets, label: ( localizeWithPath(_moduleId, 9, "User Snippets")), picked: !profile?.useDefaultFlags?.snippets };
|
|
228
|
+
const tasks = { id: ProfileResourceType.Tasks, label: ( localizeWithPath(_moduleId, 10, "User Tasks")), picked: !profile?.useDefaultFlags?.tasks };
|
|
229
|
+
const extensions = { id: ProfileResourceType.Extensions, label: ( localizeWithPath(_moduleId, 11, "Extensions")), picked: !profile?.useDefaultFlags?.extensions };
|
|
224
230
|
const resources = [settings, keybindings, snippets, tasks, extensions];
|
|
225
231
|
const quickPick = this.quickInputService.createQuickPick();
|
|
226
232
|
quickPick.title = title;
|
|
@@ -328,7 +334,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
328
334
|
content: iconSelectBox.domNode,
|
|
329
335
|
target: profileIconElement,
|
|
330
336
|
position: {
|
|
331
|
-
hoverPosition:
|
|
337
|
+
hoverPosition: HoverPosition.BELOW,
|
|
332
338
|
},
|
|
333
339
|
persistence: {
|
|
334
340
|
sticky: true,
|
|
@@ -349,14 +355,14 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
349
355
|
}));
|
|
350
356
|
disposables.add(addDisposableListener(profileIconElement, EventType.KEY_DOWN, e => {
|
|
351
357
|
const event = ( (new StandardKeyboardEvent(e)));
|
|
352
|
-
if (event.equals(
|
|
358
|
+
if (event.equals(KeyCode.Enter) || event.equals(KeyCode.Space)) {
|
|
353
359
|
EventHelper.stop(event, true);
|
|
354
360
|
showIconSelectBox();
|
|
355
361
|
}
|
|
356
362
|
}));
|
|
357
363
|
disposables.add(addDisposableListener(iconSelectBox.domNode, EventType.KEY_DOWN, e => {
|
|
358
364
|
const event = ( (new StandardKeyboardEvent(e)));
|
|
359
|
-
if (event.equals(
|
|
365
|
+
if (event.equals(KeyCode.Escape)) {
|
|
360
366
|
EventHelper.stop(event, true);
|
|
361
367
|
hoverWidget?.dispose();
|
|
362
368
|
profileIconElement.focus();
|
|
@@ -477,12 +483,12 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
477
483
|
}
|
|
478
484
|
const disposables = ( (new DisposableStore()));
|
|
479
485
|
try {
|
|
480
|
-
const userDataProfilesExportState = disposables.add(this.instantiationService.createInstance(UserDataProfileExportState, this.userDataProfileService.currentProfile));
|
|
486
|
+
const userDataProfilesExportState = disposables.add(this.instantiationService.createInstance(UserDataProfileExportState, this.userDataProfileService.currentProfile, undefined));
|
|
481
487
|
const barrier = ( (new Barrier()));
|
|
482
488
|
const exportAction = ( (new BarrierAction(barrier, (new Action('export', ( localizeWithPath(_moduleId, 27, "Export")), undefined, true, async () => {
|
|
483
489
|
exportAction.enabled = false;
|
|
484
490
|
try {
|
|
485
|
-
await this.doExportProfile(userDataProfilesExportState);
|
|
491
|
+
await this.doExportProfile(userDataProfilesExportState, EXPORT_PROFILE_PREVIEW_VIEW);
|
|
486
492
|
}
|
|
487
493
|
catch (error) {
|
|
488
494
|
exportAction.enabled = true;
|
|
@@ -500,20 +506,32 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
500
506
|
disposables.dispose();
|
|
501
507
|
}
|
|
502
508
|
}
|
|
509
|
+
async exportProfile2(profile) {
|
|
510
|
+
const disposables = ( (new DisposableStore()));
|
|
511
|
+
try {
|
|
512
|
+
const userDataProfilesExportState = disposables.add(this.instantiationService.createInstance(UserDataProfileExportState, profile, undefined));
|
|
513
|
+
await this.doExportProfile(userDataProfilesExportState, ProgressLocation.Notification);
|
|
514
|
+
}
|
|
515
|
+
finally {
|
|
516
|
+
disposables.dispose();
|
|
517
|
+
}
|
|
518
|
+
}
|
|
503
519
|
async createFromProfile(profile, name, options) {
|
|
504
|
-
const userDataProfilesExportState = this.instantiationService.createInstance(UserDataProfileExportState, profile);
|
|
520
|
+
const userDataProfilesExportState = this.instantiationService.createInstance(UserDataProfileExportState, profile, options?.resourceTypeFlags);
|
|
505
521
|
try {
|
|
506
522
|
const profileTemplate = await userDataProfilesExportState.getProfileTemplate(name, options?.icon);
|
|
507
523
|
await this.progressService.withProgress({
|
|
508
|
-
location:
|
|
524
|
+
location: ProgressLocation.Notification,
|
|
509
525
|
delay: 500,
|
|
510
526
|
sticky: true,
|
|
511
527
|
}, async (progress) => {
|
|
512
528
|
const reportProgress = (message) => progress.report({ message: ( localizeWithPath(_moduleId, 29, "Create Profile: {0}", message)) });
|
|
513
529
|
const createdProfile = await this.doCreateProfile(profileTemplate, false, false, { useDefaultFlags: options?.useDefaultFlags, icon: options?.icon }, reportProgress);
|
|
514
530
|
if (createdProfile) {
|
|
515
|
-
|
|
516
|
-
|
|
531
|
+
if (options?.resourceTypeFlags?.extensions ?? true) {
|
|
532
|
+
reportProgress(( localizeWithPath(_moduleId, 30, "Applying Extensions...")));
|
|
533
|
+
await this.instantiationService.createInstance(ExtensionsResource).copy(profile, createdProfile, false);
|
|
534
|
+
}
|
|
517
535
|
reportProgress(( localizeWithPath(_moduleId, 31, "Switching Profile...")));
|
|
518
536
|
await this.userDataProfileManagementService.switchProfile(createdProfile);
|
|
519
537
|
}
|
|
@@ -524,11 +542,11 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
524
542
|
}
|
|
525
543
|
}
|
|
526
544
|
async createTroubleshootProfile() {
|
|
527
|
-
const userDataProfilesExportState = this.instantiationService.createInstance(UserDataProfileExportState, this.userDataProfileService.currentProfile);
|
|
545
|
+
const userDataProfilesExportState = this.instantiationService.createInstance(UserDataProfileExportState, this.userDataProfileService.currentProfile, undefined);
|
|
528
546
|
try {
|
|
529
547
|
const profileTemplate = await userDataProfilesExportState.getProfileTemplate(( localizeWithPath(_moduleId, 32, "Troubleshoot Issue")), undefined);
|
|
530
548
|
await this.progressService.withProgress({
|
|
531
|
-
location:
|
|
549
|
+
location: ProgressLocation.Notification,
|
|
532
550
|
delay: 1000,
|
|
533
551
|
sticky: true,
|
|
534
552
|
}, async (progress) => {
|
|
@@ -546,7 +564,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
546
564
|
userDataProfilesExportState.dispose();
|
|
547
565
|
}
|
|
548
566
|
}
|
|
549
|
-
async doExportProfile(userDataProfilesExportState) {
|
|
567
|
+
async doExportProfile(userDataProfilesExportState, location) {
|
|
550
568
|
const profile = await userDataProfilesExportState.getProfileToExport();
|
|
551
569
|
if (!profile) {
|
|
552
570
|
return;
|
|
@@ -556,7 +574,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
556
574
|
disposables.add(toDisposable(() => this.isProfileExportInProgressContextKey.set(false)));
|
|
557
575
|
try {
|
|
558
576
|
await this.progressService.withProgress({
|
|
559
|
-
location
|
|
577
|
+
location,
|
|
560
578
|
title: ( localizeWithPath(_moduleId, 34, "{0}: Exporting...", PROFILES_CATEGORY.value)),
|
|
561
579
|
}, async (progress) => {
|
|
562
580
|
const id = await this.pickProfileContentHandler(profile.name);
|
|
@@ -626,6 +644,24 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
626
644
|
if (options?.icon) {
|
|
627
645
|
profileTemplate.icon = options.icon;
|
|
628
646
|
}
|
|
647
|
+
if (options?.resourceTypeFlags?.settings === false) {
|
|
648
|
+
profileTemplate.settings = undefined;
|
|
649
|
+
}
|
|
650
|
+
if (options?.resourceTypeFlags?.keybindings === false) {
|
|
651
|
+
profileTemplate.keybindings = undefined;
|
|
652
|
+
}
|
|
653
|
+
if (options?.resourceTypeFlags?.snippets === false) {
|
|
654
|
+
profileTemplate.snippets = undefined;
|
|
655
|
+
}
|
|
656
|
+
if (options?.resourceTypeFlags?.tasks === false) {
|
|
657
|
+
profileTemplate.tasks = undefined;
|
|
658
|
+
}
|
|
659
|
+
if (options?.resourceTypeFlags?.globalState === false) {
|
|
660
|
+
profileTemplate.globalState = undefined;
|
|
661
|
+
}
|
|
662
|
+
if (options?.resourceTypeFlags?.extensions === false) {
|
|
663
|
+
profileTemplate.extensions = undefined;
|
|
664
|
+
}
|
|
629
665
|
return profileTemplate;
|
|
630
666
|
}
|
|
631
667
|
async importAndPreviewProfile(uri, profileTemplate, options) {
|
|
@@ -666,7 +702,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
666
702
|
group: 'inline',
|
|
667
703
|
when: ( (ContextKeyExpr.and(
|
|
668
704
|
(ContextKeyExpr.equals('view', IMPORT_PROFILE_PREVIEW_VIEW)),
|
|
669
|
-
(ContextKeyExpr.equals('viewItem',
|
|
705
|
+
(ContextKeyExpr.equals('viewItem', ProfileResourceType.Extensions))
|
|
670
706
|
))),
|
|
671
707
|
}
|
|
672
708
|
});
|
|
@@ -688,7 +724,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
688
724
|
const profileTemplate = await userDataProfileImportState.getProfileTemplateToImport();
|
|
689
725
|
if (profileTemplate.extensions) {
|
|
690
726
|
const profileExtensions = await that.instantiationService.createInstance(ExtensionsResource).getProfileExtensions(profileTemplate.extensions);
|
|
691
|
-
const installed = await this.extensionManagementService.getInstalled(
|
|
727
|
+
const installed = await this.extensionManagementService.getInstalled(ExtensionType.User);
|
|
692
728
|
if (profileExtensions.every(e => ( (installed.some(i => areSameExtensions(e.identifier, i.identifier)))))) {
|
|
693
729
|
disposable.dispose();
|
|
694
730
|
}
|
|
@@ -734,7 +770,7 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
734
770
|
}
|
|
735
771
|
async createAndSwitch(profileTemplate, temporaryProfile, extensions, options, title) {
|
|
736
772
|
return this.progressService.withProgress({
|
|
737
|
-
location:
|
|
773
|
+
location: ProgressLocation.Notification,
|
|
738
774
|
delay: 500,
|
|
739
775
|
sticky: true,
|
|
740
776
|
}, async (progress) => {
|
|
@@ -940,14 +976,14 @@ let UserDataProfileImportExportService = class UserDataProfileImportExportServic
|
|
|
940
976
|
await this.closeAllImportExportPreviewEditors();
|
|
941
977
|
}
|
|
942
978
|
async closeAllImportExportPreviewEditors() {
|
|
943
|
-
const editorsToColse = this.editorService.getEditors(
|
|
979
|
+
const editorsToColse = this.editorService.getEditors(EditorsOrder.SEQUENTIAL).filter(({ editor }) => editor.resource?.scheme === USER_DATA_PROFILE_EXPORT_SCHEME || editor.resource?.scheme === USER_DATA_PROFILE_EXPORT_PREVIEW_SCHEME || editor.resource?.scheme === USER_DATA_PROFILE_IMPORT_PREVIEW_SCHEME);
|
|
944
980
|
if (editorsToColse.length) {
|
|
945
981
|
await this.editorService.closeEditors(editorsToColse);
|
|
946
982
|
}
|
|
947
983
|
}
|
|
948
984
|
async setProfile(profile) {
|
|
949
985
|
await this.progressService.withProgress({
|
|
950
|
-
location:
|
|
986
|
+
location: ProgressLocation.Notification,
|
|
951
987
|
title: ( localizeWithPath(_moduleId, 56, "{0}: Applying...", PROFILES_CATEGORY.value)),
|
|
952
988
|
}, async (progress) => {
|
|
953
989
|
if (profile.settings) {
|
|
@@ -1260,9 +1296,10 @@ UserDataProfileImportExportState = ( (__decorate([
|
|
|
1260
1296
|
( (__param(0, IQuickInputService)))
|
|
1261
1297
|
], UserDataProfileImportExportState)));
|
|
1262
1298
|
let UserDataProfileExportState = class UserDataProfileExportState extends UserDataProfileImportExportState {
|
|
1263
|
-
constructor(profile, quickInputService, fileService, instantiationService) {
|
|
1299
|
+
constructor(profile, exportFlags, quickInputService, fileService, instantiationService) {
|
|
1264
1300
|
super(quickInputService);
|
|
1265
1301
|
this.profile = profile;
|
|
1302
|
+
this.exportFlags = exportFlags;
|
|
1266
1303
|
this.fileService = fileService;
|
|
1267
1304
|
this.instantiationService = instantiationService;
|
|
1268
1305
|
this.disposables = this._register(( (new DisposableStore())));
|
|
@@ -1274,44 +1311,56 @@ let UserDataProfileExportState = class UserDataProfileExportState extends UserDa
|
|
|
1274
1311
|
this.disposables.add(this.fileService.registerProvider(USER_DATA_PROFILE_EXPORT_PREVIEW_SCHEME, previewFileSystemProvider));
|
|
1275
1312
|
const roots = [];
|
|
1276
1313
|
const exportPreviewProfle = this.createExportPreviewProfile(this.profile);
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
if (
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
if (
|
|
1314
|
-
|
|
1314
|
+
if (this.exportFlags?.settings ?? true) {
|
|
1315
|
+
const settingsResource = this.instantiationService.createInstance(SettingsResource);
|
|
1316
|
+
const settingsContent = await settingsResource.getContent(this.profile);
|
|
1317
|
+
await settingsResource.apply(settingsContent, exportPreviewProfle);
|
|
1318
|
+
const settingsResourceTreeItem = this.instantiationService.createInstance(SettingsResourceTreeItem, exportPreviewProfle);
|
|
1319
|
+
if (await settingsResourceTreeItem.hasContent()) {
|
|
1320
|
+
roots.push(settingsResourceTreeItem);
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
if (this.exportFlags?.keybindings ?? true) {
|
|
1324
|
+
const keybindingsResource = this.instantiationService.createInstance(KeybindingsResource);
|
|
1325
|
+
const keybindingsContent = await keybindingsResource.getContent(this.profile);
|
|
1326
|
+
await keybindingsResource.apply(keybindingsContent, exportPreviewProfle);
|
|
1327
|
+
const keybindingsResourceTreeItem = this.instantiationService.createInstance(KeybindingsResourceTreeItem, exportPreviewProfle);
|
|
1328
|
+
if (await keybindingsResourceTreeItem.hasContent()) {
|
|
1329
|
+
roots.push(keybindingsResourceTreeItem);
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
if (this.exportFlags?.snippets ?? true) {
|
|
1333
|
+
const snippetsResource = this.instantiationService.createInstance(SnippetsResource);
|
|
1334
|
+
const snippetsContent = await snippetsResource.getContent(this.profile);
|
|
1335
|
+
await snippetsResource.apply(snippetsContent, exportPreviewProfle);
|
|
1336
|
+
const snippetsResourceTreeItem = this.instantiationService.createInstance(SnippetsResourceTreeItem, exportPreviewProfle);
|
|
1337
|
+
if (await snippetsResourceTreeItem.hasContent()) {
|
|
1338
|
+
roots.push(snippetsResourceTreeItem);
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
if (this.exportFlags?.tasks ?? true) {
|
|
1342
|
+
const tasksResource = this.instantiationService.createInstance(TasksResource);
|
|
1343
|
+
const tasksContent = await tasksResource.getContent(this.profile);
|
|
1344
|
+
await tasksResource.apply(tasksContent, exportPreviewProfle);
|
|
1345
|
+
const tasksResourceTreeItem = this.instantiationService.createInstance(TasksResourceTreeItem, exportPreviewProfle);
|
|
1346
|
+
if (await tasksResourceTreeItem.hasContent()) {
|
|
1347
|
+
roots.push(tasksResourceTreeItem);
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
if (this.exportFlags?.globalState ?? true) {
|
|
1351
|
+
const globalStateResource = joinPath(exportPreviewProfle.globalStorageHome, 'globalState.json').with({ scheme: USER_DATA_PROFILE_EXPORT_PREVIEW_SCHEME });
|
|
1352
|
+
const globalStateResourceTreeItem = this.instantiationService.createInstance(GlobalStateResourceExportTreeItem, exportPreviewProfle, globalStateResource);
|
|
1353
|
+
const content = await globalStateResourceTreeItem.getContent();
|
|
1354
|
+
if (content) {
|
|
1355
|
+
await this.fileService.writeFile(globalStateResource, VSBuffer.fromString(JSON.stringify(JSON.parse(content), null, '\t')));
|
|
1356
|
+
roots.push(globalStateResourceTreeItem);
|
|
1357
|
+
}
|
|
1358
|
+
}
|
|
1359
|
+
if (this.exportFlags?.extensions ?? true) {
|
|
1360
|
+
const extensionsResourceTreeItem = this.instantiationService.createInstance(ExtensionsResourceExportTreeItem, exportPreviewProfle);
|
|
1361
|
+
if (await extensionsResourceTreeItem.hasContent()) {
|
|
1362
|
+
roots.push(extensionsResourceTreeItem);
|
|
1363
|
+
}
|
|
1315
1364
|
}
|
|
1316
1365
|
previewFileSystemProvider.setReadOnly(true);
|
|
1317
1366
|
return roots;
|
|
@@ -1356,9 +1405,9 @@ let UserDataProfileExportState = class UserDataProfileExportState extends UserDa
|
|
|
1356
1405
|
}
|
|
1357
1406
|
};
|
|
1358
1407
|
UserDataProfileExportState = ( (__decorate([
|
|
1359
|
-
( (__param(
|
|
1360
|
-
( (__param(
|
|
1361
|
-
( (__param(
|
|
1408
|
+
( (__param(2, IQuickInputService))),
|
|
1409
|
+
( (__param(3, IFileService))),
|
|
1410
|
+
( (__param(4, IInstantiationService)))
|
|
1362
1411
|
], UserDataProfileExportState)));
|
|
1363
1412
|
let UserDataProfileImportState = class UserDataProfileImportState extends UserDataProfileImportExportState {
|
|
1364
1413
|
constructor(profile, fileService, quickInputService, instantiationService) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
|
+
import { StorageScope } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
2
3
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
3
4
|
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
|
|
4
5
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
@@ -17,6 +18,7 @@ import { asJson } from 'vscode/vscode/vs/platform/request/common/request';
|
|
|
17
18
|
import { IRequestService } from 'vscode/vscode/vs/platform/request/common/request.service';
|
|
18
19
|
import { CancellationToken } from 'vscode/vscode/vs/base/common/cancellation';
|
|
19
20
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
21
|
+
import { ProfileResourceType } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfile';
|
|
20
22
|
|
|
21
23
|
let UserDataProfileInitializer = class UserDataProfileInitializer {
|
|
22
24
|
constructor(environmentService, fileService, userDataProfileService, storageService, logService, uriIdentityService, requestService) {
|
|
@@ -37,7 +39,7 @@ let UserDataProfileInitializer = class UserDataProfileInitializer {
|
|
|
37
39
|
if (!this.environmentService.options?.profile?.contents) {
|
|
38
40
|
return false;
|
|
39
41
|
}
|
|
40
|
-
if (!this.storageService.isNew(
|
|
42
|
+
if (!this.storageService.isNew(StorageScope.PROFILE)) {
|
|
41
43
|
return false;
|
|
42
44
|
}
|
|
43
45
|
return true;
|
|
@@ -47,10 +49,10 @@ let UserDataProfileInitializer = class UserDataProfileInitializer {
|
|
|
47
49
|
const promises = [];
|
|
48
50
|
const profileTemplate = await this.getProfileTemplate();
|
|
49
51
|
if (profileTemplate?.settings) {
|
|
50
|
-
promises.push(this.initialize(( new SettingsResourceInitializer(this.userDataProfileService, this.fileService, this.logService)), profileTemplate.settings,
|
|
52
|
+
promises.push(this.initialize(( new SettingsResourceInitializer(this.userDataProfileService, this.fileService, this.logService)), profileTemplate.settings, ProfileResourceType.Settings));
|
|
51
53
|
}
|
|
52
54
|
if (profileTemplate?.globalState) {
|
|
53
|
-
promises.push(this.initialize(( new GlobalStateResourceInitializer(this.storageService)), profileTemplate.globalState,
|
|
55
|
+
promises.push(this.initialize(( new GlobalStateResourceInitializer(this.storageService)), profileTemplate.globalState, ProfileResourceType.GlobalState));
|
|
54
56
|
}
|
|
55
57
|
await Promise.all(promises);
|
|
56
58
|
}
|
|
@@ -60,13 +62,13 @@ let UserDataProfileInitializer = class UserDataProfileInitializer {
|
|
|
60
62
|
const promises = [];
|
|
61
63
|
const profileTemplate = await this.getProfileTemplate();
|
|
62
64
|
if (profileTemplate?.keybindings) {
|
|
63
|
-
promises.push(this.initialize(( new KeybindingsResourceInitializer(this.userDataProfileService, this.fileService, this.logService)), profileTemplate.keybindings,
|
|
65
|
+
promises.push(this.initialize(( new KeybindingsResourceInitializer(this.userDataProfileService, this.fileService, this.logService)), profileTemplate.keybindings, ProfileResourceType.Keybindings));
|
|
64
66
|
}
|
|
65
67
|
if (profileTemplate?.tasks) {
|
|
66
|
-
promises.push(this.initialize(( new TasksResourceInitializer(this.userDataProfileService, this.fileService, this.logService)), profileTemplate.tasks,
|
|
68
|
+
promises.push(this.initialize(( new TasksResourceInitializer(this.userDataProfileService, this.fileService, this.logService)), profileTemplate.tasks, ProfileResourceType.Tasks));
|
|
67
69
|
}
|
|
68
70
|
if (profileTemplate?.snippets) {
|
|
69
|
-
promises.push(this.initialize(( new SnippetsResourceInitializer(this.userDataProfileService, this.fileService, this.uriIdentityService)), profileTemplate.snippets,
|
|
71
|
+
promises.push(this.initialize(( new SnippetsResourceInitializer(this.userDataProfileService, this.fileService, this.uriIdentityService)), profileTemplate.snippets, ProfileResourceType.Snippets));
|
|
70
72
|
}
|
|
71
73
|
promises.push(this.initializeInstalledExtensions(instantiationService));
|
|
72
74
|
await Promises.settled(promises);
|
|
@@ -79,7 +81,7 @@ let UserDataProfileInitializer = class UserDataProfileInitializer {
|
|
|
79
81
|
if (!this.initializeInstalledExtensionsPromise) {
|
|
80
82
|
const profileTemplate = await this.getProfileTemplate();
|
|
81
83
|
if (profileTemplate?.extensions) {
|
|
82
|
-
this.initializeInstalledExtensionsPromise = this.initialize(instantiationService.createInstance(ExtensionsResourceInitializer), profileTemplate.extensions,
|
|
84
|
+
this.initializeInstalledExtensionsPromise = this.initialize(instantiationService.createInstance(ExtensionsResourceInitializer), profileTemplate.extensions, ProfileResourceType.Extensions);
|
|
83
85
|
}
|
|
84
86
|
else {
|
|
85
87
|
this.initializeInstalledExtensionsPromise = Promise.resolve();
|
package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.js
CHANGED
|
@@ -5,6 +5,7 @@ import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
|
5
5
|
import { equals } from 'vscode/vscode/vs/base/common/objects';
|
|
6
6
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
7
7
|
import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
8
|
+
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
8
9
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
9
10
|
import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService.service';
|
|
10
11
|
import { asJson } from 'vscode/vscode/vs/platform/request/common/request';
|