@codingame/monaco-vscode-view-common-service-override 20.4.1 → 21.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.js +0 -1
- package/package.json +41 -41
- package/service-override/vs/workbench/contrib/webview/browser/pre/index.html +62 -6
- package/service-override/vs/workbench/contrib/webview/browser/pre/service-worker.js +17 -2
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +70 -60
- package/vscode/src/vs/workbench/browser/actions/listCommands.js +3 -3
- package/vscode/src/vs/workbench/browser/actions/navigationActions.js +6 -6
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +169 -168
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +8 -8
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +12 -12
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +5 -5
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +3 -3
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +2 -2
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +12 -12
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.js +7 -7
- package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +8 -8
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +29 -29
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.js +14 -14
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorAccessibilityHelp.js +5 -5
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.js +13 -13
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +3 -3
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.js +1 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +11 -11
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +5 -5
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +2 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +12 -12
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +10 -10
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +5 -5
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +3 -3
- package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.js +5 -4
- package/vscode/src/vs/workbench/contrib/webview/browser/themeing.js +2 -2
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +14 -4
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +5 -5
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +3 -3
- package/vscode/src/vs/workbench/services/editor/browser/editorPaneService.js +1 -1
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +9 -9
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +9 -9
- package/vscode/src/vs/workbench/services/progress/browser/progressService.js +9 -9
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +6 -6
- package/service-override/vs/workbench/contrib/webview/browser/pre/index-no-csp.html +0 -1251
|
@@ -11,7 +11,7 @@ import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/regist
|
|
|
11
11
|
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
12
12
|
import { Extensions as Extensions$1 } from '@codingame/monaco-vscode-9efc1f50-c7de-55d6-8b28-bcc88bd49b5a-common/vscode/vs/workbench/browser/panecomposite';
|
|
13
13
|
import { CustomTreeView, TreeViewPane } from '@codingame/monaco-vscode-4a316137-39d1-5d77-8b53-112db3547c1e-common/vscode/vs/workbench/browser/parts/views/treeView';
|
|
14
|
-
import { ViewPaneContainer } from '@codingame/monaco-vscode-
|
|
14
|
+
import { ViewPaneContainer } from '@codingame/monaco-vscode-71c8dbff-4c98-552f-aef0-e72b00fdcfc0-common/vscode/vs/workbench/browser/parts/views/viewPaneContainer';
|
|
15
15
|
import { registerWorkbenchContribution2, WorkbenchPhase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions';
|
|
16
16
|
import { Extensions, ViewContainerLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views';
|
|
17
17
|
import { VIEWLET_ID as VIEWLET_ID$3 } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/debug/common/debug';
|
|
@@ -19,7 +19,7 @@ import { VIEWLET_ID as VIEWLET_ID$1 } from '@codingame/monaco-vscode-f24e325c-2c
|
|
|
19
19
|
import { VIEWLET_ID } from '@codingame/monaco-vscode-1b4486de-4fe4-59c4-9e6d-34f265ff6625-common/vscode/vs/workbench/contrib/remote/browser/remoteExplorer';
|
|
20
20
|
import { VIEWLET_ID as VIEWLET_ID$2 } from '@codingame/monaco-vscode-ff9fa663-eae3-5274-8573-c2b918871e4b-common/vscode/vs/workbench/contrib/scm/common/scm';
|
|
21
21
|
import { WebviewViewPane } from '../../contrib/webviewView/browser/webviewViewPane.js';
|
|
22
|
-
import { isProposedApiEnabled } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions';
|
|
22
|
+
import { checkProposedApiEnabled, isProposedApiEnabled } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions';
|
|
23
23
|
import { ExtensionsRegistry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensionsRegistry';
|
|
24
24
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
25
25
|
import { Extensions as Extensions$2 } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensionManagement/common/extensionFeatures';
|
|
@@ -31,19 +31,19 @@ const viewsContainerSchema = {
|
|
|
31
31
|
properties: {
|
|
32
32
|
id: {
|
|
33
33
|
description: ( localize(
|
|
34
|
-
|
|
34
|
+
2525,
|
|
35
35
|
"Unique id used to identify the container in which views can be contributed using 'views' contribution point"
|
|
36
36
|
)),
|
|
37
37
|
type: 'string',
|
|
38
38
|
pattern: '^[a-zA-Z0-9_-]+$'
|
|
39
39
|
},
|
|
40
40
|
title: {
|
|
41
|
-
description: ( localize(
|
|
41
|
+
description: ( localize(2526, 'Human readable string used to render the container')),
|
|
42
42
|
type: 'string'
|
|
43
43
|
},
|
|
44
44
|
icon: {
|
|
45
45
|
description: ( localize(
|
|
46
|
-
|
|
46
|
+
2527,
|
|
47
47
|
"Path to the container icon. Icons are 24x24 centered on a 50x40 block and have a fill color of 'rgb(215, 218, 224)' or '#d7dae0'. It is recommended that icons be in SVG, though any image file type is accepted."
|
|
48
48
|
)),
|
|
49
49
|
type: 'string'
|
|
@@ -52,16 +52,21 @@ const viewsContainerSchema = {
|
|
|
52
52
|
required: ['id', 'title', 'icon']
|
|
53
53
|
};
|
|
54
54
|
const viewsContainersContribution = {
|
|
55
|
-
description: ( localize(
|
|
55
|
+
description: ( localize(2528, 'Contributes views containers to the editor')),
|
|
56
56
|
type: 'object',
|
|
57
57
|
properties: {
|
|
58
58
|
'activitybar': {
|
|
59
|
-
description: ( localize(
|
|
59
|
+
description: ( localize(2529, "Contribute views containers to Activity Bar")),
|
|
60
60
|
type: 'array',
|
|
61
61
|
items: viewsContainerSchema
|
|
62
62
|
},
|
|
63
63
|
'panel': {
|
|
64
|
-
description: ( localize(
|
|
64
|
+
description: ( localize(2530, "Contribute views containers to Panel")),
|
|
65
|
+
type: 'array',
|
|
66
|
+
items: viewsContainerSchema
|
|
67
|
+
},
|
|
68
|
+
'secondarySidebar': {
|
|
69
|
+
description: ( localize(2531, "Contribute views containers to Secondary Side Bar")),
|
|
65
70
|
type: 'array',
|
|
66
71
|
items: viewsContainerSchema
|
|
67
72
|
}
|
|
@@ -86,7 +91,7 @@ const viewDescriptor = {
|
|
|
86
91
|
properties: {
|
|
87
92
|
type: {
|
|
88
93
|
markdownDescription: ( localize(
|
|
89
|
-
|
|
94
|
+
2532,
|
|
90
95
|
"Type of the view. This can either be `tree` for a tree view based view or `webview` for a webview based view. The default is `tree`."
|
|
91
96
|
)),
|
|
92
97
|
type: 'string',
|
|
@@ -95,45 +100,45 @@ const viewDescriptor = {
|
|
|
95
100
|
'webview',
|
|
96
101
|
],
|
|
97
102
|
markdownEnumDescriptions: [
|
|
98
|
-
( localize(
|
|
103
|
+
( localize(2533, "The view is backed by a `TreeView` created by `createTreeView`.")),
|
|
99
104
|
( localize(
|
|
100
|
-
|
|
105
|
+
2534,
|
|
101
106
|
"The view is backed by a `WebviewView` registered by `registerWebviewViewProvider`."
|
|
102
107
|
)),
|
|
103
108
|
]
|
|
104
109
|
},
|
|
105
110
|
id: {
|
|
106
111
|
markdownDescription: ( localize(
|
|
107
|
-
|
|
112
|
+
2535,
|
|
108
113
|
'Identifier of the view. This should be unique across all views. It is recommended to include your extension id as part of the view id. Use this to register a data provider through `vscode.window.registerTreeDataProviderForView` API. Also to trigger activating your extension by registering `onView:${id}` event to `activationEvents`.'
|
|
109
114
|
)),
|
|
110
115
|
type: 'string'
|
|
111
116
|
},
|
|
112
117
|
name: {
|
|
113
|
-
description: ( localize(
|
|
118
|
+
description: ( localize(2536, 'The human-readable name of the view. Will be shown')),
|
|
114
119
|
type: 'string'
|
|
115
120
|
},
|
|
116
121
|
when: {
|
|
117
|
-
description: ( localize(
|
|
122
|
+
description: ( localize(2537, 'Condition which must be true to show this view')),
|
|
118
123
|
type: 'string'
|
|
119
124
|
},
|
|
120
125
|
icon: {
|
|
121
126
|
description: ( localize(
|
|
122
|
-
|
|
127
|
+
2538,
|
|
123
128
|
"Path to the view icon. View icons are displayed when the name of the view cannot be shown. It is recommended that icons be in SVG, though any image file type is accepted."
|
|
124
129
|
)),
|
|
125
130
|
type: 'string'
|
|
126
131
|
},
|
|
127
132
|
contextualTitle: {
|
|
128
133
|
description: ( localize(
|
|
129
|
-
|
|
134
|
+
2539,
|
|
130
135
|
"Human-readable context for when the view is moved out of its original location. By default, the view's container name will be used."
|
|
131
136
|
)),
|
|
132
137
|
type: 'string'
|
|
133
138
|
},
|
|
134
139
|
visibility: {
|
|
135
140
|
description: ( localize(
|
|
136
|
-
|
|
141
|
+
2540,
|
|
137
142
|
"Initial state of the view when the extension is first installed. Once the user has changed the view state by collapsing, moving, or hiding the view, the initial state will not be used again."
|
|
138
143
|
)),
|
|
139
144
|
type: 'string',
|
|
@@ -145,27 +150,27 @@ const viewDescriptor = {
|
|
|
145
150
|
default: 'visible',
|
|
146
151
|
enumDescriptions: [
|
|
147
152
|
( localize(
|
|
148
|
-
|
|
153
|
+
2541,
|
|
149
154
|
"The default initial state for the view. In most containers the view will be expanded, however; some built-in containers (explorer, scm, and debug) show all contributed views collapsed regardless of the `visibility`."
|
|
150
155
|
)),
|
|
151
156
|
( localize(
|
|
152
|
-
|
|
157
|
+
2542,
|
|
153
158
|
"The view will not be shown in the view container, but will be discoverable through the views menu and other view entry points and can be un-hidden by the user."
|
|
154
159
|
)),
|
|
155
|
-
( localize(
|
|
160
|
+
( localize(2543, "The view will show in the view container, but will be collapsed."))
|
|
156
161
|
]
|
|
157
162
|
},
|
|
158
163
|
initialSize: {
|
|
159
164
|
type: 'number',
|
|
160
165
|
description: ( localize(
|
|
161
|
-
|
|
166
|
+
2544,
|
|
162
167
|
"The initial size of the view. The size will behave like the css 'flex' property, and will set the initial size when the view is first shown. In the side bar, this is the height of the view. This value is only respected when the same extension owns both the view and the view container."
|
|
163
168
|
)),
|
|
164
169
|
},
|
|
165
170
|
accessibilityHelpContent: {
|
|
166
171
|
type: 'string',
|
|
167
172
|
markdownDescription: ( localize(
|
|
168
|
-
|
|
173
|
+
2545,
|
|
169
174
|
"When the accessibility help dialog is invoked in this view, this content will be presented to the user as a markdown string. Keybindings will be resolved when provided in the format of <keybinding:commandId>. If there is no keybinding, that will be indicated and this command will be included in a quickpick for easy configuration."
|
|
170
175
|
))
|
|
171
176
|
}
|
|
@@ -177,25 +182,25 @@ const remoteViewDescriptor = {
|
|
|
177
182
|
properties: {
|
|
178
183
|
id: {
|
|
179
184
|
description: ( localize(
|
|
180
|
-
|
|
185
|
+
2535,
|
|
181
186
|
'Identifier of the view. This should be unique across all views. It is recommended to include your extension id as part of the view id. Use this to register a data provider through `vscode.window.registerTreeDataProviderForView` API. Also to trigger activating your extension by registering `onView:${id}` event to `activationEvents`.'
|
|
182
187
|
)),
|
|
183
188
|
type: 'string'
|
|
184
189
|
},
|
|
185
190
|
name: {
|
|
186
|
-
description: ( localize(
|
|
191
|
+
description: ( localize(2536, 'The human-readable name of the view. Will be shown')),
|
|
187
192
|
type: 'string'
|
|
188
193
|
},
|
|
189
194
|
when: {
|
|
190
|
-
description: ( localize(
|
|
195
|
+
description: ( localize(2537, 'Condition which must be true to show this view')),
|
|
191
196
|
type: 'string'
|
|
192
197
|
},
|
|
193
198
|
group: {
|
|
194
|
-
description: ( localize(
|
|
199
|
+
description: ( localize(2546, 'Nested group in the viewlet')),
|
|
195
200
|
type: 'string'
|
|
196
201
|
},
|
|
197
202
|
remoteName: {
|
|
198
|
-
description: ( localize(
|
|
203
|
+
description: ( localize(2547, 'The name of the remote type associated with this view')),
|
|
199
204
|
type: ['string', 'array'],
|
|
200
205
|
items: {
|
|
201
206
|
type: 'string'
|
|
@@ -204,36 +209,36 @@ const remoteViewDescriptor = {
|
|
|
204
209
|
}
|
|
205
210
|
};
|
|
206
211
|
const viewsContribution = {
|
|
207
|
-
description: ( localize(
|
|
212
|
+
description: ( localize(2548, "Contributes views to the editor")),
|
|
208
213
|
type: 'object',
|
|
209
214
|
properties: {
|
|
210
215
|
'explorer': {
|
|
211
|
-
description: ( localize(
|
|
216
|
+
description: ( localize(2549, "Contributes views to Explorer container in the Activity bar")),
|
|
212
217
|
type: 'array',
|
|
213
218
|
items: viewDescriptor,
|
|
214
219
|
default: []
|
|
215
220
|
},
|
|
216
221
|
'debug': {
|
|
217
|
-
description: ( localize(
|
|
222
|
+
description: ( localize(2550, "Contributes views to Debug container in the Activity bar")),
|
|
218
223
|
type: 'array',
|
|
219
224
|
items: viewDescriptor,
|
|
220
225
|
default: []
|
|
221
226
|
},
|
|
222
227
|
'scm': {
|
|
223
|
-
description: ( localize(
|
|
228
|
+
description: ( localize(2551, "Contributes views to SCM container in the Activity bar")),
|
|
224
229
|
type: 'array',
|
|
225
230
|
items: viewDescriptor,
|
|
226
231
|
default: []
|
|
227
232
|
},
|
|
228
233
|
'test': {
|
|
229
|
-
description: ( localize(
|
|
234
|
+
description: ( localize(2552, "Contributes views to Test container in the Activity bar")),
|
|
230
235
|
type: 'array',
|
|
231
236
|
items: viewDescriptor,
|
|
232
237
|
default: []
|
|
233
238
|
},
|
|
234
239
|
'remote': {
|
|
235
240
|
description: ( localize(
|
|
236
|
-
|
|
241
|
+
2553,
|
|
237
242
|
"Contributes views to Remote container in the Activity bar. To contribute to this container, enableProposedApi needs to be turned on"
|
|
238
243
|
)),
|
|
239
244
|
type: 'array',
|
|
@@ -242,7 +247,7 @@ const viewsContribution = {
|
|
|
242
247
|
}
|
|
243
248
|
},
|
|
244
249
|
additionalProperties: {
|
|
245
|
-
description: ( localize(
|
|
250
|
+
description: ( localize(2554, "Contributes views to contributed views container")),
|
|
246
251
|
type: 'array',
|
|
247
252
|
items: viewDescriptor,
|
|
248
253
|
default: []
|
|
@@ -293,6 +298,7 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
293
298
|
const viewContainersRegistry = ( Registry.as(Extensions.ViewContainersRegistry));
|
|
294
299
|
let activityBarOrder = CUSTOM_VIEWS_START_ORDER + viewContainersRegistry.all.filter(v => !!v.extensionId && viewContainersRegistry.getViewContainerLocation(v) === ViewContainerLocation.Sidebar).length;
|
|
295
300
|
let panelOrder = 5 + viewContainersRegistry.all.filter(v => !!v.extensionId && viewContainersRegistry.getViewContainerLocation(v) === ViewContainerLocation.Panel).length + 1;
|
|
301
|
+
let auxiliaryBarOrder = 100 + viewContainersRegistry.all.filter(v => !!v.extensionId && viewContainersRegistry.getViewContainerLocation(v) === ViewContainerLocation.AuxiliaryBar).length + 1;
|
|
296
302
|
for (const { value, collector, description } of extensionPoints) {
|
|
297
303
|
Object.entries(value).forEach(([key, value]) => {
|
|
298
304
|
if (!this.isValidViewsContainer(value, collector)) {
|
|
@@ -305,6 +311,10 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
305
311
|
case 'panel':
|
|
306
312
|
panelOrder = this.registerCustomViewContainers(value, description, panelOrder, existingViewContainers, ViewContainerLocation.Panel);
|
|
307
313
|
break;
|
|
314
|
+
case 'secondarySidebar':
|
|
315
|
+
checkProposedApiEnabled(description, 'contribSecondarySidebar');
|
|
316
|
+
auxiliaryBarOrder = this.registerCustomViewContainers(value, description, auxiliaryBarOrder, existingViewContainers, ViewContainerLocation.AuxiliaryBar);
|
|
317
|
+
break;
|
|
308
318
|
}
|
|
309
319
|
});
|
|
310
320
|
}
|
|
@@ -324,13 +334,13 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
324
334
|
}
|
|
325
335
|
isValidViewsContainer(viewsContainersDescriptors, collector) {
|
|
326
336
|
if (!Array.isArray(viewsContainersDescriptors)) {
|
|
327
|
-
collector.error(( localize(
|
|
337
|
+
collector.error(( localize(2555, "views containers must be an array")));
|
|
328
338
|
return false;
|
|
329
339
|
}
|
|
330
340
|
for (const descriptor of viewsContainersDescriptors) {
|
|
331
341
|
if (typeof descriptor.id !== 'string' && isFalsyOrWhitespace(descriptor.id)) {
|
|
332
342
|
collector.error(( localize(
|
|
333
|
-
|
|
343
|
+
2556,
|
|
334
344
|
"property `{0}` is mandatory and must be of type `string` with non-empty value. Only alphanumeric characters, '_', and '-' are allowed.",
|
|
335
345
|
'id'
|
|
336
346
|
)));
|
|
@@ -338,23 +348,23 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
338
348
|
}
|
|
339
349
|
if (!(/^[a-z0-9_-]+$/i.test(descriptor.id))) {
|
|
340
350
|
collector.error(( localize(
|
|
341
|
-
|
|
351
|
+
2556,
|
|
342
352
|
"property `{0}` is mandatory and must be of type `string` with non-empty value. Only alphanumeric characters, '_', and '-' are allowed.",
|
|
343
353
|
'id'
|
|
344
354
|
)));
|
|
345
355
|
return false;
|
|
346
356
|
}
|
|
347
357
|
if (typeof descriptor.title !== 'string') {
|
|
348
|
-
collector.error(( localize(
|
|
358
|
+
collector.error(( localize(2557, "property `{0}` is mandatory and must be of type `string`", 'title')));
|
|
349
359
|
return false;
|
|
350
360
|
}
|
|
351
361
|
if (typeof descriptor.icon !== 'string') {
|
|
352
|
-
collector.error(( localize(
|
|
362
|
+
collector.error(( localize(2557, "property `{0}` is mandatory and must be of type `string`", 'icon')));
|
|
353
363
|
return false;
|
|
354
364
|
}
|
|
355
365
|
if (isFalsyOrWhitespace(descriptor.title)) {
|
|
356
366
|
collector.warn(( localize(
|
|
357
|
-
|
|
367
|
+
2558,
|
|
358
368
|
"property `{0}` is mandatory and must be of type `string` with non-empty value",
|
|
359
369
|
'title'
|
|
360
370
|
)));
|
|
@@ -424,7 +434,7 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
424
434
|
}
|
|
425
435
|
if (key === 'remote' && !isProposedApiEnabled(extension.description, 'contribViewsRemote')) {
|
|
426
436
|
collector.warn(( localize(
|
|
427
|
-
|
|
437
|
+
2559,
|
|
428
438
|
"View container '{0}' requires 'enabledApiProposals: [\"contribViewsRemote\"]' to be added to 'Remote'.",
|
|
429
439
|
key
|
|
430
440
|
)));
|
|
@@ -433,7 +443,7 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
433
443
|
const viewContainer = this.getViewContainer(key);
|
|
434
444
|
if (!viewContainer) {
|
|
435
445
|
collector.warn(( localize(
|
|
436
|
-
|
|
446
|
+
2560,
|
|
437
447
|
"View container '{0}' does not exist and all views registered to it will be added to 'Explorer'.",
|
|
438
448
|
key
|
|
439
449
|
)));
|
|
@@ -443,11 +453,11 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
443
453
|
for (let index = 0; index < value.length; index++) {
|
|
444
454
|
const item = value[index];
|
|
445
455
|
if (( viewIds.has(item.id))) {
|
|
446
|
-
collector.error(( localize(
|
|
456
|
+
collector.error(( localize(2561, "Cannot register multiple views with same id `{0}`", item.id)));
|
|
447
457
|
continue;
|
|
448
458
|
}
|
|
449
459
|
if (this.viewsRegistry.getView(item.id) !== null) {
|
|
450
|
-
collector.error(( localize(
|
|
460
|
+
collector.error(( localize(2562, "A view with id `{0}` is already registered.", item.id)));
|
|
451
461
|
continue;
|
|
452
462
|
}
|
|
453
463
|
const order = ExtensionIdentifier.equals(extension.description.identifier, container.extensionId)
|
|
@@ -462,7 +472,7 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
462
472
|
const initialVisibility = this.convertInitialVisibility(item.visibility);
|
|
463
473
|
const type = this.getViewType(item.type);
|
|
464
474
|
if (!type) {
|
|
465
|
-
collector.error(( localize(
|
|
475
|
+
collector.error(( localize(2563, "Unknown view type `{0}`.", item.type)));
|
|
466
476
|
continue;
|
|
467
477
|
}
|
|
468
478
|
let weight = undefined;
|
|
@@ -544,29 +554,29 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
544
554
|
}
|
|
545
555
|
isValidViewDescriptors(viewDescriptors, collector) {
|
|
546
556
|
if (!Array.isArray(viewDescriptors)) {
|
|
547
|
-
collector.error(( localize(
|
|
557
|
+
collector.error(( localize(2564, "views must be an array")));
|
|
548
558
|
return false;
|
|
549
559
|
}
|
|
550
560
|
for (const descriptor of viewDescriptors) {
|
|
551
561
|
if (typeof descriptor.id !== 'string') {
|
|
552
|
-
collector.error(( localize(
|
|
562
|
+
collector.error(( localize(2557, "property `{0}` is mandatory and must be of type `string`", 'id')));
|
|
553
563
|
return false;
|
|
554
564
|
}
|
|
555
565
|
if (typeof descriptor.name !== 'string') {
|
|
556
|
-
collector.error(( localize(
|
|
566
|
+
collector.error(( localize(2557, "property `{0}` is mandatory and must be of type `string`", 'name')));
|
|
557
567
|
return false;
|
|
558
568
|
}
|
|
559
569
|
if (descriptor.when && typeof descriptor.when !== 'string') {
|
|
560
|
-
collector.error(( localize(
|
|
570
|
+
collector.error(( localize(2565, "property `{0}` can be omitted or must be of type `string`", 'when')));
|
|
561
571
|
return false;
|
|
562
572
|
}
|
|
563
573
|
if (descriptor.icon && typeof descriptor.icon !== 'string') {
|
|
564
|
-
collector.error(( localize(
|
|
574
|
+
collector.error(( localize(2565, "property `{0}` can be omitted or must be of type `string`", 'icon')));
|
|
565
575
|
return false;
|
|
566
576
|
}
|
|
567
577
|
if (descriptor.contextualTitle && typeof descriptor.contextualTitle !== 'string') {
|
|
568
578
|
collector.error(( localize(
|
|
569
|
-
|
|
579
|
+
2565,
|
|
570
580
|
"property `{0}` can be omitted or must be of type `string`",
|
|
571
581
|
'contextualTitle'
|
|
572
582
|
)));
|
|
@@ -574,7 +584,7 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
574
584
|
}
|
|
575
585
|
if (descriptor.visibility && !this.convertInitialVisibility(descriptor.visibility)) {
|
|
576
586
|
collector.error(( localize(
|
|
577
|
-
|
|
587
|
+
2566,
|
|
578
588
|
"property `{0}` can be omitted or must be one of {1}",
|
|
579
589
|
'visibility',
|
|
580
590
|
( Object.values(InitialVisibility)).join(', ')
|
|
@@ -626,9 +636,9 @@ class ViewContainersDataRenderer extends Disposable {
|
|
|
626
636
|
return { data: { headers: [], rows: [] }, dispose: () => { } };
|
|
627
637
|
}
|
|
628
638
|
const headers = [
|
|
629
|
-
( localize(
|
|
630
|
-
( localize(
|
|
631
|
-
( localize(
|
|
639
|
+
( localize(2567, "ID")),
|
|
640
|
+
( localize(2568, "Title")),
|
|
641
|
+
( localize(2569, "Where")),
|
|
632
642
|
];
|
|
633
643
|
const rows = ( viewContainers
|
|
634
644
|
.sort((a, b) => a.id.localeCompare(b.id))
|
|
@@ -667,9 +677,9 @@ class ViewsDataRenderer extends Disposable {
|
|
|
667
677
|
return { data: { headers: [], rows: [] }, dispose: () => { } };
|
|
668
678
|
}
|
|
669
679
|
const headers = [
|
|
670
|
-
( localize(
|
|
671
|
-
( localize(
|
|
672
|
-
( localize(
|
|
680
|
+
( localize(2570, "ID")),
|
|
681
|
+
( localize(2571, "Name")),
|
|
682
|
+
( localize(2569, "Where")),
|
|
673
683
|
];
|
|
674
684
|
const rows = ( views
|
|
675
685
|
.sort((a, b) => a.id.localeCompare(b.id))
|
|
@@ -691,7 +701,7 @@ class ViewsDataRenderer extends Disposable {
|
|
|
691
701
|
}
|
|
692
702
|
( Registry.as(Extensions$2.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
693
703
|
id: 'viewsContainers',
|
|
694
|
-
label: ( localize(
|
|
704
|
+
label: ( localize(2572, "View Containers")),
|
|
695
705
|
access: {
|
|
696
706
|
canToggle: false
|
|
697
707
|
},
|
|
@@ -699,7 +709,7 @@ class ViewsDataRenderer extends Disposable {
|
|
|
699
709
|
});
|
|
700
710
|
( Registry.as(Extensions$2.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
701
711
|
id: 'views',
|
|
702
|
-
label: ( localize(
|
|
712
|
+
label: ( localize(2573, "Views")),
|
|
703
713
|
access: {
|
|
704
714
|
canToggle: false
|
|
705
715
|
},
|
|
@@ -782,12 +782,12 @@ registerAction2(class ToggleStickyScroll extends Action2 {
|
|
|
782
782
|
super({
|
|
783
783
|
id: 'tree.toggleStickyScroll',
|
|
784
784
|
title: {
|
|
785
|
-
...( localize2(
|
|
786
|
-
mnemonicTitle: ( localize(
|
|
785
|
+
...( localize2(2821, "Toggle Tree Sticky Scroll")),
|
|
786
|
+
mnemonicTitle: ( localize(2822, "&&Toggle Tree Sticky Scroll")),
|
|
787
787
|
},
|
|
788
788
|
category: 'View',
|
|
789
789
|
metadata: { description: ( localize(
|
|
790
|
-
|
|
790
|
+
2823,
|
|
791
791
|
"Toggles Sticky Scroll widget at the top of tree structures such as the File Explorer and Debug variables View."
|
|
792
792
|
)) },
|
|
793
793
|
f1: true
|
|
@@ -149,7 +149,7 @@ registerAction2(class extends BaseNavigationAction {
|
|
|
149
149
|
constructor() {
|
|
150
150
|
super({
|
|
151
151
|
id: 'workbench.action.navigateLeft',
|
|
152
|
-
title: ( localize2(
|
|
152
|
+
title: ( localize2(2824, 'Navigate to the View on the Left')),
|
|
153
153
|
category: Categories.View,
|
|
154
154
|
f1: true
|
|
155
155
|
}, Direction.Left);
|
|
@@ -159,7 +159,7 @@ registerAction2(class extends BaseNavigationAction {
|
|
|
159
159
|
constructor() {
|
|
160
160
|
super({
|
|
161
161
|
id: 'workbench.action.navigateRight',
|
|
162
|
-
title: ( localize2(
|
|
162
|
+
title: ( localize2(2825, 'Navigate to the View on the Right')),
|
|
163
163
|
category: Categories.View,
|
|
164
164
|
f1: true
|
|
165
165
|
}, Direction.Right);
|
|
@@ -169,7 +169,7 @@ registerAction2(class extends BaseNavigationAction {
|
|
|
169
169
|
constructor() {
|
|
170
170
|
super({
|
|
171
171
|
id: 'workbench.action.navigateUp',
|
|
172
|
-
title: ( localize2(
|
|
172
|
+
title: ( localize2(2826, 'Navigate to the View Above')),
|
|
173
173
|
category: Categories.View,
|
|
174
174
|
f1: true
|
|
175
175
|
}, Direction.Up);
|
|
@@ -179,7 +179,7 @@ registerAction2(class extends BaseNavigationAction {
|
|
|
179
179
|
constructor() {
|
|
180
180
|
super({
|
|
181
181
|
id: 'workbench.action.navigateDown',
|
|
182
|
-
title: ( localize2(
|
|
182
|
+
title: ( localize2(2827, 'Navigate to the View Below')),
|
|
183
183
|
category: Categories.View,
|
|
184
184
|
f1: true
|
|
185
185
|
}, Direction.Down);
|
|
@@ -264,7 +264,7 @@ registerAction2(class extends BaseFocusAction {
|
|
|
264
264
|
constructor() {
|
|
265
265
|
super({
|
|
266
266
|
id: 'workbench.action.focusNextPart',
|
|
267
|
-
title: ( localize2(
|
|
267
|
+
title: ( localize2(2828, 'Focus Next Part')),
|
|
268
268
|
category: Categories.View,
|
|
269
269
|
f1: true,
|
|
270
270
|
keybinding: {
|
|
@@ -278,7 +278,7 @@ registerAction2(class extends BaseFocusAction {
|
|
|
278
278
|
constructor() {
|
|
279
279
|
super({
|
|
280
280
|
id: 'workbench.action.focusPreviousPart',
|
|
281
|
-
title: ( localize2(
|
|
281
|
+
title: ( localize2(2829, 'Focus Previous Part')),
|
|
282
282
|
category: Categories.View,
|
|
283
283
|
f1: true,
|
|
284
284
|
keybinding: {
|