@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 './media/userDataProfilesEditor.css.js';
|
|
3
4
|
import { append, $, Dimension, trackFocus, addDisposableListener, EventType, EventHelper, clearNode } from 'vscode/vscode/vs/base/browser/dom';
|
|
4
5
|
import { SubmenuAction, Separator, Action } from 'vscode/vscode/vs/base/common/actions';
|
|
@@ -10,10 +11,11 @@ import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/c
|
|
|
10
11
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
11
12
|
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
12
13
|
import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService.service';
|
|
14
|
+
import { ProfileResourceType } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfile';
|
|
13
15
|
import { IUserDataProfilesService } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfile.service';
|
|
14
|
-
import { EditorPane } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorPane';
|
|
16
|
+
import { EditorPane } from '@codingame/monaco-vscode-9e888134-1a6f-58d9-b0e6-0fc047448366-common/vscode/vs/workbench/browser/parts/editor/editorPane';
|
|
15
17
|
import { EditorInput } from 'vscode/vscode/vs/workbench/common/editor/editorInput';
|
|
16
|
-
import { PROFILE_FILTER, defaultUserDataProfileIcon } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile';
|
|
18
|
+
import { PROFILE_FILTER, defaultUserDataProfileIcon } from '@codingame/monaco-vscode-e72c94ca-257a-5b75-8b68-5a5fa3c18255-common/vscode/vs/workbench/services/userDataProfile/common/userDataProfile';
|
|
17
19
|
import { IUserDataProfileService, IUserDataProfileManagementService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
|
|
18
20
|
import { SplitView, Sizing } from 'vscode/vscode/vs/base/browser/ui/splitview/splitview';
|
|
19
21
|
import { ButtonWithDropdown, Button, ButtonBar } from 'vscode/vscode/vs/base/browser/ui/button/button';
|
|
@@ -33,20 +35,22 @@ import { PANEL_BORDER } from 'vscode/vscode/vs/workbench/common/theme';
|
|
|
33
35
|
import { WorkbenchList, WorkbenchAsyncDataTree, WorkbenchTable } from 'vscode/vscode/vs/platform/list/browser/listService';
|
|
34
36
|
import { CachedListVirtualDelegate } from 'vscode/vscode/vs/base/browser/ui/list/list';
|
|
35
37
|
import { DisposableStore, Disposable, MutableDisposable, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
36
|
-
import { InputBox } from 'vscode/vscode/vs/base/browser/ui/inputbox/inputBox';
|
|
38
|
+
import { InputBox, MessageType } from 'vscode/vscode/vs/base/browser/ui/inputbox/inputBox';
|
|
37
39
|
import { Checkbox } from 'vscode/vscode/vs/base/browser/ui/toggle/toggle';
|
|
38
|
-
import { DEFAULT_ICON, ICONS } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfileIcons';
|
|
39
|
-
import { WorkbenchIconSelectBox } from 'vscode/vscode/vs/workbench/services/userDataProfile/browser/iconSelectBox';
|
|
40
|
+
import { DEFAULT_ICON, ICONS } from '@codingame/monaco-vscode-d8236b3b-b91a-522d-89f4-94d70a546f6a-common/vscode/vs/workbench/services/userDataProfile/common/userDataProfileIcons';
|
|
41
|
+
import { WorkbenchIconSelectBox } from '@codingame/monaco-vscode-f405f7ba-995b-5117-bc17-5bc7f77d92e9-common/vscode/vs/workbench/services/userDataProfile/browser/iconSelectBox';
|
|
40
42
|
import { StandardKeyboardEvent } from 'vscode/vscode/vs/base/browser/keyboardEvent';
|
|
43
|
+
import { KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
41
44
|
import { WorkbenchHoverDelegate } from 'vscode/vscode/vs/platform/hover/browser/hover';
|
|
42
45
|
import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover.service';
|
|
46
|
+
import { HoverPosition } from 'vscode/vscode/vs/base/browser/ui/hover/hoverWidget';
|
|
43
47
|
import { SelectBox } from 'vscode/vscode/vs/base/browser/ui/selectBox/selectBox';
|
|
44
48
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
45
49
|
import { IEditorProgressService } from 'vscode/vscode/vs/platform/progress/common/progress.service';
|
|
46
50
|
import { isUndefined, isString } from 'vscode/vscode/vs/base/common/types';
|
|
47
51
|
import { basename } from 'vscode/vscode/vs/base/common/resources';
|
|
48
52
|
import { RenderIndentGuides } from 'vscode/vscode/vs/base/browser/ui/tree/abstractTree';
|
|
49
|
-
import { ResourceLabels, DEFAULT_LABELS_CONTAINER } from 'vscode/vscode/vs/workbench/browser/labels';
|
|
53
|
+
import { ResourceLabels, DEFAULT_LABELS_CONTAINER } from '@codingame/monaco-vscode-9e888134-1a6f-58d9-b0e6-0fc047448366-common/vscode/vs/workbench/browser/labels';
|
|
50
54
|
import { IFileDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
51
55
|
import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
52
56
|
import { UserDataProfileElement, AbstractUserDataProfileElement, NewProfileElement, isProfileResourceTypeElement, isProfileResourceChildElement, UserDataProfilesEditorModel } from './userDataProfilesEditorModel.js';
|
|
@@ -55,7 +59,7 @@ import { createInstantHoverDelegate, getDefaultHoverDelegate } from 'vscode/vsco
|
|
|
55
59
|
import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
|
|
56
60
|
import { Radio } from '../../../../base/browser/ui/radio/radio.js';
|
|
57
61
|
import { MarkdownString } from 'vscode/vscode/vs/base/common/htmlContent';
|
|
58
|
-
import { settingsTextInputBorder } from 'vscode/vscode/vs/workbench/contrib/preferences/common/settingsEditorColorRegistry';
|
|
62
|
+
import { settingsTextInputBorder } from '@codingame/monaco-vscode-e72c94ca-257a-5b75-8b68-5a5fa3c18255-common/vscode/vs/workbench/contrib/preferences/common/settingsEditorColorRegistry';
|
|
59
63
|
import { renderMarkdown } from 'vscode/vscode/vs/base/browser/markdownRenderer';
|
|
60
64
|
import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
61
65
|
import { ILabelService } from 'vscode/vscode/vs/platform/label/common/label.service';
|
|
@@ -66,11 +70,12 @@ import { normalizeDriveLetter } from 'vscode/vscode/vs/base/common/labels';
|
|
|
66
70
|
import { ActionBar } from 'vscode/vscode/vs/base/browser/ui/actionbar/actionbar';
|
|
67
71
|
import { registerIcon } from 'vscode/vscode/vs/platform/theme/common/iconRegistry';
|
|
68
72
|
import { DropdownMenuActionViewItem } from 'vscode/vscode/vs/base/browser/ui/dropdown/dropdownActionViewItem';
|
|
73
|
+
import { Orientation } from 'vscode/vscode/vs/base/browser/ui/sash/sash';
|
|
69
74
|
|
|
70
75
|
var UserDataProfilesEditor_1, ExistingProfileResourceTreeRenderer_1, NewProfileResourceTreeRenderer_1, ProfileResourceChildTreeItemRenderer_1, WorkspaceUriHostColumnRenderer_1, WorkspaceUriPathColumnRenderer_1, WorkspaceUriActionsColumnRenderer_1, UserDataProfilesEditorInput_1;
|
|
71
|
-
const editIcon = registerIcon('profiles-editor-edit-folder', Codicon.edit, ( localize(
|
|
72
|
-
const removeIcon = registerIcon('profiles-editor-remove-folder', Codicon.close, ( localize(
|
|
73
|
-
const profilesSashBorder = registerColor('profiles.sashBorder', PANEL_BORDER, ( localize(
|
|
76
|
+
const editIcon = registerIcon('profiles-editor-edit-folder', Codicon.edit, ( localize(10503, 'Icon for the edit folder icon in the profiles editor.')));
|
|
77
|
+
const removeIcon = registerIcon('profiles-editor-remove-folder', Codicon.close, ( localize(10504, 'Icon for the remove folder icon in the profiles editor.')));
|
|
78
|
+
const profilesSashBorder = registerColor('profiles.sashBorder', PANEL_BORDER, ( localize(10505, "The color of the Profiles editor splitview sash border.")));
|
|
74
79
|
const listStyles = getListStyles({
|
|
75
80
|
listActiveSelectionBackground: editorBackground,
|
|
76
81
|
listActiveSelectionForeground: foreground,
|
|
@@ -115,10 +120,10 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
115
120
|
const contentsView = append(this.container, $('.contents-view'));
|
|
116
121
|
const contentsContainer = append(contentsView, $('.contents-container'));
|
|
117
122
|
this.profileWidget = this._register(this.instantiationService.createInstance(ProfileWidget, contentsContainer));
|
|
118
|
-
this.splitView = (
|
|
119
|
-
orientation:
|
|
123
|
+
this.splitView = ( new SplitView(this.container, {
|
|
124
|
+
orientation: Orientation.HORIZONTAL,
|
|
120
125
|
proportionalLayout: true
|
|
121
|
-
}))
|
|
126
|
+
}));
|
|
122
127
|
this.renderSidebar(sidebarContainer);
|
|
123
128
|
this.splitView.addView({
|
|
124
129
|
onDidChange: Event.None,
|
|
@@ -142,7 +147,7 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
142
147
|
layout: (width, _, height) => {
|
|
143
148
|
contentsView.style.width = `${width}px`;
|
|
144
149
|
if (height) {
|
|
145
|
-
this.profileWidget?.layout((
|
|
150
|
+
this.profileWidget?.layout(( new Dimension(width, height)));
|
|
146
151
|
}
|
|
147
152
|
}
|
|
148
153
|
}, Sizing.Distribute, undefined, true);
|
|
@@ -156,7 +161,7 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
156
161
|
renderSidebar(parent) {
|
|
157
162
|
this.renderNewProfileButton(append(parent, $('.new-profile-button')));
|
|
158
163
|
const renderer = this.instantiationService.createInstance(ProfileElementRenderer);
|
|
159
|
-
const delegate = (
|
|
164
|
+
const delegate = ( new ProfileElementDelegate());
|
|
160
165
|
this.profilesList = this._register(this.instantiationService.createInstance((WorkbenchList), 'ProfilesList', append(parent, $('.profiles-list')), delegate, [renderer], {
|
|
161
166
|
multipleSelectionSupport: false,
|
|
162
167
|
setRowLineHeight: false,
|
|
@@ -166,7 +171,7 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
166
171
|
return profileElement?.name ?? '';
|
|
167
172
|
},
|
|
168
173
|
getWidgetAriaLabel() {
|
|
169
|
-
return
|
|
174
|
+
return localize(10506, "Profiles");
|
|
170
175
|
}
|
|
171
176
|
},
|
|
172
177
|
openOnSingleClick: true,
|
|
@@ -182,15 +187,15 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
182
187
|
}));
|
|
183
188
|
}
|
|
184
189
|
renderNewProfileButton(parent) {
|
|
185
|
-
const button = this._register((
|
|
190
|
+
const button = this._register(( new ButtonWithDropdown(parent, {
|
|
186
191
|
actions: {
|
|
187
192
|
getActions: () => {
|
|
188
193
|
const actions = [];
|
|
189
194
|
if (this.templates.length) {
|
|
190
|
-
actions.push((
|
|
191
|
-
actions.push((
|
|
195
|
+
actions.push(( new SubmenuAction('from.template', ( localize(10507, "From Template")), this.getCreateFromTemplateActions())));
|
|
196
|
+
actions.push(( new Separator()));
|
|
192
197
|
}
|
|
193
|
-
actions.push((
|
|
198
|
+
actions.push(( new Action('importProfile', ( localize(10508, "Import Profile...")), undefined, true, () => this.importProfile())));
|
|
194
199
|
return actions;
|
|
195
200
|
}
|
|
196
201
|
},
|
|
@@ -198,20 +203,18 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
198
203
|
contextMenuProvider: this.contextMenuService,
|
|
199
204
|
supportIcons: true,
|
|
200
205
|
...defaultButtonStyles
|
|
201
|
-
})))
|
|
202
|
-
button.label = ( localize(
|
|
206
|
+
})));
|
|
207
|
+
button.label = ( localize(10509, "New Profile"));
|
|
203
208
|
this._register(button.onDidClick(e => this.createNewProfile()));
|
|
204
209
|
}
|
|
205
210
|
getCreateFromTemplateActions() {
|
|
206
|
-
return (
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
)))))
|
|
214
|
-
);
|
|
211
|
+
return ( this.templates.map(template => ( new Action(
|
|
212
|
+
`template:${template.url}`,
|
|
213
|
+
template.name,
|
|
214
|
+
undefined,
|
|
215
|
+
true,
|
|
216
|
+
() => this.createNewProfile(( URI.parse(template.url)))
|
|
217
|
+
))));
|
|
215
218
|
}
|
|
216
219
|
registerListeners() {
|
|
217
220
|
if (this.profilesList) {
|
|
@@ -246,28 +249,28 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
246
249
|
}
|
|
247
250
|
getTreeContextMenuActions() {
|
|
248
251
|
const actions = [];
|
|
249
|
-
actions.push((
|
|
252
|
+
actions.push(( new Action('newProfile', ( localize(10509, "New Profile")), undefined, true, () => this.createNewProfile())));
|
|
250
253
|
const templateActions = this.getCreateFromTemplateActions();
|
|
251
254
|
if (templateActions.length) {
|
|
252
|
-
actions.push((
|
|
255
|
+
actions.push(( new SubmenuAction('from.template', ( localize(10510, "New Profile From Template")), templateActions)));
|
|
253
256
|
}
|
|
254
|
-
actions.push((
|
|
255
|
-
actions.push((
|
|
257
|
+
actions.push(( new Separator()));
|
|
258
|
+
actions.push(( new Action('importProfile', ( localize(10508, "Import Profile...")), undefined, true, () => this.importProfile())));
|
|
256
259
|
return actions;
|
|
257
260
|
}
|
|
258
261
|
async importProfile() {
|
|
259
|
-
const disposables = (
|
|
262
|
+
const disposables = ( new DisposableStore());
|
|
260
263
|
const quickPick = disposables.add(this.quickInputService.createQuickPick());
|
|
261
264
|
const updateQuickPickItems = (value) => {
|
|
262
265
|
const quickPickItems = [];
|
|
263
266
|
if (value) {
|
|
264
|
-
quickPickItems.push({ label: quickPick.value, description: ( localize(
|
|
267
|
+
quickPickItems.push({ label: quickPick.value, description: ( localize(10511, "Import from URL")) });
|
|
265
268
|
}
|
|
266
|
-
quickPickItems.push({ label: ( localize(
|
|
269
|
+
quickPickItems.push({ label: ( localize(10512, "Select File...")) });
|
|
267
270
|
quickPick.items = quickPickItems;
|
|
268
271
|
};
|
|
269
|
-
quickPick.title = ( localize(
|
|
270
|
-
quickPick.placeholder = ( localize(
|
|
272
|
+
quickPick.title = ( localize(10513, "Import from Profile Template..."));
|
|
273
|
+
quickPick.placeholder = ( localize(10514, "Provide Profile Template URL"));
|
|
271
274
|
quickPick.ignoreFocusOut = true;
|
|
272
275
|
disposables.add(quickPick.onDidChangeValue(updateQuickPickItems));
|
|
273
276
|
updateQuickPickItems();
|
|
@@ -279,7 +282,7 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
279
282
|
if (!selectedItem) {
|
|
280
283
|
return;
|
|
281
284
|
}
|
|
282
|
-
const url = selectedItem.label === quickPick.value ? (
|
|
285
|
+
const url = selectedItem.label === quickPick.value ? ( URI.parse(quickPick.value)) : await this.getProfileUriFromFileSystem();
|
|
283
286
|
if (url) {
|
|
284
287
|
this.createNewProfile(url);
|
|
285
288
|
}
|
|
@@ -302,7 +305,7 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
302
305
|
canSelectFiles: true,
|
|
303
306
|
canSelectMany: false,
|
|
304
307
|
filters: PROFILE_FILTER,
|
|
305
|
-
title: ( localize(
|
|
308
|
+
title: ( localize(10515, "Select Profile Template File")),
|
|
306
309
|
});
|
|
307
310
|
if (!profileLocation) {
|
|
308
311
|
return null;
|
|
@@ -351,15 +354,15 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
351
354
|
}
|
|
352
355
|
}
|
|
353
356
|
};
|
|
354
|
-
UserDataProfilesEditor = UserDataProfilesEditor_1 = (
|
|
355
|
-
(
|
|
356
|
-
(
|
|
357
|
-
(
|
|
358
|
-
(
|
|
359
|
-
(
|
|
360
|
-
(
|
|
361
|
-
(
|
|
362
|
-
], UserDataProfilesEditor))
|
|
357
|
+
UserDataProfilesEditor = UserDataProfilesEditor_1 = ( __decorate([
|
|
358
|
+
( __param(1, ITelemetryService)),
|
|
359
|
+
( __param(2, IThemeService)),
|
|
360
|
+
( __param(3, IStorageService)),
|
|
361
|
+
( __param(4, IQuickInputService)),
|
|
362
|
+
( __param(5, IFileDialogService)),
|
|
363
|
+
( __param(6, IContextMenuService)),
|
|
364
|
+
( __param(7, IInstantiationService))
|
|
365
|
+
], UserDataProfilesEditor));
|
|
363
366
|
class ProfileElementDelegate {
|
|
364
367
|
getHeight(element) {
|
|
365
368
|
return 22;
|
|
@@ -372,14 +375,14 @@ let ProfileElementRenderer = class ProfileElementRenderer {
|
|
|
372
375
|
this.templateId = 'profileListElement';
|
|
373
376
|
}
|
|
374
377
|
renderTemplate(container) {
|
|
375
|
-
const disposables = (
|
|
376
|
-
const elementDisposables = (
|
|
378
|
+
const disposables = ( new DisposableStore());
|
|
379
|
+
const elementDisposables = ( new DisposableStore());
|
|
377
380
|
container.classList.add('profile-list-item');
|
|
378
381
|
const icon = append(container, $('.profile-list-item-icon'));
|
|
379
382
|
const label = append(container, $('.profile-list-item-label'));
|
|
380
383
|
const dirty = append(container, $(`span${ThemeIcon.asCSSSelector(Codicon.circleFilled)}`));
|
|
381
384
|
const description = append(container, $('.profile-list-item-description'));
|
|
382
|
-
append(description, $(`span${ThemeIcon.asCSSSelector(Codicon.check)}`), $('span', undefined, ( localize(
|
|
385
|
+
append(description, $(`span${ThemeIcon.asCSSSelector(Codicon.check)}`), $('span', undefined, ( localize(10516, "Active"))));
|
|
383
386
|
const actionsContainer = append(container, $('.profile-tree-item-actions-container'));
|
|
384
387
|
const actionBar = disposables.add(this.instantiationService.createInstance(WorkbenchToolBar, actionsContainer, {
|
|
385
388
|
hoverDelegate: disposables.add(createInstantHoverDelegate()),
|
|
@@ -432,9 +435,9 @@ let ProfileElementRenderer = class ProfileElementRenderer {
|
|
|
432
435
|
templateData.elementDisposables.dispose();
|
|
433
436
|
}
|
|
434
437
|
};
|
|
435
|
-
ProfileElementRenderer = (
|
|
436
|
-
(
|
|
437
|
-
], ProfileElementRenderer))
|
|
438
|
+
ProfileElementRenderer = ( __decorate([
|
|
439
|
+
( __param(0, IInstantiationService))
|
|
440
|
+
], ProfileElementRenderer));
|
|
438
441
|
let ProfileWidget = class ProfileWidget extends Disposable {
|
|
439
442
|
set templates(templates) {
|
|
440
443
|
this.copyFromProfileRenderer.setTemplates(templates);
|
|
@@ -444,13 +447,13 @@ let ProfileWidget = class ProfileWidget extends Disposable {
|
|
|
444
447
|
super();
|
|
445
448
|
this.editorProgressService = editorProgressService;
|
|
446
449
|
this.instantiationService = instantiationService;
|
|
447
|
-
this._profileElement = this._register((
|
|
450
|
+
this._profileElement = this._register(( new MutableDisposable()));
|
|
448
451
|
this.layoutParticipants = [];
|
|
449
452
|
const header = append(parent, $('.profile-header'));
|
|
450
453
|
const title = append(header, $('.profile-title-container'));
|
|
451
454
|
this.profileTitle = append(title, $(''));
|
|
452
455
|
const body = append(parent, $('.profile-body'));
|
|
453
|
-
const delegate = (
|
|
456
|
+
const delegate = ( new ProfileTreeDelegate());
|
|
454
457
|
const contentsRenderer = this._register(this.instantiationService.createInstance(ContentsProfileRenderer));
|
|
455
458
|
const associationsRenderer = this._register(this.instantiationService.createInstance(ProfileWorkspacesRenderer));
|
|
456
459
|
this.layoutParticipants.push(associationsRenderer);
|
|
@@ -527,7 +530,7 @@ let ProfileWidget = class ProfileWidget extends Disposable {
|
|
|
527
530
|
this._profileElement.value.element.reset();
|
|
528
531
|
}
|
|
529
532
|
this.profileTree.setInput(profileElement);
|
|
530
|
-
const disposables = (
|
|
533
|
+
const disposables = ( new DisposableStore());
|
|
531
534
|
this._profileElement.value = { element: profileElement, dispose: () => disposables.dispose() };
|
|
532
535
|
this.profileTitle.textContent = profileElement.name;
|
|
533
536
|
disposables.add(profileElement.onDidChange(e => {
|
|
@@ -540,10 +543,10 @@ let ProfileWidget = class ProfileWidget extends Disposable {
|
|
|
540
543
|
this.buttonContainer.classList.remove('hide');
|
|
541
544
|
if (secondatyTitleButtons?.length) {
|
|
542
545
|
for (const action of secondatyTitleButtons) {
|
|
543
|
-
const button = disposables.add((
|
|
546
|
+
const button = disposables.add(( new Button(this.buttonContainer, {
|
|
544
547
|
...defaultButtonStyles,
|
|
545
548
|
secondary: true
|
|
546
|
-
})))
|
|
549
|
+
})));
|
|
547
550
|
button.label = action.label;
|
|
548
551
|
button.enabled = action.enabled;
|
|
549
552
|
disposables.add(button.onDidClick(() => this.editorProgressService.showWhile(action.run())));
|
|
@@ -559,9 +562,9 @@ let ProfileWidget = class ProfileWidget extends Disposable {
|
|
|
559
562
|
}
|
|
560
563
|
if (primaryTitleButtons?.length) {
|
|
561
564
|
for (const action of primaryTitleButtons) {
|
|
562
|
-
const button = disposables.add((
|
|
565
|
+
const button = disposables.add(( new Button(this.buttonContainer, {
|
|
563
566
|
...defaultButtonStyles
|
|
564
|
-
})))
|
|
567
|
+
})));
|
|
565
568
|
button.label = action.label;
|
|
566
569
|
button.enabled = action.enabled;
|
|
567
570
|
disposables.add(button.onDidClick(() => this.editorProgressService.showWhile(action.run())));
|
|
@@ -593,10 +596,10 @@ let ProfileWidget = class ProfileWidget extends Disposable {
|
|
|
593
596
|
}
|
|
594
597
|
}
|
|
595
598
|
};
|
|
596
|
-
ProfileWidget = (
|
|
597
|
-
(
|
|
598
|
-
(
|
|
599
|
-
], ProfileWidget))
|
|
599
|
+
ProfileWidget = ( __decorate([
|
|
600
|
+
( __param(1, IEditorProgressService)),
|
|
601
|
+
( __param(2, IInstantiationService))
|
|
602
|
+
], ProfileWidget));
|
|
600
603
|
class ProfileTreeDelegate extends CachedListVirtualDelegate {
|
|
601
604
|
getTemplateId({ element }) {
|
|
602
605
|
return element;
|
|
@@ -672,7 +675,7 @@ let ProfileResourceTreeDataSource = class ProfileResourceTreeDataSource {
|
|
|
672
675
|
return true;
|
|
673
676
|
}
|
|
674
677
|
if (element.element.resourceType) {
|
|
675
|
-
if (element.element.resourceType !==
|
|
678
|
+
if (element.element.resourceType !== ProfileResourceType.Extensions && element.element.resourceType !== ProfileResourceType.Snippets) {
|
|
676
679
|
return false;
|
|
677
680
|
}
|
|
678
681
|
if (element.root instanceof NewProfileElement) {
|
|
@@ -697,17 +700,13 @@ let ProfileResourceTreeDataSource = class ProfileResourceTreeDataSource {
|
|
|
697
700
|
async getChildren(element) {
|
|
698
701
|
if (element instanceof AbstractUserDataProfileElement) {
|
|
699
702
|
const children = await element.getChildren();
|
|
700
|
-
return (
|
|
701
|
-
(children.map(e => ({ element: e, root: element })))
|
|
702
|
-
);
|
|
703
|
+
return ( children.map(e => ({ element: e, root: element })));
|
|
703
704
|
}
|
|
704
705
|
if (element.element.resourceType) {
|
|
705
706
|
const progressRunner = this.editorProgressService.show(true, 500);
|
|
706
707
|
try {
|
|
707
708
|
const extensions = await element.root.getChildren(element.element.resourceType);
|
|
708
|
-
return (
|
|
709
|
-
(extensions.map(e => ({ element: e, root: element.root })))
|
|
710
|
-
);
|
|
709
|
+
return ( extensions.map(e => ({ element: e, root: element.root })));
|
|
711
710
|
}
|
|
712
711
|
finally {
|
|
713
712
|
progressRunner.done();
|
|
@@ -716,22 +715,22 @@ let ProfileResourceTreeDataSource = class ProfileResourceTreeDataSource {
|
|
|
716
715
|
return [];
|
|
717
716
|
}
|
|
718
717
|
};
|
|
719
|
-
ProfileResourceTreeDataSource = (
|
|
720
|
-
(
|
|
721
|
-
], ProfileResourceTreeDataSource))
|
|
718
|
+
ProfileResourceTreeDataSource = ( __decorate([
|
|
719
|
+
( __param(0, IEditorProgressService))
|
|
720
|
+
], ProfileResourceTreeDataSource));
|
|
722
721
|
class AbstractProfileResourceTreeRenderer extends Disposable {
|
|
723
722
|
getResourceTypeTitle(resourceType) {
|
|
724
723
|
switch (resourceType) {
|
|
725
|
-
case
|
|
726
|
-
return
|
|
727
|
-
case
|
|
728
|
-
return
|
|
729
|
-
case
|
|
730
|
-
return
|
|
731
|
-
case
|
|
732
|
-
return
|
|
733
|
-
case
|
|
734
|
-
return
|
|
724
|
+
case ProfileResourceType.Settings:
|
|
725
|
+
return localize(10517, "Settings");
|
|
726
|
+
case ProfileResourceType.Keybindings:
|
|
727
|
+
return localize(10518, "Keyboard Shortcuts");
|
|
728
|
+
case ProfileResourceType.Snippets:
|
|
729
|
+
return localize(10519, "Snippets");
|
|
730
|
+
case ProfileResourceType.Tasks:
|
|
731
|
+
return localize(10520, "Tasks");
|
|
732
|
+
case ProfileResourceType.Extensions:
|
|
733
|
+
return localize(10521, "Extensions");
|
|
735
734
|
}
|
|
736
735
|
return '';
|
|
737
736
|
}
|
|
@@ -756,23 +755,23 @@ let ProfileNameRenderer = class ProfileNameRenderer extends ProfilePropertyRende
|
|
|
756
755
|
this.templateId = 'name';
|
|
757
756
|
}
|
|
758
757
|
renderTemplate(parent) {
|
|
759
|
-
const disposables = (
|
|
760
|
-
const elementDisposables = disposables.add((
|
|
758
|
+
const disposables = ( new DisposableStore());
|
|
759
|
+
const elementDisposables = disposables.add(( new DisposableStore()));
|
|
761
760
|
let profileElement;
|
|
762
761
|
const nameContainer = append(parent, $('.profile-row-container'));
|
|
763
|
-
append(nameContainer, $('.profile-label-element', undefined, ( localize(
|
|
764
|
-
const nameInput = disposables.add((
|
|
762
|
+
append(nameContainer, $('.profile-label-element', undefined, ( localize(10522, "Name"))));
|
|
763
|
+
const nameInput = disposables.add(( new InputBox(nameContainer, this.contextViewService, {
|
|
765
764
|
inputBoxStyles: getInputBoxStyle({
|
|
766
765
|
inputBorder: settingsTextInputBorder
|
|
767
766
|
}),
|
|
768
|
-
ariaLabel: ( localize(
|
|
769
|
-
placeholder: ( localize(
|
|
767
|
+
ariaLabel: ( localize(10523, "Profile Name")),
|
|
768
|
+
placeholder: ( localize(10523, "Profile Name")),
|
|
770
769
|
validationOptions: {
|
|
771
770
|
validation: (value) => {
|
|
772
771
|
if (!value) {
|
|
773
772
|
return {
|
|
774
|
-
content: ( localize(
|
|
775
|
-
type:
|
|
773
|
+
content: ( localize(10524, "Profile name is required and must be a non-empty value.")),
|
|
774
|
+
type: MessageType.WARNING
|
|
776
775
|
};
|
|
777
776
|
}
|
|
778
777
|
if (profileElement?.root.disabled) {
|
|
@@ -783,16 +782,16 @@ let ProfileNameRenderer = class ProfileNameRenderer extends ProfilePropertyRende
|
|
|
783
782
|
}
|
|
784
783
|
const initialName = profileElement?.root.getInitialName();
|
|
785
784
|
value = value.trim();
|
|
786
|
-
if (initialName !== value && (
|
|
785
|
+
if (initialName !== value && ( this.userDataProfilesService.profiles.some(p => !p.isTransient && p.name === value))) {
|
|
787
786
|
return {
|
|
788
|
-
content: ( localize(
|
|
789
|
-
type:
|
|
787
|
+
content: ( localize(10525, "Profile with name {0} already exists.", value)),
|
|
788
|
+
type: MessageType.WARNING
|
|
790
789
|
};
|
|
791
790
|
}
|
|
792
791
|
return null;
|
|
793
792
|
}
|
|
794
793
|
}
|
|
795
|
-
})))
|
|
794
|
+
})));
|
|
796
795
|
nameInput.onDidChange(value => {
|
|
797
796
|
if (profileElement && value) {
|
|
798
797
|
profileElement.root.name = value;
|
|
@@ -815,10 +814,10 @@ let ProfileNameRenderer = class ProfileNameRenderer extends ProfilePropertyRende
|
|
|
815
814
|
nameInput.enable();
|
|
816
815
|
}
|
|
817
816
|
if (isDefaultProfile) {
|
|
818
|
-
nameInput.setTooltip(( localize(
|
|
817
|
+
nameInput.setTooltip(( localize(10526, "Name cannot be changed for the default profile")));
|
|
819
818
|
}
|
|
820
819
|
else {
|
|
821
|
-
nameInput.setTooltip(( localize(
|
|
820
|
+
nameInput.setTooltip(( localize(10523, "Profile Name")));
|
|
822
821
|
}
|
|
823
822
|
};
|
|
824
823
|
return {
|
|
@@ -839,10 +838,10 @@ let ProfileNameRenderer = class ProfileNameRenderer extends ProfilePropertyRende
|
|
|
839
838
|
};
|
|
840
839
|
}
|
|
841
840
|
};
|
|
842
|
-
ProfileNameRenderer = (
|
|
843
|
-
(
|
|
844
|
-
(
|
|
845
|
-
], ProfileNameRenderer))
|
|
841
|
+
ProfileNameRenderer = ( __decorate([
|
|
842
|
+
( __param(0, IUserDataProfilesService)),
|
|
843
|
+
( __param(1, IContextViewService))
|
|
844
|
+
], ProfileNameRenderer));
|
|
846
845
|
let ProfileIconRenderer = class ProfileIconRenderer extends ProfilePropertyRenderer {
|
|
847
846
|
constructor(instantiationService, hoverService) {
|
|
848
847
|
super();
|
|
@@ -852,13 +851,13 @@ let ProfileIconRenderer = class ProfileIconRenderer extends ProfilePropertyRende
|
|
|
852
851
|
this.hoverDelegate = getDefaultHoverDelegate('element');
|
|
853
852
|
}
|
|
854
853
|
renderTemplate(parent) {
|
|
855
|
-
const disposables = (
|
|
856
|
-
const elementDisposables = disposables.add((
|
|
854
|
+
const disposables = ( new DisposableStore());
|
|
855
|
+
const elementDisposables = disposables.add(( new DisposableStore()));
|
|
857
856
|
let profileElement;
|
|
858
857
|
const iconContainer = append(parent, $('.profile-row-container'));
|
|
859
|
-
append(iconContainer, $('.profile-label-element', undefined, ( localize(
|
|
858
|
+
append(iconContainer, $('.profile-label-element', undefined, ( localize(10527, "Icon"))));
|
|
860
859
|
const iconValueContainer = append(iconContainer, $('.profile-icon-container'));
|
|
861
|
-
const iconElement = append(iconValueContainer, $(`${ThemeIcon.asCSSSelector(DEFAULT_ICON)}`, { 'tabindex': '0', 'role': 'button', 'aria-label': ( localize(
|
|
860
|
+
const iconElement = append(iconValueContainer, $(`${ThemeIcon.asCSSSelector(DEFAULT_ICON)}`, { 'tabindex': '0', 'role': 'button', 'aria-label': ( localize(10528, "Profile Icon")) }));
|
|
862
861
|
const iconHover = disposables.add(this.hoverService.setupManagedHover(this.hoverDelegate, iconElement, ''));
|
|
863
862
|
const iconSelectBox = disposables.add(this.instantiationService.createInstance(WorkbenchIconSelectBox, { icons: ICONS, inputBoxStyles: defaultInputBoxStyles }));
|
|
864
863
|
let hoverWidget;
|
|
@@ -877,7 +876,7 @@ let ProfileIconRenderer = class ProfileIconRenderer extends ProfilePropertyRende
|
|
|
877
876
|
content: iconSelectBox.domNode,
|
|
878
877
|
target: iconElement,
|
|
879
878
|
position: {
|
|
880
|
-
hoverPosition:
|
|
879
|
+
hoverPosition: HoverPosition.BELOW,
|
|
881
880
|
},
|
|
882
881
|
persistence: {
|
|
883
882
|
sticky: true,
|
|
@@ -887,7 +886,7 @@ let ProfileIconRenderer = class ProfileIconRenderer extends ProfilePropertyRende
|
|
|
887
886
|
},
|
|
888
887
|
}, true);
|
|
889
888
|
if (hoverWidget) {
|
|
890
|
-
iconSelectBox.layout((
|
|
889
|
+
iconSelectBox.layout(( new Dimension(486, 292)));
|
|
891
890
|
iconSelectBox.focus();
|
|
892
891
|
}
|
|
893
892
|
};
|
|
@@ -896,15 +895,15 @@ let ProfileIconRenderer = class ProfileIconRenderer extends ProfilePropertyRende
|
|
|
896
895
|
showIconSelectBox();
|
|
897
896
|
}));
|
|
898
897
|
disposables.add(addDisposableListener(iconElement, EventType.KEY_DOWN, e => {
|
|
899
|
-
const event = (
|
|
900
|
-
if (event.equals(
|
|
898
|
+
const event = ( new StandardKeyboardEvent(e));
|
|
899
|
+
if (event.equals(KeyCode.Enter) || event.equals(KeyCode.Space)) {
|
|
901
900
|
EventHelper.stop(event, true);
|
|
902
901
|
showIconSelectBox();
|
|
903
902
|
}
|
|
904
903
|
}));
|
|
905
904
|
disposables.add(addDisposableListener(iconSelectBox.domNode, EventType.KEY_DOWN, e => {
|
|
906
|
-
const event = (
|
|
907
|
-
if (event.equals(
|
|
905
|
+
const event = ( new StandardKeyboardEvent(e));
|
|
906
|
+
if (event.equals(KeyCode.Escape)) {
|
|
908
907
|
EventHelper.stop(event, true);
|
|
909
908
|
hoverWidget?.dispose();
|
|
910
909
|
iconElement.focus();
|
|
@@ -917,14 +916,14 @@ let ProfileIconRenderer = class ProfileIconRenderer extends ProfilePropertyRende
|
|
|
917
916
|
profileElement.root.icon = selectedIcon.id;
|
|
918
917
|
}
|
|
919
918
|
}));
|
|
920
|
-
append(iconValueContainer, $('.profile-description-element', undefined, ( localize(
|
|
919
|
+
append(iconValueContainer, $('.profile-description-element', undefined, ( localize(10529, "Profile icon to be shown in the activity bar"))));
|
|
921
920
|
const renderIcon = (profileElement) => {
|
|
922
921
|
if (profileElement?.root instanceof UserDataProfileElement && profileElement.root.profile.isDefault) {
|
|
923
922
|
iconValueContainer.classList.add('disabled');
|
|
924
|
-
iconHover.update(( localize(
|
|
923
|
+
iconHover.update(( localize(10530, "Icon cannot be changed for the default profile")));
|
|
925
924
|
}
|
|
926
925
|
else {
|
|
927
|
-
iconHover.update(( localize(
|
|
926
|
+
iconHover.update(( localize(10531, "Click to change icon")));
|
|
928
927
|
iconValueContainer.classList.remove('disabled');
|
|
929
928
|
}
|
|
930
929
|
if (profileElement.root.icon) {
|
|
@@ -949,10 +948,10 @@ let ProfileIconRenderer = class ProfileIconRenderer extends ProfilePropertyRende
|
|
|
949
948
|
};
|
|
950
949
|
}
|
|
951
950
|
};
|
|
952
|
-
ProfileIconRenderer = (
|
|
953
|
-
(
|
|
954
|
-
(
|
|
955
|
-
], ProfileIconRenderer))
|
|
951
|
+
ProfileIconRenderer = ( __decorate([
|
|
952
|
+
( __param(0, IInstantiationService)),
|
|
953
|
+
( __param(1, IHoverService))
|
|
954
|
+
], ProfileIconRenderer));
|
|
956
955
|
let UseForCurrentWindowPropertyRenderer = class UseForCurrentWindowPropertyRenderer extends ProfilePropertyRenderer {
|
|
957
956
|
constructor(userDataProfileService) {
|
|
958
957
|
super();
|
|
@@ -960,14 +959,14 @@ let UseForCurrentWindowPropertyRenderer = class UseForCurrentWindowPropertyRende
|
|
|
960
959
|
this.templateId = 'useForCurrent';
|
|
961
960
|
}
|
|
962
961
|
renderTemplate(parent) {
|
|
963
|
-
const disposables = (
|
|
964
|
-
const elementDisposables = disposables.add((
|
|
962
|
+
const disposables = ( new DisposableStore());
|
|
963
|
+
const elementDisposables = disposables.add(( new DisposableStore()));
|
|
965
964
|
let profileElement;
|
|
966
965
|
const useForCurrentWindowContainer = append(parent, $('.profile-row-container'));
|
|
967
|
-
append(useForCurrentWindowContainer, $('.profile-label-element', undefined, ( localize(
|
|
966
|
+
append(useForCurrentWindowContainer, $('.profile-label-element', undefined, ( localize(10532, "Use for Current Window"))));
|
|
968
967
|
const useForCurrentWindowValueContainer = append(useForCurrentWindowContainer, $('.profile-use-for-current-container'));
|
|
969
|
-
const useForCurrentWindowTitle = ( localize(
|
|
970
|
-
const useForCurrentWindowCheckbox = disposables.add((
|
|
968
|
+
const useForCurrentWindowTitle = ( localize(10533, "Use this profile for the current window"));
|
|
969
|
+
const useForCurrentWindowCheckbox = disposables.add(( new Checkbox(useForCurrentWindowTitle, false, defaultCheckboxStyles)));
|
|
971
970
|
append(useForCurrentWindowValueContainer, useForCurrentWindowCheckbox.domNode);
|
|
972
971
|
const useForCurrentWindowLabel = append(useForCurrentWindowValueContainer, $('.profile-description-element', undefined, useForCurrentWindowTitle));
|
|
973
972
|
disposables.add(useForCurrentWindowCheckbox.onChange(() => {
|
|
@@ -1003,23 +1002,23 @@ let UseForCurrentWindowPropertyRenderer = class UseForCurrentWindowPropertyRende
|
|
|
1003
1002
|
};
|
|
1004
1003
|
}
|
|
1005
1004
|
};
|
|
1006
|
-
UseForCurrentWindowPropertyRenderer = (
|
|
1007
|
-
(
|
|
1008
|
-
], UseForCurrentWindowPropertyRenderer))
|
|
1005
|
+
UseForCurrentWindowPropertyRenderer = ( __decorate([
|
|
1006
|
+
( __param(0, IUserDataProfileService))
|
|
1007
|
+
], UseForCurrentWindowPropertyRenderer));
|
|
1009
1008
|
class UseAsDefaultProfileRenderer extends ProfilePropertyRenderer {
|
|
1010
1009
|
constructor() {
|
|
1011
1010
|
super(...arguments);
|
|
1012
1011
|
this.templateId = 'useAsDefault';
|
|
1013
1012
|
}
|
|
1014
1013
|
renderTemplate(parent) {
|
|
1015
|
-
const disposables = (
|
|
1016
|
-
const elementDisposables = disposables.add((
|
|
1014
|
+
const disposables = ( new DisposableStore());
|
|
1015
|
+
const elementDisposables = disposables.add(( new DisposableStore()));
|
|
1017
1016
|
let profileElement;
|
|
1018
1017
|
const useAsDefaultProfileContainer = append(parent, $('.profile-row-container'));
|
|
1019
|
-
append(useAsDefaultProfileContainer, $('.profile-label-element', undefined, ( localize(
|
|
1018
|
+
append(useAsDefaultProfileContainer, $('.profile-label-element', undefined, ( localize(10534, "Use for New Windows"))));
|
|
1020
1019
|
const useAsDefaultProfileValueContainer = append(useAsDefaultProfileContainer, $('.profile-use-as-default-container'));
|
|
1021
|
-
const useAsDefaultProfileTitle = ( localize(
|
|
1022
|
-
const useAsDefaultProfileCheckbox = disposables.add((
|
|
1020
|
+
const useAsDefaultProfileTitle = ( localize(10535, "Use this profile as the default for new windows"));
|
|
1021
|
+
const useAsDefaultProfileCheckbox = disposables.add(( new Checkbox(useAsDefaultProfileTitle, false, defaultCheckboxStyles)));
|
|
1023
1022
|
append(useAsDefaultProfileValueContainer, useAsDefaultProfileCheckbox.domNode);
|
|
1024
1023
|
const useAsDefaultProfileLabel = append(useAsDefaultProfileValueContainer, $('.profile-description-element', undefined, useAsDefaultProfileTitle));
|
|
1025
1024
|
disposables.add(useAsDefaultProfileCheckbox.onChange(() => {
|
|
@@ -1061,20 +1060,20 @@ let CopyFromProfileRenderer = class CopyFromProfileRenderer extends ProfilePrope
|
|
|
1061
1060
|
this.templates = [];
|
|
1062
1061
|
}
|
|
1063
1062
|
renderTemplate(parent) {
|
|
1064
|
-
const disposables = (
|
|
1065
|
-
const elementDisposables = disposables.add((
|
|
1063
|
+
const disposables = ( new DisposableStore());
|
|
1064
|
+
const elementDisposables = disposables.add(( new DisposableStore()));
|
|
1066
1065
|
let profileElement;
|
|
1067
1066
|
const copyFromContainer = append(parent, $('.profile-row-container.profile-copy-from-container'));
|
|
1068
|
-
append(copyFromContainer, $('.profile-label-element', undefined, ( localize(
|
|
1069
|
-
append(copyFromContainer, $('.profile-description-element', undefined, ( localize(
|
|
1067
|
+
append(copyFromContainer, $('.profile-label-element', undefined, ( localize(10536, "Copy from"))));
|
|
1068
|
+
append(copyFromContainer, $('.profile-description-element', undefined, ( localize(10537, "Select the profile source from which you want to copy contents"))));
|
|
1070
1069
|
const copyFromSelectBox = disposables.add(this.instantiationService.createInstance(SelectBox, [], 0, this.contextViewService, defaultSelectBoxStyles, {
|
|
1071
1070
|
useCustomDrawn: true,
|
|
1072
|
-
ariaLabel: ( localize(
|
|
1071
|
+
ariaLabel: ( localize(10538, "Copy profile from")),
|
|
1073
1072
|
}));
|
|
1074
1073
|
copyFromSelectBox.render(append(copyFromContainer, $('.profile-select-container')));
|
|
1075
1074
|
const render = (profileElement, copyFromOptions) => {
|
|
1076
1075
|
copyFromSelectBox.setOptions(copyFromOptions);
|
|
1077
|
-
const id = profileElement.copyFrom instanceof URI ? (
|
|
1076
|
+
const id = profileElement.copyFrom instanceof URI ? ( profileElement.copyFrom.toString()) : profileElement.copyFrom?.id;
|
|
1078
1077
|
const index = id
|
|
1079
1078
|
? copyFromOptions.findIndex(option => option.id === id)
|
|
1080
1079
|
: 0;
|
|
@@ -1113,21 +1112,19 @@ let CopyFromProfileRenderer = class CopyFromProfileRenderer extends ProfilePrope
|
|
|
1113
1112
|
getCopyFromOptions(profileElement) {
|
|
1114
1113
|
const separator = { text: '\u2500\u2500\u2500\u2500\u2500\u2500', isDisabled: true };
|
|
1115
1114
|
const copyFromOptions = [];
|
|
1116
|
-
copyFromOptions.push({ text: ( localize(
|
|
1115
|
+
copyFromOptions.push({ text: ( localize(10539, "None")) });
|
|
1117
1116
|
for (const [copyFromTemplate, name] of profileElement.copyFromTemplates) {
|
|
1118
|
-
if (!(
|
|
1119
|
-
|
|
1120
|
-
)))) {
|
|
1121
|
-
copyFromOptions.push({ text: `${name} (${basename(copyFromTemplate)})`, id: ( (copyFromTemplate.toString())), source: copyFromTemplate });
|
|
1117
|
+
if (!( this.templates.some(template => this.uriIdentityService.extUri.isEqual(( URI.parse(template.url)), copyFromTemplate)))) {
|
|
1118
|
+
copyFromOptions.push({ text: `${name} (${basename(copyFromTemplate)})`, id: ( copyFromTemplate.toString()), source: copyFromTemplate });
|
|
1122
1119
|
}
|
|
1123
1120
|
}
|
|
1124
1121
|
if (this.templates.length) {
|
|
1125
|
-
copyFromOptions.push({ ...separator, decoratorRight: ( localize(
|
|
1122
|
+
copyFromOptions.push({ ...separator, decoratorRight: ( localize(10540, "Profile Templates")) });
|
|
1126
1123
|
for (const template of this.templates) {
|
|
1127
|
-
copyFromOptions.push({ text: template.name, id: template.url, source: (
|
|
1124
|
+
copyFromOptions.push({ text: template.name, id: template.url, source: ( URI.parse(template.url)) });
|
|
1128
1125
|
}
|
|
1129
1126
|
}
|
|
1130
|
-
copyFromOptions.push({ ...separator, decoratorRight: ( localize(
|
|
1127
|
+
copyFromOptions.push({ ...separator, decoratorRight: ( localize(10541, "Existing Profiles")) });
|
|
1131
1128
|
for (const profile of this.userDataProfilesService.profiles) {
|
|
1132
1129
|
if (!profile.isTransient) {
|
|
1133
1130
|
copyFromOptions.push({ text: profile.name, id: profile.id, source: profile });
|
|
@@ -1136,12 +1133,12 @@ let CopyFromProfileRenderer = class CopyFromProfileRenderer extends ProfilePrope
|
|
|
1136
1133
|
return copyFromOptions;
|
|
1137
1134
|
}
|
|
1138
1135
|
};
|
|
1139
|
-
CopyFromProfileRenderer = (
|
|
1140
|
-
(
|
|
1141
|
-
(
|
|
1142
|
-
(
|
|
1143
|
-
(
|
|
1144
|
-
], CopyFromProfileRenderer))
|
|
1136
|
+
CopyFromProfileRenderer = ( __decorate([
|
|
1137
|
+
( __param(0, IUserDataProfilesService)),
|
|
1138
|
+
( __param(1, IInstantiationService)),
|
|
1139
|
+
( __param(2, IUriIdentityService)),
|
|
1140
|
+
( __param(3, IContextViewService))
|
|
1141
|
+
], CopyFromProfileRenderer));
|
|
1145
1142
|
let ContentsProfileRenderer = class ContentsProfileRenderer extends ProfilePropertyRenderer {
|
|
1146
1143
|
constructor(userDataProfilesService, contextMenuService, instantiationService) {
|
|
1147
1144
|
super();
|
|
@@ -1149,22 +1146,22 @@ let ContentsProfileRenderer = class ContentsProfileRenderer extends ProfilePrope
|
|
|
1149
1146
|
this.contextMenuService = contextMenuService;
|
|
1150
1147
|
this.instantiationService = instantiationService;
|
|
1151
1148
|
this.templateId = 'contents';
|
|
1152
|
-
this._onDidChangeContentHeight = this._register((
|
|
1149
|
+
this._onDidChangeContentHeight = this._register(( new Emitter()));
|
|
1153
1150
|
this.onDidChangeContentHeight = this._onDidChangeContentHeight.event;
|
|
1154
|
-
this._onDidChangeSelection = this._register((
|
|
1151
|
+
this._onDidChangeSelection = this._register(( new Emitter()));
|
|
1155
1152
|
this.onDidChangeSelection = this._onDidChangeSelection.event;
|
|
1156
1153
|
}
|
|
1157
1154
|
renderTemplate(parent) {
|
|
1158
|
-
const disposables = (
|
|
1159
|
-
const elementDisposables = disposables.add((
|
|
1155
|
+
const disposables = ( new DisposableStore());
|
|
1156
|
+
const elementDisposables = disposables.add(( new DisposableStore()));
|
|
1160
1157
|
let profileElement;
|
|
1161
1158
|
const configureRowContainer = append(parent, $('.profile-row-container'));
|
|
1162
|
-
append(configureRowContainer, $('.profile-label-element', undefined, ( localize(
|
|
1159
|
+
append(configureRowContainer, $('.profile-label-element', undefined, ( localize(10542, "Contents"))));
|
|
1163
1160
|
const contentsDescriptionElement = append(configureRowContainer, $('.profile-description-element'));
|
|
1164
1161
|
const contentsTreeHeader = append(configureRowContainer, $('.profile-content-tree-header'));
|
|
1165
|
-
const optionsLabel = $('.options-header', undefined, $('span', undefined, ( localize(
|
|
1166
|
-
append(contentsTreeHeader, $(''), $('', undefined, ( localize(
|
|
1167
|
-
const delegate = (
|
|
1162
|
+
const optionsLabel = $('.options-header', undefined, $('span', undefined, ( localize(10543, "Source"))));
|
|
1163
|
+
append(contentsTreeHeader, $(''), $('', undefined, ( localize(10542, "Contents"))), optionsLabel, $(''));
|
|
1164
|
+
const delegate = ( new ProfileContentTreeElementDelegate());
|
|
1168
1165
|
const profilesContentTree = this.profilesContentTree = disposables.add(this.instantiationService.createInstance((WorkbenchAsyncDataTree), 'ProfileEditor-ContentsTree', append(configureRowContainer, $('.profile-content-tree.file-icon-themable-tree.show-file-icons')), delegate, [
|
|
1169
1166
|
this.instantiationService.createInstance(ExistingProfileResourceTreeRenderer),
|
|
1170
1167
|
this.instantiationService.createInstance(NewProfileResourceTreeRenderer),
|
|
@@ -1233,29 +1230,29 @@ let ContentsProfileRenderer = class ContentsProfileRenderer extends ProfilePrope
|
|
|
1233
1230
|
}));
|
|
1234
1231
|
const updateDescription = (element) => {
|
|
1235
1232
|
clearNode(contentsDescriptionElement);
|
|
1236
|
-
const markdown = (
|
|
1233
|
+
const markdown = ( new MarkdownString());
|
|
1237
1234
|
if (element.root instanceof UserDataProfileElement && element.root.profile.isDefault) {
|
|
1238
|
-
markdown.appendMarkdown(( localize(
|
|
1235
|
+
markdown.appendMarkdown(( localize(10544, "Browse contents of this profile\n")));
|
|
1239
1236
|
}
|
|
1240
1237
|
else {
|
|
1241
|
-
markdown.appendMarkdown(( localize(
|
|
1238
|
+
markdown.appendMarkdown(( localize(10545, "Configure source of contents for this profile\n")));
|
|
1242
1239
|
if (element.root instanceof NewProfileElement) {
|
|
1243
1240
|
const copyFromName = element.root.getCopyFromName();
|
|
1244
1241
|
const optionName = copyFromName === this.userDataProfilesService.defaultProfile.name
|
|
1245
|
-
? ( localize(
|
|
1242
|
+
? ( localize(10546, "{0} (Copy)", copyFromName))
|
|
1246
1243
|
: copyFromName;
|
|
1247
1244
|
if (optionName) {
|
|
1248
1245
|
markdown
|
|
1249
1246
|
.appendMarkdown(( localize(
|
|
1250
|
-
|
|
1247
|
+
10547,
|
|
1251
1248
|
"- *{0}:* Copy contents from the {1} profile\n",
|
|
1252
1249
|
optionName,
|
|
1253
1250
|
copyFromName
|
|
1254
1251
|
)));
|
|
1255
1252
|
}
|
|
1256
1253
|
markdown
|
|
1257
|
-
.appendMarkdown(( localize(
|
|
1258
|
-
.appendMarkdown(( localize(
|
|
1254
|
+
.appendMarkdown(( localize(10548, "- *Default:* Use contents from the Default profile\n")))
|
|
1255
|
+
.appendMarkdown(( localize(10549, "- *None:* Create empty contents\n")));
|
|
1259
1256
|
}
|
|
1260
1257
|
}
|
|
1261
1258
|
append(contentsDescriptionElement, elementDisposables.add(renderMarkdown(markdown)).element);
|
|
@@ -1283,7 +1280,7 @@ let ContentsProfileRenderer = class ContentsProfileRenderer extends ProfilePrope
|
|
|
1283
1280
|
}));
|
|
1284
1281
|
},
|
|
1285
1282
|
disposables,
|
|
1286
|
-
elementDisposables: (
|
|
1283
|
+
elementDisposables: ( new DisposableStore())
|
|
1287
1284
|
};
|
|
1288
1285
|
}
|
|
1289
1286
|
clearSelection() {
|
|
@@ -1293,11 +1290,11 @@ let ContentsProfileRenderer = class ContentsProfileRenderer extends ProfilePrope
|
|
|
1293
1290
|
}
|
|
1294
1291
|
}
|
|
1295
1292
|
};
|
|
1296
|
-
ContentsProfileRenderer = (
|
|
1297
|
-
(
|
|
1298
|
-
(
|
|
1299
|
-
(
|
|
1300
|
-
], ContentsProfileRenderer))
|
|
1293
|
+
ContentsProfileRenderer = ( __decorate([
|
|
1294
|
+
( __param(0, IUserDataProfilesService)),
|
|
1295
|
+
( __param(1, IContextMenuService)),
|
|
1296
|
+
( __param(2, IInstantiationService))
|
|
1297
|
+
], ContentsProfileRenderer));
|
|
1301
1298
|
let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfilePropertyRenderer {
|
|
1302
1299
|
constructor(labelService, uriIdentityService, fileDialogService, instantiationService) {
|
|
1303
1300
|
super();
|
|
@@ -1306,17 +1303,17 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1306
1303
|
this.fileDialogService = fileDialogService;
|
|
1307
1304
|
this.instantiationService = instantiationService;
|
|
1308
1305
|
this.templateId = 'workspaces';
|
|
1309
|
-
this._onDidChangeContentHeight = this._register((
|
|
1306
|
+
this._onDidChangeContentHeight = this._register(( new Emitter()));
|
|
1310
1307
|
this.onDidChangeContentHeight = this._onDidChangeContentHeight.event;
|
|
1311
|
-
this._onDidChangeSelection = this._register((
|
|
1308
|
+
this._onDidChangeSelection = this._register(( new Emitter()));
|
|
1312
1309
|
this.onDidChangeSelection = this._onDidChangeSelection.event;
|
|
1313
1310
|
}
|
|
1314
1311
|
renderTemplate(parent) {
|
|
1315
|
-
const disposables = (
|
|
1316
|
-
const elementDisposables = disposables.add((
|
|
1312
|
+
const disposables = ( new DisposableStore());
|
|
1313
|
+
const elementDisposables = disposables.add(( new DisposableStore()));
|
|
1317
1314
|
let profileElement;
|
|
1318
1315
|
const profileWorkspacesRowContainer = append(parent, $('.profile-row-container'));
|
|
1319
|
-
append(profileWorkspacesRowContainer, $('.profile-label-element', undefined, ( localize(
|
|
1316
|
+
append(profileWorkspacesRowContainer, $('.profile-label-element', undefined, ( localize(10550, "Folders & Workspaces"))));
|
|
1320
1317
|
const profileWorkspacesDescriptionElement = append(profileWorkspacesRowContainer, $('.profile-description-element'));
|
|
1321
1318
|
const workspacesTableContainer = append(profileWorkspacesRowContainer, $('.profile-associations-table'));
|
|
1322
1319
|
const table = this.workspacesTable = disposables.add(this.instantiationService.createInstance((WorkbenchTable), 'ProfileEditor-AssociationsTable', workspacesTableContainer, new class {
|
|
@@ -1335,14 +1332,14 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1335
1332
|
project(row) { return row; },
|
|
1336
1333
|
},
|
|
1337
1334
|
{
|
|
1338
|
-
label: ( localize(
|
|
1335
|
+
label: ( localize(10551, "Host")),
|
|
1339
1336
|
tooltip: '',
|
|
1340
1337
|
weight: 2,
|
|
1341
1338
|
templateId: WorkspaceUriHostColumnRenderer.TEMPLATE_ID,
|
|
1342
1339
|
project(row) { return row; },
|
|
1343
1340
|
},
|
|
1344
1341
|
{
|
|
1345
|
-
label: ( localize(
|
|
1342
|
+
label: ( localize(10552, "Path")),
|
|
1346
1343
|
tooltip: '',
|
|
1347
1344
|
weight: 7,
|
|
1348
1345
|
templateId: WorkspaceUriPathColumnRenderer.TEMPLATE_ID,
|
|
@@ -1358,7 +1355,7 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1358
1355
|
project(row) { return row; }
|
|
1359
1356
|
},
|
|
1360
1357
|
], [
|
|
1361
|
-
(
|
|
1358
|
+
( new WorkspaceUriEmptyColumnRenderer()),
|
|
1362
1359
|
this.instantiationService.createInstance(WorkspaceUriHostColumnRenderer),
|
|
1363
1360
|
this.instantiationService.createInstance(WorkspaceUriPathColumnRenderer),
|
|
1364
1361
|
this.instantiationService.createInstance(WorkspaceUriActionsColumnRenderer),
|
|
@@ -1371,22 +1368,20 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1371
1368
|
getAriaLabel: (item) => {
|
|
1372
1369
|
const hostLabel = getHostLabel(this.labelService, item.workspace);
|
|
1373
1370
|
if (hostLabel === undefined || hostLabel.length === 0) {
|
|
1374
|
-
return
|
|
1371
|
+
return localize(10553, "{0}, trusted", this.labelService.getUriLabel(item.workspace));
|
|
1375
1372
|
}
|
|
1376
|
-
return
|
|
1377
|
-
|
|
1373
|
+
return localize(
|
|
1374
|
+
10554,
|
|
1378
1375
|
"{0} on {1}, trusted",
|
|
1379
1376
|
this.labelService.getUriLabel(item.workspace),
|
|
1380
1377
|
hostLabel
|
|
1381
|
-
)
|
|
1378
|
+
);
|
|
1382
1379
|
},
|
|
1383
|
-
getWidgetAriaLabel: () => ( localize(
|
|
1380
|
+
getWidgetAriaLabel: () => ( localize(10555, "Trusted Folders & Workspaces"))
|
|
1384
1381
|
},
|
|
1385
1382
|
identityProvider: {
|
|
1386
1383
|
getId(element) {
|
|
1387
|
-
return (
|
|
1388
|
-
(element.workspace.toString())
|
|
1389
|
-
);
|
|
1384
|
+
return ( element.workspace.toString());
|
|
1390
1385
|
},
|
|
1391
1386
|
}
|
|
1392
1387
|
}));
|
|
@@ -1398,16 +1393,16 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1398
1393
|
}
|
|
1399
1394
|
})));
|
|
1400
1395
|
const addButtonBarElement = append(profileWorkspacesRowContainer, $('.profile-workspaces-button-container'));
|
|
1401
|
-
const buttonBar = disposables.add((
|
|
1402
|
-
const addButton = this._register(buttonBar.addButton({ title: ( localize(
|
|
1403
|
-
addButton.label = ( localize(
|
|
1396
|
+
const buttonBar = disposables.add(( new ButtonBar(addButtonBarElement)));
|
|
1397
|
+
const addButton = this._register(buttonBar.addButton({ title: ( localize(10556, "Add Folder")), ...defaultButtonStyles }));
|
|
1398
|
+
addButton.label = ( localize(10556, "Add Folder"));
|
|
1404
1399
|
disposables.add(addButton.onDidClick(async () => {
|
|
1405
1400
|
const uris = await this.fileDialogService.showOpenDialog({
|
|
1406
1401
|
canSelectFiles: false,
|
|
1407
1402
|
canSelectFolders: true,
|
|
1408
1403
|
canSelectMany: true,
|
|
1409
|
-
openLabel: ( localize(
|
|
1410
|
-
title: ( localize(
|
|
1404
|
+
openLabel: ( localize(10557, "Add Folder")),
|
|
1405
|
+
title: ( localize(10558, "Select Folders To Add"))
|
|
1411
1406
|
});
|
|
1412
1407
|
if (uris) {
|
|
1413
1408
|
if (profileElement?.root instanceof UserDataProfileElement) {
|
|
@@ -1422,15 +1417,15 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1422
1417
|
}));
|
|
1423
1418
|
const updateTable = () => {
|
|
1424
1419
|
if (profileElement?.root instanceof UserDataProfileElement && profileElement.root.workspaces?.length) {
|
|
1425
|
-
profileWorkspacesDescriptionElement.textContent = ( localize(
|
|
1420
|
+
profileWorkspacesDescriptionElement.textContent = ( localize(10559, "Following folders and workspaces are using this profile"));
|
|
1426
1421
|
workspacesTableContainer.classList.remove('hide');
|
|
1427
|
-
table.splice(0, table.length, (
|
|
1428
|
-
.map(workspace => ({ workspace, profileElement: profileElement.root })))
|
|
1422
|
+
table.splice(0, table.length, ( profileElement.root.workspaces
|
|
1423
|
+
.map(workspace => ({ workspace, profileElement: profileElement.root })))
|
|
1429
1424
|
.sort((a, b) => this.uriIdentityService.extUri.compare(a.workspace, b.workspace)));
|
|
1430
1425
|
this.layout();
|
|
1431
1426
|
}
|
|
1432
1427
|
else {
|
|
1433
|
-
profileWorkspacesDescriptionElement.textContent = ( localize(
|
|
1428
|
+
profileWorkspacesDescriptionElement.textContent = ( localize(10560, "No folders or workspaces are using this profile"));
|
|
1434
1429
|
workspacesTableContainer.classList.add('hide');
|
|
1435
1430
|
}
|
|
1436
1431
|
};
|
|
@@ -1449,7 +1444,7 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1449
1444
|
}));
|
|
1450
1445
|
},
|
|
1451
1446
|
disposables,
|
|
1452
|
-
elementDisposables: (
|
|
1447
|
+
elementDisposables: ( new DisposableStore())
|
|
1453
1448
|
};
|
|
1454
1449
|
}
|
|
1455
1450
|
layout() {
|
|
@@ -1464,12 +1459,12 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1464
1459
|
}
|
|
1465
1460
|
}
|
|
1466
1461
|
};
|
|
1467
|
-
ProfileWorkspacesRenderer = (
|
|
1468
|
-
(
|
|
1469
|
-
(
|
|
1470
|
-
(
|
|
1471
|
-
(
|
|
1472
|
-
], ProfileWorkspacesRenderer))
|
|
1462
|
+
ProfileWorkspacesRenderer = ( __decorate([
|
|
1463
|
+
( __param(0, ILabelService)),
|
|
1464
|
+
( __param(1, IUriIdentityService)),
|
|
1465
|
+
( __param(2, IFileDialogService)),
|
|
1466
|
+
( __param(3, IInstantiationService))
|
|
1467
|
+
], ProfileWorkspacesRenderer));
|
|
1473
1468
|
let ExistingProfileResourceTreeRenderer = class ExistingProfileResourceTreeRenderer extends AbstractProfileResourceTreeRenderer {
|
|
1474
1469
|
static { ExistingProfileResourceTreeRenderer_1 = this; }
|
|
1475
1470
|
static { this.TEMPLATE_ID = 'ExistingProfileResourceTemplate'; }
|
|
@@ -1479,38 +1474,38 @@ let ExistingProfileResourceTreeRenderer = class ExistingProfileResourceTreeRende
|
|
|
1479
1474
|
this.templateId = ExistingProfileResourceTreeRenderer_1.TEMPLATE_ID;
|
|
1480
1475
|
}
|
|
1481
1476
|
renderTemplate(parent) {
|
|
1482
|
-
const disposables = (
|
|
1477
|
+
const disposables = ( new DisposableStore());
|
|
1483
1478
|
const container = append(parent, $('.profile-tree-item-container.existing-profile-resource-type-container'));
|
|
1484
1479
|
const label = append(container, $('.profile-resource-type-label'));
|
|
1485
|
-
const radio = disposables.add((
|
|
1480
|
+
const radio = disposables.add(( new Radio({ items: [] })));
|
|
1486
1481
|
append(append(container, $('.profile-resource-options-container')), radio.domNode);
|
|
1487
1482
|
const actionsContainer = append(container, $('.profile-resource-actions-container'));
|
|
1488
1483
|
const actionBar = disposables.add(this.instantiationService.createInstance(WorkbenchToolBar, actionsContainer, {
|
|
1489
1484
|
hoverDelegate: disposables.add(createInstantHoverDelegate()),
|
|
1490
1485
|
highlightToggledItems: true
|
|
1491
1486
|
}));
|
|
1492
|
-
return { label, radio, actionBar, disposables, elementDisposables: disposables.add((
|
|
1487
|
+
return { label, radio, actionBar, disposables, elementDisposables: disposables.add(( new DisposableStore())) };
|
|
1493
1488
|
}
|
|
1494
1489
|
renderElement({ element: profileResourceTreeElement }, index, templateData, height) {
|
|
1495
1490
|
templateData.elementDisposables.clear();
|
|
1496
1491
|
const { element, root } = profileResourceTreeElement;
|
|
1497
1492
|
if (!(root instanceof UserDataProfileElement)) {
|
|
1498
|
-
throw (
|
|
1493
|
+
throw ( new Error(
|
|
1499
1494
|
'ExistingProfileResourceTreeRenderer can only render existing profile element'
|
|
1500
|
-
))
|
|
1495
|
+
));
|
|
1501
1496
|
}
|
|
1502
1497
|
if (isString(element) || !isProfileResourceTypeElement(element)) {
|
|
1503
|
-
throw (
|
|
1498
|
+
throw ( new Error('Invalid profile resource element'));
|
|
1504
1499
|
}
|
|
1505
1500
|
const updateRadioItems = () => {
|
|
1506
1501
|
templateData.radio.setItems([{
|
|
1507
|
-
text: ( localize(
|
|
1508
|
-
tooltip: ( localize(
|
|
1502
|
+
text: ( localize(10561, "Default")),
|
|
1503
|
+
tooltip: ( localize(10562, "Use {0} from the Default profile", resourceTypeTitle)),
|
|
1509
1504
|
isActive: root.getFlag(element.resourceType)
|
|
1510
1505
|
},
|
|
1511
1506
|
{
|
|
1512
1507
|
text: root.name,
|
|
1513
|
-
tooltip: ( localize(
|
|
1508
|
+
tooltip: ( localize(10563, "Use {0} from the {1} profile", resourceTypeTitle, root.name)),
|
|
1514
1509
|
isActive: !root.getFlag(element.resourceType)
|
|
1515
1510
|
}]);
|
|
1516
1511
|
};
|
|
@@ -1539,9 +1534,9 @@ let ExistingProfileResourceTreeRenderer = class ExistingProfileResourceTreeRende
|
|
|
1539
1534
|
templateData.actionBar.setActions(actions);
|
|
1540
1535
|
}
|
|
1541
1536
|
};
|
|
1542
|
-
ExistingProfileResourceTreeRenderer = ExistingProfileResourceTreeRenderer_1 = (
|
|
1543
|
-
(
|
|
1544
|
-
], ExistingProfileResourceTreeRenderer))
|
|
1537
|
+
ExistingProfileResourceTreeRenderer = ExistingProfileResourceTreeRenderer_1 = ( __decorate([
|
|
1538
|
+
( __param(0, IInstantiationService))
|
|
1539
|
+
], ExistingProfileResourceTreeRenderer));
|
|
1545
1540
|
let NewProfileResourceTreeRenderer = class NewProfileResourceTreeRenderer extends AbstractProfileResourceTreeRenderer {
|
|
1546
1541
|
static { NewProfileResourceTreeRenderer_1 = this; }
|
|
1547
1542
|
static { this.TEMPLATE_ID = 'NewProfileResourceTemplate'; }
|
|
@@ -1552,48 +1547,48 @@ let NewProfileResourceTreeRenderer = class NewProfileResourceTreeRenderer extend
|
|
|
1552
1547
|
this.templateId = NewProfileResourceTreeRenderer_1.TEMPLATE_ID;
|
|
1553
1548
|
}
|
|
1554
1549
|
renderTemplate(parent) {
|
|
1555
|
-
const disposables = (
|
|
1550
|
+
const disposables = ( new DisposableStore());
|
|
1556
1551
|
const container = append(parent, $('.profile-tree-item-container.new-profile-resource-type-container'));
|
|
1557
1552
|
const labelContainer = append(container, $('.profile-resource-type-label-container'));
|
|
1558
1553
|
const label = append(labelContainer, $('span.profile-resource-type-label'));
|
|
1559
|
-
const radio = disposables.add((
|
|
1554
|
+
const radio = disposables.add(( new Radio({ items: [] })));
|
|
1560
1555
|
append(append(container, $('.profile-resource-options-container')), radio.domNode);
|
|
1561
1556
|
const actionsContainer = append(container, $('.profile-resource-actions-container'));
|
|
1562
1557
|
const actionBar = disposables.add(this.instantiationService.createInstance(WorkbenchToolBar, actionsContainer, {
|
|
1563
1558
|
hoverDelegate: disposables.add(createInstantHoverDelegate()),
|
|
1564
1559
|
highlightToggledItems: true
|
|
1565
1560
|
}));
|
|
1566
|
-
return { label, radio, actionBar, disposables, elementDisposables: disposables.add((
|
|
1561
|
+
return { label, radio, actionBar, disposables, elementDisposables: disposables.add(( new DisposableStore())) };
|
|
1567
1562
|
}
|
|
1568
1563
|
renderElement({ element: profileResourceTreeElement }, index, templateData, height) {
|
|
1569
1564
|
templateData.elementDisposables.clear();
|
|
1570
1565
|
const { element, root } = profileResourceTreeElement;
|
|
1571
1566
|
if (!(root instanceof NewProfileElement)) {
|
|
1572
|
-
throw (
|
|
1567
|
+
throw ( new Error('NewProfileResourceTreeRenderer can only render new profile element'));
|
|
1573
1568
|
}
|
|
1574
1569
|
if (isString(element) || !isProfileResourceTypeElement(element)) {
|
|
1575
|
-
throw (
|
|
1570
|
+
throw ( new Error('Invalid profile resource element'));
|
|
1576
1571
|
}
|
|
1577
1572
|
const resourceTypeTitle = this.getResourceTypeTitle(element.resourceType);
|
|
1578
1573
|
templateData.label.textContent = resourceTypeTitle;
|
|
1579
1574
|
const renderRadioItems = () => {
|
|
1580
1575
|
const options = [{
|
|
1581
|
-
text: ( localize(
|
|
1582
|
-
tooltip: ( localize(
|
|
1576
|
+
text: ( localize(10561, "Default")),
|
|
1577
|
+
tooltip: ( localize(10562, "Use {0} from the Default profile", resourceTypeTitle)),
|
|
1583
1578
|
},
|
|
1584
1579
|
{
|
|
1585
|
-
text: ( localize(
|
|
1586
|
-
tooltip: ( localize(
|
|
1580
|
+
text: ( localize(10564, "None")),
|
|
1581
|
+
tooltip: ( localize(10565, "Create empty {0}", resourceTypeTitle))
|
|
1587
1582
|
}];
|
|
1588
1583
|
const copyFromName = root.getCopyFromName();
|
|
1589
1584
|
const name = copyFromName === this.userDataProfilesService.defaultProfile.name
|
|
1590
|
-
? ( localize(
|
|
1585
|
+
? ( localize(10546, "{0} (Copy)", copyFromName))
|
|
1591
1586
|
: copyFromName;
|
|
1592
1587
|
if (root.copyFrom && name) {
|
|
1593
1588
|
templateData.radio.setItems([
|
|
1594
1589
|
{
|
|
1595
1590
|
text: name,
|
|
1596
|
-
tooltip: name ? ( localize(
|
|
1591
|
+
tooltip: name ? ( localize(10566, "Copy {0} from the {1} profile", resourceTypeTitle, name)) : ( localize(10567, "Copy")),
|
|
1597
1592
|
},
|
|
1598
1593
|
...options
|
|
1599
1594
|
]);
|
|
@@ -1635,10 +1630,10 @@ let NewProfileResourceTreeRenderer = class NewProfileResourceTreeRenderer extend
|
|
|
1635
1630
|
templateData.actionBar.setActions(actions);
|
|
1636
1631
|
}
|
|
1637
1632
|
};
|
|
1638
|
-
NewProfileResourceTreeRenderer = NewProfileResourceTreeRenderer_1 = (
|
|
1639
|
-
(
|
|
1640
|
-
(
|
|
1641
|
-
], NewProfileResourceTreeRenderer))
|
|
1633
|
+
NewProfileResourceTreeRenderer = NewProfileResourceTreeRenderer_1 = ( __decorate([
|
|
1634
|
+
( __param(0, IUserDataProfilesService)),
|
|
1635
|
+
( __param(1, IInstantiationService))
|
|
1636
|
+
], NewProfileResourceTreeRenderer));
|
|
1642
1637
|
let ProfileResourceChildTreeItemRenderer = class ProfileResourceChildTreeItemRenderer extends AbstractProfileResourceTreeRenderer {
|
|
1643
1638
|
static { ProfileResourceChildTreeItemRenderer_1 = this; }
|
|
1644
1639
|
static { this.TEMPLATE_ID = 'ProfileResourceChildTreeItemTemplate'; }
|
|
@@ -1650,9 +1645,9 @@ let ProfileResourceChildTreeItemRenderer = class ProfileResourceChildTreeItemRen
|
|
|
1650
1645
|
this.hoverDelegate = this._register(instantiationService.createInstance(WorkbenchHoverDelegate, 'mouse', false, {}));
|
|
1651
1646
|
}
|
|
1652
1647
|
renderTemplate(parent) {
|
|
1653
|
-
const disposables = (
|
|
1648
|
+
const disposables = ( new DisposableStore());
|
|
1654
1649
|
const container = append(parent, $('.profile-tree-item-container.profile-resource-child-container'));
|
|
1655
|
-
const checkbox = disposables.add((
|
|
1650
|
+
const checkbox = disposables.add(( new Checkbox('', false, defaultCheckboxStyles)));
|
|
1656
1651
|
append(container, checkbox.domNode);
|
|
1657
1652
|
const resourceLabel = disposables.add(this.labels.create(container, { hoverDelegate: this.hoverDelegate }));
|
|
1658
1653
|
const actionsContainer = append(container, $('.profile-resource-actions-container'));
|
|
@@ -1660,13 +1655,13 @@ let ProfileResourceChildTreeItemRenderer = class ProfileResourceChildTreeItemRen
|
|
|
1660
1655
|
hoverDelegate: disposables.add(createInstantHoverDelegate()),
|
|
1661
1656
|
highlightToggledItems: true
|
|
1662
1657
|
}));
|
|
1663
|
-
return { checkbox, resourceLabel, actionBar, disposables, elementDisposables: disposables.add((
|
|
1658
|
+
return { checkbox, resourceLabel, actionBar, disposables, elementDisposables: disposables.add(( new DisposableStore())) };
|
|
1664
1659
|
}
|
|
1665
1660
|
renderElement({ element: profileResourceTreeElement }, index, templateData, height) {
|
|
1666
1661
|
templateData.elementDisposables.clear();
|
|
1667
1662
|
const { element } = profileResourceTreeElement;
|
|
1668
1663
|
if (isString(element) || !isProfileResourceChildElement(element)) {
|
|
1669
|
-
throw (
|
|
1664
|
+
throw ( new Error('Invalid profile resource element'));
|
|
1670
1665
|
}
|
|
1671
1666
|
if (element.checkbox) {
|
|
1672
1667
|
templateData.checkbox.domNode.setAttribute('tabindex', '0');
|
|
@@ -1700,9 +1695,9 @@ let ProfileResourceChildTreeItemRenderer = class ProfileResourceChildTreeItemRen
|
|
|
1700
1695
|
templateData.actionBar.setActions(actions);
|
|
1701
1696
|
}
|
|
1702
1697
|
};
|
|
1703
|
-
ProfileResourceChildTreeItemRenderer = ProfileResourceChildTreeItemRenderer_1 = (
|
|
1704
|
-
(
|
|
1705
|
-
], ProfileResourceChildTreeItemRenderer))
|
|
1698
|
+
ProfileResourceChildTreeItemRenderer = ProfileResourceChildTreeItemRenderer_1 = ( __decorate([
|
|
1699
|
+
( __param(0, IInstantiationService))
|
|
1700
|
+
], ProfileResourceChildTreeItemRenderer));
|
|
1706
1701
|
class WorkspaceUriEmptyColumnRenderer {
|
|
1707
1702
|
constructor() {
|
|
1708
1703
|
this.templateId = WorkspaceUriEmptyColumnRenderer.TEMPLATE_ID;
|
|
@@ -1725,8 +1720,8 @@ let WorkspaceUriHostColumnRenderer = class WorkspaceUriHostColumnRenderer {
|
|
|
1725
1720
|
this.templateId = WorkspaceUriHostColumnRenderer_1.TEMPLATE_ID;
|
|
1726
1721
|
}
|
|
1727
1722
|
renderTemplate(container) {
|
|
1728
|
-
const disposables = (
|
|
1729
|
-
const renderDisposables = disposables.add((
|
|
1723
|
+
const disposables = ( new DisposableStore());
|
|
1724
|
+
const renderDisposables = disposables.add(( new DisposableStore()));
|
|
1730
1725
|
const element = container.appendChild($('.host'));
|
|
1731
1726
|
const hostContainer = element.appendChild($('div.host-label'));
|
|
1732
1727
|
const buttonBarContainer = element.appendChild($('div.button-bar'));
|
|
@@ -1750,10 +1745,10 @@ let WorkspaceUriHostColumnRenderer = class WorkspaceUriHostColumnRenderer {
|
|
|
1750
1745
|
templateData.disposables.dispose();
|
|
1751
1746
|
}
|
|
1752
1747
|
};
|
|
1753
|
-
WorkspaceUriHostColumnRenderer = WorkspaceUriHostColumnRenderer_1 = (
|
|
1754
|
-
(
|
|
1755
|
-
(
|
|
1756
|
-
], WorkspaceUriHostColumnRenderer))
|
|
1748
|
+
WorkspaceUriHostColumnRenderer = WorkspaceUriHostColumnRenderer_1 = ( __decorate([
|
|
1749
|
+
( __param(0, IUriIdentityService)),
|
|
1750
|
+
( __param(1, ILabelService))
|
|
1751
|
+
], WorkspaceUriHostColumnRenderer));
|
|
1757
1752
|
let WorkspaceUriPathColumnRenderer = class WorkspaceUriPathColumnRenderer {
|
|
1758
1753
|
static { WorkspaceUriPathColumnRenderer_1 = this; }
|
|
1759
1754
|
static { this.TEMPLATE_ID = 'path'; }
|
|
@@ -1764,11 +1759,11 @@ let WorkspaceUriPathColumnRenderer = class WorkspaceUriPathColumnRenderer {
|
|
|
1764
1759
|
this.hoverDelegate = getDefaultHoverDelegate('mouse');
|
|
1765
1760
|
}
|
|
1766
1761
|
renderTemplate(container) {
|
|
1767
|
-
const disposables = (
|
|
1762
|
+
const disposables = ( new DisposableStore());
|
|
1768
1763
|
const element = container.appendChild($('.path'));
|
|
1769
1764
|
const pathLabel = element.appendChild($('div.path-label'));
|
|
1770
1765
|
const pathHover = disposables.add(this.hoverService.setupManagedHover(this.hoverDelegate, pathLabel, ''));
|
|
1771
|
-
const renderDisposables = disposables.add((
|
|
1766
|
+
const renderDisposables = disposables.add(( new DisposableStore()));
|
|
1772
1767
|
return {
|
|
1773
1768
|
element,
|
|
1774
1769
|
pathLabel,
|
|
@@ -1802,42 +1797,40 @@ let WorkspaceUriPathColumnRenderer = class WorkspaceUriPathColumnRenderer {
|
|
|
1802
1797
|
return uri.path;
|
|
1803
1798
|
}
|
|
1804
1799
|
};
|
|
1805
|
-
WorkspaceUriPathColumnRenderer = WorkspaceUriPathColumnRenderer_1 = (
|
|
1806
|
-
(
|
|
1807
|
-
(
|
|
1808
|
-
], WorkspaceUriPathColumnRenderer))
|
|
1800
|
+
WorkspaceUriPathColumnRenderer = WorkspaceUriPathColumnRenderer_1 = ( __decorate([
|
|
1801
|
+
( __param(0, IUriIdentityService)),
|
|
1802
|
+
( __param(1, IHoverService))
|
|
1803
|
+
], WorkspaceUriPathColumnRenderer));
|
|
1809
1804
|
let ChangeProfileAction = class ChangeProfileAction extends Action {
|
|
1810
1805
|
constructor(item, userDataProfilesService) {
|
|
1811
1806
|
super('changeProfile', '', ThemeIcon.asClassName(editIcon));
|
|
1812
1807
|
this.item = item;
|
|
1813
1808
|
this.userDataProfilesService = userDataProfilesService;
|
|
1814
|
-
this.tooltip = ( localize(
|
|
1809
|
+
this.tooltip = ( localize(10568, "Change Profile"));
|
|
1815
1810
|
}
|
|
1816
1811
|
getSwitchProfileActions() {
|
|
1817
|
-
return (
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
return;
|
|
1831
|
-
}
|
|
1832
|
-
this.userDataProfilesService.updateProfile(profile, { workspaces: [...(profile.workspaces ?? []), this.item.workspace] });
|
|
1812
|
+
return ( this.userDataProfilesService.profiles
|
|
1813
|
+
.filter(profile => !profile.isTransient)
|
|
1814
|
+
.sort((a, b) => a.isDefault ? -1 : b.isDefault ? 1 : a.name.localeCompare(b.name))
|
|
1815
|
+
.map(profile => ({
|
|
1816
|
+
id: `switchProfileTo${profile.id}`,
|
|
1817
|
+
label: profile.name,
|
|
1818
|
+
class: undefined,
|
|
1819
|
+
enabled: true,
|
|
1820
|
+
checked: profile.id === this.item.profileElement.profile.id,
|
|
1821
|
+
tooltip: '',
|
|
1822
|
+
run: () => {
|
|
1823
|
+
if (profile.id === this.item.profileElement.profile.id) {
|
|
1824
|
+
return;
|
|
1833
1825
|
}
|
|
1834
|
-
|
|
1835
|
-
|
|
1826
|
+
this.userDataProfilesService.updateProfile(profile, { workspaces: [...(profile.workspaces ?? []), this.item.workspace] });
|
|
1827
|
+
}
|
|
1828
|
+
})));
|
|
1836
1829
|
}
|
|
1837
1830
|
};
|
|
1838
|
-
ChangeProfileAction = (
|
|
1839
|
-
(
|
|
1840
|
-
], ChangeProfileAction))
|
|
1831
|
+
ChangeProfileAction = ( __decorate([
|
|
1832
|
+
( __param(1, IUserDataProfilesService))
|
|
1833
|
+
], ChangeProfileAction));
|
|
1841
1834
|
let WorkspaceUriActionsColumnRenderer = class WorkspaceUriActionsColumnRenderer {
|
|
1842
1835
|
static { WorkspaceUriActionsColumnRenderer_1 = this; }
|
|
1843
1836
|
static { this.TEMPLATE_ID = 'actions'; }
|
|
@@ -1849,35 +1842,33 @@ let WorkspaceUriActionsColumnRenderer = class WorkspaceUriActionsColumnRenderer
|
|
|
1849
1842
|
this.templateId = WorkspaceUriActionsColumnRenderer_1.TEMPLATE_ID;
|
|
1850
1843
|
}
|
|
1851
1844
|
renderTemplate(container) {
|
|
1852
|
-
const disposables = (
|
|
1845
|
+
const disposables = ( new DisposableStore());
|
|
1853
1846
|
const element = container.appendChild($('.profile-workspaces-actions-container'));
|
|
1854
1847
|
const hoverDelegate = disposables.add(createInstantHoverDelegate());
|
|
1855
|
-
const actionBar = disposables.add((
|
|
1848
|
+
const actionBar = disposables.add(( new ActionBar(element, {
|
|
1856
1849
|
hoverDelegate,
|
|
1857
1850
|
actionViewItemProvider: (action) => {
|
|
1858
1851
|
if (action instanceof ChangeProfileAction) {
|
|
1859
|
-
return (
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
))
|
|
1869
|
-
);
|
|
1852
|
+
return ( new DropdownMenuActionViewItem(
|
|
1853
|
+
action,
|
|
1854
|
+
{ getActions: () => action.getSwitchProfileActions() },
|
|
1855
|
+
this.contextMenuService,
|
|
1856
|
+
{
|
|
1857
|
+
classNames: action.class,
|
|
1858
|
+
hoverDelegate,
|
|
1859
|
+
}
|
|
1860
|
+
));
|
|
1870
1861
|
}
|
|
1871
1862
|
return undefined;
|
|
1872
1863
|
}
|
|
1873
|
-
})))
|
|
1864
|
+
})));
|
|
1874
1865
|
return { actionBar, disposables };
|
|
1875
1866
|
}
|
|
1876
1867
|
renderElement(item, index, templateData, height) {
|
|
1877
1868
|
templateData.actionBar.clear();
|
|
1878
1869
|
const actions = [];
|
|
1879
1870
|
actions.push(this.createOpenAction(item));
|
|
1880
|
-
actions.push((
|
|
1871
|
+
actions.push(( new ChangeProfileAction(item, this.userDataProfilesService)));
|
|
1881
1872
|
actions.push(this.createDeleteAction(item));
|
|
1882
1873
|
templateData.actionBar.push(actions, { icon: true });
|
|
1883
1874
|
}
|
|
@@ -1887,7 +1878,7 @@ let WorkspaceUriActionsColumnRenderer = class WorkspaceUriActionsColumnRenderer
|
|
|
1887
1878
|
class: ThemeIcon.asClassName(Codicon.window),
|
|
1888
1879
|
enabled: !this.uriIdentityService.extUri.isEqual(item.workspace, item.profileElement.getCurrentWorkspace()),
|
|
1889
1880
|
id: 'openWorkspace',
|
|
1890
|
-
tooltip: ( localize(
|
|
1881
|
+
tooltip: ( localize(10569, "Open in New Window")),
|
|
1891
1882
|
run: () => item.profileElement.openWorkspace(item.workspace)
|
|
1892
1883
|
};
|
|
1893
1884
|
}
|
|
@@ -1897,7 +1888,7 @@ let WorkspaceUriActionsColumnRenderer = class WorkspaceUriActionsColumnRenderer
|
|
|
1897
1888
|
class: ThemeIcon.asClassName(removeIcon),
|
|
1898
1889
|
enabled: this.userDataProfileManagementService.getDefaultProfileToUse().id !== item.profileElement.profile.id,
|
|
1899
1890
|
id: 'deleteTrustedUri',
|
|
1900
|
-
tooltip: ( localize(
|
|
1891
|
+
tooltip: ( localize(10570, "Delete Path")),
|
|
1901
1892
|
run: () => item.profileElement.updateWorkspaces([], [item.workspace])
|
|
1902
1893
|
};
|
|
1903
1894
|
}
|
|
@@ -1905,14 +1896,14 @@ let WorkspaceUriActionsColumnRenderer = class WorkspaceUriActionsColumnRenderer
|
|
|
1905
1896
|
templateData.disposables.dispose();
|
|
1906
1897
|
}
|
|
1907
1898
|
};
|
|
1908
|
-
WorkspaceUriActionsColumnRenderer = WorkspaceUriActionsColumnRenderer_1 = (
|
|
1909
|
-
(
|
|
1910
|
-
(
|
|
1911
|
-
(
|
|
1912
|
-
(
|
|
1913
|
-
], WorkspaceUriActionsColumnRenderer))
|
|
1899
|
+
WorkspaceUriActionsColumnRenderer = WorkspaceUriActionsColumnRenderer_1 = ( __decorate([
|
|
1900
|
+
( __param(0, IUserDataProfilesService)),
|
|
1901
|
+
( __param(1, IUserDataProfileManagementService)),
|
|
1902
|
+
( __param(2, IContextMenuService)),
|
|
1903
|
+
( __param(3, IUriIdentityService))
|
|
1904
|
+
], WorkspaceUriActionsColumnRenderer));
|
|
1914
1905
|
function getHostLabel(labelService, workspaceUri) {
|
|
1915
|
-
return workspaceUri.authority ? labelService.getHostLabel(workspaceUri.scheme, workspaceUri.authority) : ( localize(
|
|
1906
|
+
return workspaceUri.authority ? labelService.getHostLabel(workspaceUri.scheme, workspaceUri.authority) : ( localize(10571, "Local"));
|
|
1916
1907
|
}
|
|
1917
1908
|
let UserDataProfilesEditorInput = class UserDataProfilesEditorInput extends EditorInput {
|
|
1918
1909
|
static { UserDataProfilesEditorInput_1 = this; }
|
|
@@ -1930,10 +1921,10 @@ let UserDataProfilesEditorInput = class UserDataProfilesEditorInput extends Edit
|
|
|
1930
1921
|
this.resource = undefined;
|
|
1931
1922
|
this._dirty = false;
|
|
1932
1923
|
this.model = UserDataProfilesEditorModel.getInstance(this.instantiationService);
|
|
1933
|
-
this._register(this.model.onDidChange(e => this.dirty = (
|
|
1924
|
+
this._register(this.model.onDidChange(e => this.dirty = ( this.model.profiles.some(profile => profile instanceof NewProfileElement))));
|
|
1934
1925
|
}
|
|
1935
1926
|
get typeId() { return UserDataProfilesEditorInput_1.ID; }
|
|
1936
|
-
getName() { return
|
|
1927
|
+
getName() { return localize(10572, "Profiles"); }
|
|
1937
1928
|
getIcon() { return defaultUserDataProfileIcon; }
|
|
1938
1929
|
async resolve() {
|
|
1939
1930
|
await this.model.resolve();
|
|
@@ -1959,9 +1950,9 @@ let UserDataProfilesEditorInput = class UserDataProfilesEditorInput extends Edit
|
|
|
1959
1950
|
super.dispose();
|
|
1960
1951
|
}
|
|
1961
1952
|
};
|
|
1962
|
-
UserDataProfilesEditorInput = UserDataProfilesEditorInput_1 = (
|
|
1963
|
-
(
|
|
1964
|
-
], UserDataProfilesEditorInput))
|
|
1953
|
+
UserDataProfilesEditorInput = UserDataProfilesEditorInput_1 = ( __decorate([
|
|
1954
|
+
( __param(0, IInstantiationService))
|
|
1955
|
+
], UserDataProfilesEditorInput));
|
|
1965
1956
|
class UserDataProfilesEditorInputSerializer {
|
|
1966
1957
|
canSerialize(editorInput) { return true; }
|
|
1967
1958
|
serialize(editorInput) { return ''; }
|