@codingame/monaco-vscode-view-common-service-override 7.0.11 → 7.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +80 -149
- package/vscode/src/vs/workbench/browser/actions/listCommands.js +5 -7
- package/vscode/src/vs/workbench/browser/actions/navigationActions.js +7 -8
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +24 -26
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +6 -14
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/media/auxiliaryBarPart.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/compositeBar.js +2 -3
- package/vscode/src/vs/workbench/browser/parts/compositePart.js +4 -5
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +161 -160
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +13 -18
- package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +2 -8
- package/vscode/src/vs/workbench/browser/parts/editor/editorPart.js +3 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorParts.js +2 -3
- package/vscode/src/vs/workbench/browser/parts/media/paneCompositePart.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.js +3 -4
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +6 -7
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +19 -16
- package/vscode/src/vs/workbench/browser/parts/sidebar/media/sidebarpart.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarActions.js +2 -3
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +2 -3
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +13 -14
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +6 -7
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +4 -5
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +2 -3
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +2 -3
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +18 -24
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +9 -10
- package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +9 -10
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +29 -31
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.js +15 -16
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +4 -5
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.js +14 -15
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/conflictActions.js +26 -31
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +5 -7
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +12 -13
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +6 -7
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +2 -3
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +2 -7
- package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +15 -18
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js +5 -8
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +11 -12
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +6 -7
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +4 -5
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +13 -4
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +6 -7
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +2 -3
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +10 -25
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +16 -27
- package/vscode/src/vs/workbench/services/progress/browser/progressService.js +8 -9
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +3 -4
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +2 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-view-common-service-override",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.1.1",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@7.
|
|
30
|
-
"@codingame/monaco-vscode-bulk-edit-service-override": "7.
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@7.1.1",
|
|
30
|
+
"@codingame/monaco-vscode-bulk-edit-service-override": "7.1.1"
|
|
31
31
|
}
|
|
32
32
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { joinPath } from 'vscode/vscode/vs/base/common/resources';
|
|
3
3
|
import { isFalsyOrWhitespace } from 'vscode/vscode/vs/base/common/strings';
|
|
4
|
-
import {
|
|
4
|
+
import { localize } from 'vscode/vscode/vs/nls';
|
|
5
5
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
6
6
|
import { ExtensionIdentifierSet, ExtensionIdentifier } from 'vscode/vscode/vs/platform/extensions/common/extensions';
|
|
7
7
|
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
@@ -25,27 +25,24 @@ import { Extensions as Extensions$2 } from 'vscode/vscode/vs/workbench/services/
|
|
|
25
25
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
26
26
|
import { MarkdownString } from 'vscode/vscode/vs/base/common/htmlContent';
|
|
27
27
|
|
|
28
|
-
const _moduleId = "vs/workbench/api/browser/viewsExtensionPoint";
|
|
29
28
|
const viewsContainerSchema = {
|
|
30
29
|
type: 'object',
|
|
31
30
|
properties: {
|
|
32
31
|
id: {
|
|
33
|
-
description: (
|
|
34
|
-
|
|
35
|
-
0,
|
|
32
|
+
description: ( localize(
|
|
33
|
+
4185,
|
|
36
34
|
"Unique id used to identify the container in which views can be contributed using 'views' contribution point"
|
|
37
35
|
)),
|
|
38
36
|
type: 'string',
|
|
39
37
|
pattern: '^[a-zA-Z0-9_-]+$'
|
|
40
38
|
},
|
|
41
39
|
title: {
|
|
42
|
-
description: (
|
|
40
|
+
description: ( localize(4186, 'Human readable string used to render the container')),
|
|
43
41
|
type: 'string'
|
|
44
42
|
},
|
|
45
43
|
icon: {
|
|
46
|
-
description: (
|
|
47
|
-
|
|
48
|
-
2,
|
|
44
|
+
description: ( localize(
|
|
45
|
+
4187,
|
|
49
46
|
"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."
|
|
50
47
|
)),
|
|
51
48
|
type: 'string'
|
|
@@ -54,16 +51,16 @@ const viewsContainerSchema = {
|
|
|
54
51
|
required: ['id', 'title', 'icon']
|
|
55
52
|
};
|
|
56
53
|
const viewsContainersContribution = {
|
|
57
|
-
description: (
|
|
54
|
+
description: ( localize(4188, 'Contributes views containers to the editor')),
|
|
58
55
|
type: 'object',
|
|
59
56
|
properties: {
|
|
60
57
|
'activitybar': {
|
|
61
|
-
description: (
|
|
58
|
+
description: ( localize(4189, "Contribute views containers to Activity Bar")),
|
|
62
59
|
type: 'array',
|
|
63
60
|
items: viewsContainerSchema
|
|
64
61
|
},
|
|
65
62
|
'panel': {
|
|
66
|
-
description: (
|
|
63
|
+
description: ( localize(4190, "Contribute views containers to Panel")),
|
|
67
64
|
type: 'array',
|
|
68
65
|
items: viewsContainerSchema
|
|
69
66
|
}
|
|
@@ -86,9 +83,8 @@ const viewDescriptor = {
|
|
|
86
83
|
defaultSnippets: [{ body: { id: '${1:id}', name: '${2:name}' } }],
|
|
87
84
|
properties: {
|
|
88
85
|
type: {
|
|
89
|
-
markdownDescription: (
|
|
90
|
-
|
|
91
|
-
6,
|
|
86
|
+
markdownDescription: ( localize(
|
|
87
|
+
4191,
|
|
92
88
|
"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`."
|
|
93
89
|
)),
|
|
94
90
|
type: 'string',
|
|
@@ -97,54 +93,45 @@ const viewDescriptor = {
|
|
|
97
93
|
'webview',
|
|
98
94
|
],
|
|
99
95
|
markdownEnumDescriptions: [
|
|
100
|
-
(
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
"The view is backed by a `TreeView` created by `createTreeView`."
|
|
104
|
-
)),
|
|
105
|
-
( localizeWithPath(
|
|
106
|
-
_moduleId,
|
|
107
|
-
8,
|
|
96
|
+
( localize(4192, "The view is backed by a `TreeView` created by `createTreeView`.")),
|
|
97
|
+
( localize(
|
|
98
|
+
4193,
|
|
108
99
|
"The view is backed by a `WebviewView` registered by `registerWebviewViewProvider`."
|
|
109
100
|
)),
|
|
110
101
|
]
|
|
111
102
|
},
|
|
112
103
|
id: {
|
|
113
|
-
markdownDescription: (
|
|
114
|
-
|
|
115
|
-
9,
|
|
104
|
+
markdownDescription: ( localize(
|
|
105
|
+
4194,
|
|
116
106
|
'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`.'
|
|
117
107
|
)),
|
|
118
108
|
type: 'string'
|
|
119
109
|
},
|
|
120
110
|
name: {
|
|
121
|
-
description: (
|
|
111
|
+
description: ( localize(4195, 'The human-readable name of the view. Will be shown')),
|
|
122
112
|
type: 'string'
|
|
123
113
|
},
|
|
124
114
|
when: {
|
|
125
|
-
description: (
|
|
115
|
+
description: ( localize(4196, 'Condition which must be true to show this view')),
|
|
126
116
|
type: 'string'
|
|
127
117
|
},
|
|
128
118
|
icon: {
|
|
129
|
-
description: (
|
|
130
|
-
|
|
131
|
-
12,
|
|
119
|
+
description: ( localize(
|
|
120
|
+
4197,
|
|
132
121
|
"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."
|
|
133
122
|
)),
|
|
134
123
|
type: 'string'
|
|
135
124
|
},
|
|
136
125
|
contextualTitle: {
|
|
137
|
-
description: (
|
|
138
|
-
|
|
139
|
-
13,
|
|
126
|
+
description: ( localize(
|
|
127
|
+
4198,
|
|
140
128
|
"Human-readable context for when the view is moved out of its original location. By default, the view's container name will be used."
|
|
141
129
|
)),
|
|
142
130
|
type: 'string'
|
|
143
131
|
},
|
|
144
132
|
visibility: {
|
|
145
|
-
description: (
|
|
146
|
-
|
|
147
|
-
14,
|
|
133
|
+
description: ( localize(
|
|
134
|
+
4199,
|
|
148
135
|
"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."
|
|
149
136
|
)),
|
|
150
137
|
type: 'string',
|
|
@@ -155,36 +142,28 @@ const viewDescriptor = {
|
|
|
155
142
|
],
|
|
156
143
|
default: 'visible',
|
|
157
144
|
enumDescriptions: [
|
|
158
|
-
(
|
|
159
|
-
|
|
160
|
-
15,
|
|
145
|
+
( localize(
|
|
146
|
+
4200,
|
|
161
147
|
"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`."
|
|
162
148
|
)),
|
|
163
|
-
(
|
|
164
|
-
|
|
165
|
-
16,
|
|
149
|
+
( localize(
|
|
150
|
+
4201,
|
|
166
151
|
"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."
|
|
167
152
|
)),
|
|
168
|
-
(
|
|
169
|
-
_moduleId,
|
|
170
|
-
17,
|
|
171
|
-
"The view will show in the view container, but will be collapsed."
|
|
172
|
-
))
|
|
153
|
+
( localize(4202, "The view will show in the view container, but will be collapsed."))
|
|
173
154
|
]
|
|
174
155
|
},
|
|
175
156
|
initialSize: {
|
|
176
157
|
type: 'number',
|
|
177
|
-
description: (
|
|
178
|
-
|
|
179
|
-
18,
|
|
158
|
+
description: ( localize(
|
|
159
|
+
4203,
|
|
180
160
|
"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."
|
|
181
161
|
)),
|
|
182
162
|
},
|
|
183
163
|
accessibilityHelpContent: {
|
|
184
164
|
type: 'string',
|
|
185
|
-
markdownDescription: (
|
|
186
|
-
|
|
187
|
-
19,
|
|
165
|
+
markdownDescription: ( localize(
|
|
166
|
+
4204,
|
|
188
167
|
"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."
|
|
189
168
|
))
|
|
190
169
|
}
|
|
@@ -195,27 +174,26 @@ const remoteViewDescriptor = {
|
|
|
195
174
|
required: ['id', 'name'],
|
|
196
175
|
properties: {
|
|
197
176
|
id: {
|
|
198
|
-
description: (
|
|
199
|
-
|
|
200
|
-
9,
|
|
177
|
+
description: ( localize(
|
|
178
|
+
4204,
|
|
201
179
|
'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`.'
|
|
202
180
|
)),
|
|
203
181
|
type: 'string'
|
|
204
182
|
},
|
|
205
183
|
name: {
|
|
206
|
-
description: (
|
|
184
|
+
description: ( localize(4204, 'The human-readable name of the view. Will be shown')),
|
|
207
185
|
type: 'string'
|
|
208
186
|
},
|
|
209
187
|
when: {
|
|
210
|
-
description: (
|
|
188
|
+
description: ( localize(4204, 'Condition which must be true to show this view')),
|
|
211
189
|
type: 'string'
|
|
212
190
|
},
|
|
213
191
|
group: {
|
|
214
|
-
description: (
|
|
192
|
+
description: ( localize(4205, 'Nested group in the viewlet')),
|
|
215
193
|
type: 'string'
|
|
216
194
|
},
|
|
217
195
|
remoteName: {
|
|
218
|
-
description: (
|
|
196
|
+
description: ( localize(4206, 'The name of the remote type associated with this view')),
|
|
219
197
|
type: ['string', 'array'],
|
|
220
198
|
items: {
|
|
221
199
|
type: 'string'
|
|
@@ -224,41 +202,36 @@ const remoteViewDescriptor = {
|
|
|
224
202
|
}
|
|
225
203
|
};
|
|
226
204
|
const viewsContribution = {
|
|
227
|
-
description: (
|
|
205
|
+
description: ( localize(4207, "Contributes views to the editor")),
|
|
228
206
|
type: 'object',
|
|
229
207
|
properties: {
|
|
230
208
|
'explorer': {
|
|
231
|
-
description: (
|
|
232
|
-
_moduleId,
|
|
233
|
-
23,
|
|
234
|
-
"Contributes views to Explorer container in the Activity bar"
|
|
235
|
-
)),
|
|
209
|
+
description: ( localize(4208, "Contributes views to Explorer container in the Activity bar")),
|
|
236
210
|
type: 'array',
|
|
237
211
|
items: viewDescriptor,
|
|
238
212
|
default: []
|
|
239
213
|
},
|
|
240
214
|
'debug': {
|
|
241
|
-
description: (
|
|
215
|
+
description: ( localize(4209, "Contributes views to Debug container in the Activity bar")),
|
|
242
216
|
type: 'array',
|
|
243
217
|
items: viewDescriptor,
|
|
244
218
|
default: []
|
|
245
219
|
},
|
|
246
220
|
'scm': {
|
|
247
|
-
description: (
|
|
221
|
+
description: ( localize(4210, "Contributes views to SCM container in the Activity bar")),
|
|
248
222
|
type: 'array',
|
|
249
223
|
items: viewDescriptor,
|
|
250
224
|
default: []
|
|
251
225
|
},
|
|
252
226
|
'test': {
|
|
253
|
-
description: (
|
|
227
|
+
description: ( localize(4211, "Contributes views to Test container in the Activity bar")),
|
|
254
228
|
type: 'array',
|
|
255
229
|
items: viewDescriptor,
|
|
256
230
|
default: []
|
|
257
231
|
},
|
|
258
232
|
'remote': {
|
|
259
|
-
description: (
|
|
260
|
-
|
|
261
|
-
27,
|
|
233
|
+
description: ( localize(
|
|
234
|
+
4212,
|
|
262
235
|
"Contributes views to Remote container in the Activity bar. To contribute to this container, enableProposedApi needs to be turned on"
|
|
263
236
|
)),
|
|
264
237
|
type: 'array',
|
|
@@ -267,7 +240,7 @@ const viewsContribution = {
|
|
|
267
240
|
}
|
|
268
241
|
},
|
|
269
242
|
additionalProperties: {
|
|
270
|
-
description: (
|
|
243
|
+
description: ( localize(4213, "Contributes views to contributed views container")),
|
|
271
244
|
type: 'array',
|
|
272
245
|
items: viewDescriptor,
|
|
273
246
|
default: []
|
|
@@ -349,50 +322,37 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
349
322
|
}
|
|
350
323
|
isValidViewsContainer(viewsContainersDescriptors, collector) {
|
|
351
324
|
if (!Array.isArray(viewsContainersDescriptors)) {
|
|
352
|
-
collector.error((
|
|
325
|
+
collector.error(( localize(4214, "views containers must be an array")));
|
|
353
326
|
return false;
|
|
354
327
|
}
|
|
355
328
|
for (const descriptor of viewsContainersDescriptors) {
|
|
356
329
|
if (typeof descriptor.id !== 'string' && isFalsyOrWhitespace(descriptor.id)) {
|
|
357
|
-
collector.error((
|
|
358
|
-
|
|
359
|
-
30,
|
|
330
|
+
collector.error(( localize(
|
|
331
|
+
4215,
|
|
360
332
|
"property `{0}` is mandatory and must be of type `string` with non-empty value. Only alphanumeric characters, '_', and '-' are allowed.",
|
|
361
333
|
'id'
|
|
362
334
|
)));
|
|
363
335
|
return false;
|
|
364
336
|
}
|
|
365
337
|
if (!(/^[a-z0-9_-]+$/i.test(descriptor.id))) {
|
|
366
|
-
collector.error((
|
|
367
|
-
|
|
368
|
-
30,
|
|
338
|
+
collector.error(( localize(
|
|
339
|
+
4215,
|
|
369
340
|
"property `{0}` is mandatory and must be of type `string` with non-empty value. Only alphanumeric characters, '_', and '-' are allowed.",
|
|
370
341
|
'id'
|
|
371
342
|
)));
|
|
372
343
|
return false;
|
|
373
344
|
}
|
|
374
345
|
if (typeof descriptor.title !== 'string') {
|
|
375
|
-
collector.error((
|
|
376
|
-
_moduleId,
|
|
377
|
-
31,
|
|
378
|
-
"property `{0}` is mandatory and must be of type `string`",
|
|
379
|
-
'title'
|
|
380
|
-
)));
|
|
346
|
+
collector.error(( localize(4216, "property `{0}` is mandatory and must be of type `string`", 'title')));
|
|
381
347
|
return false;
|
|
382
348
|
}
|
|
383
349
|
if (typeof descriptor.icon !== 'string') {
|
|
384
|
-
collector.error((
|
|
385
|
-
_moduleId,
|
|
386
|
-
31,
|
|
387
|
-
"property `{0}` is mandatory and must be of type `string`",
|
|
388
|
-
'icon'
|
|
389
|
-
)));
|
|
350
|
+
collector.error(( localize(4216, "property `{0}` is mandatory and must be of type `string`", 'icon')));
|
|
390
351
|
return false;
|
|
391
352
|
}
|
|
392
353
|
if (isFalsyOrWhitespace(descriptor.title)) {
|
|
393
|
-
collector.warn((
|
|
394
|
-
|
|
395
|
-
32,
|
|
354
|
+
collector.warn(( localize(
|
|
355
|
+
4217,
|
|
396
356
|
"property `{0}` is mandatory and must be of type `string` with non-empty value",
|
|
397
357
|
'title'
|
|
398
358
|
)));
|
|
@@ -461,9 +421,8 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
461
421
|
return;
|
|
462
422
|
}
|
|
463
423
|
if (key === 'remote' && !isProposedApiEnabled(extension.description, 'contribViewsRemote')) {
|
|
464
|
-
collector.warn((
|
|
465
|
-
|
|
466
|
-
33,
|
|
424
|
+
collector.warn(( localize(
|
|
425
|
+
4218,
|
|
467
426
|
"View container '{0}' requires 'enabledApiProposals: [\"contribViewsRemote\"]' to be added to 'Remote'.",
|
|
468
427
|
key
|
|
469
428
|
)));
|
|
@@ -471,9 +430,8 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
471
430
|
}
|
|
472
431
|
const viewContainer = this.getViewContainer(key);
|
|
473
432
|
if (!viewContainer) {
|
|
474
|
-
collector.warn((
|
|
475
|
-
|
|
476
|
-
34,
|
|
433
|
+
collector.warn(( localize(
|
|
434
|
+
4219,
|
|
477
435
|
"View container '{0}' does not exist and all views registered to it will be added to 'Explorer'.",
|
|
478
436
|
key
|
|
479
437
|
)));
|
|
@@ -483,16 +441,11 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
483
441
|
for (let index = 0; index < value.length; index++) {
|
|
484
442
|
const item = value[index];
|
|
485
443
|
if (( (viewIds.has(item.id)))) {
|
|
486
|
-
collector.error((
|
|
487
|
-
_moduleId,
|
|
488
|
-
35,
|
|
489
|
-
"Cannot register multiple views with same id `{0}`",
|
|
490
|
-
item.id
|
|
491
|
-
)));
|
|
444
|
+
collector.error(( localize(4220, "Cannot register multiple views with same id `{0}`", item.id)));
|
|
492
445
|
continue;
|
|
493
446
|
}
|
|
494
447
|
if (this.viewsRegistry.getView(item.id) !== null) {
|
|
495
|
-
collector.error((
|
|
448
|
+
collector.error(( localize(4221, "A view with id `{0}` is already registered.", item.id)));
|
|
496
449
|
continue;
|
|
497
450
|
}
|
|
498
451
|
const order = ExtensionIdentifier.equals(extension.description.identifier, container.extensionId)
|
|
@@ -507,7 +460,7 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
507
460
|
const initialVisibility = this.convertInitialVisibility(item.visibility);
|
|
508
461
|
const type = this.getViewType(item.type);
|
|
509
462
|
if (!type) {
|
|
510
|
-
collector.error((
|
|
463
|
+
collector.error(( localize(4222, "Unknown view type `{0}`.", item.type)));
|
|
511
464
|
continue;
|
|
512
465
|
}
|
|
513
466
|
let weight = undefined;
|
|
@@ -589,59 +542,37 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
589
542
|
}
|
|
590
543
|
isValidViewDescriptors(viewDescriptors, collector) {
|
|
591
544
|
if (!Array.isArray(viewDescriptors)) {
|
|
592
|
-
collector.error((
|
|
545
|
+
collector.error(( localize(4223, "views must be an array")));
|
|
593
546
|
return false;
|
|
594
547
|
}
|
|
595
548
|
for (const descriptor of viewDescriptors) {
|
|
596
549
|
if (typeof descriptor.id !== 'string') {
|
|
597
|
-
collector.error((
|
|
598
|
-
_moduleId,
|
|
599
|
-
31,
|
|
600
|
-
"property `{0}` is mandatory and must be of type `string`",
|
|
601
|
-
'id'
|
|
602
|
-
)));
|
|
550
|
+
collector.error(( localize(4223, "property `{0}` is mandatory and must be of type `string`", 'id')));
|
|
603
551
|
return false;
|
|
604
552
|
}
|
|
605
553
|
if (typeof descriptor.name !== 'string') {
|
|
606
|
-
collector.error((
|
|
607
|
-
_moduleId,
|
|
608
|
-
31,
|
|
609
|
-
"property `{0}` is mandatory and must be of type `string`",
|
|
610
|
-
'name'
|
|
611
|
-
)));
|
|
554
|
+
collector.error(( localize(4223, "property `{0}` is mandatory and must be of type `string`", 'name')));
|
|
612
555
|
return false;
|
|
613
556
|
}
|
|
614
557
|
if (descriptor.when && typeof descriptor.when !== 'string') {
|
|
615
|
-
collector.error((
|
|
616
|
-
_moduleId,
|
|
617
|
-
39,
|
|
618
|
-
"property `{0}` can be omitted or must be of type `string`",
|
|
619
|
-
'when'
|
|
620
|
-
)));
|
|
558
|
+
collector.error(( localize(4224, "property `{0}` can be omitted or must be of type `string`", 'when')));
|
|
621
559
|
return false;
|
|
622
560
|
}
|
|
623
561
|
if (descriptor.icon && typeof descriptor.icon !== 'string') {
|
|
624
|
-
collector.error((
|
|
625
|
-
_moduleId,
|
|
626
|
-
39,
|
|
627
|
-
"property `{0}` can be omitted or must be of type `string`",
|
|
628
|
-
'icon'
|
|
629
|
-
)));
|
|
562
|
+
collector.error(( localize(4224, "property `{0}` can be omitted or must be of type `string`", 'icon')));
|
|
630
563
|
return false;
|
|
631
564
|
}
|
|
632
565
|
if (descriptor.contextualTitle && typeof descriptor.contextualTitle !== 'string') {
|
|
633
|
-
collector.error((
|
|
634
|
-
|
|
635
|
-
39,
|
|
566
|
+
collector.error(( localize(
|
|
567
|
+
4224,
|
|
636
568
|
"property `{0}` can be omitted or must be of type `string`",
|
|
637
569
|
'contextualTitle'
|
|
638
570
|
)));
|
|
639
571
|
return false;
|
|
640
572
|
}
|
|
641
573
|
if (descriptor.visibility && !this.convertInitialVisibility(descriptor.visibility)) {
|
|
642
|
-
collector.error((
|
|
643
|
-
|
|
644
|
-
40,
|
|
574
|
+
collector.error(( localize(
|
|
575
|
+
4225,
|
|
645
576
|
"property `{0}` can be omitted or must be one of {1}",
|
|
646
577
|
'visibility',
|
|
647
578
|
( (Object.values(InitialVisibility))).join(', ')
|
|
@@ -693,9 +624,9 @@ class ViewContainersDataRenderer extends Disposable {
|
|
|
693
624
|
return { data: { headers: [], rows: [] }, dispose: () => { } };
|
|
694
625
|
}
|
|
695
626
|
const headers = [
|
|
696
|
-
(
|
|
697
|
-
(
|
|
698
|
-
(
|
|
627
|
+
( localize(4226, "ID")),
|
|
628
|
+
( localize(4227, "Title")),
|
|
629
|
+
( localize(4228, "Where")),
|
|
699
630
|
];
|
|
700
631
|
const rows = ( (viewContainers
|
|
701
632
|
.sort((a, b) => a.id.localeCompare(b.id))
|
|
@@ -734,9 +665,9 @@ class ViewsDataRenderer extends Disposable {
|
|
|
734
665
|
return { data: { headers: [], rows: [] }, dispose: () => { } };
|
|
735
666
|
}
|
|
736
667
|
const headers = [
|
|
737
|
-
(
|
|
738
|
-
(
|
|
739
|
-
(
|
|
668
|
+
( localize(4229, "ID")),
|
|
669
|
+
( localize(4230, "Name")),
|
|
670
|
+
( localize(4230, "Where")),
|
|
740
671
|
];
|
|
741
672
|
const rows = ( (views
|
|
742
673
|
.sort((a, b) => a.id.localeCompare(b.id))
|
|
@@ -758,7 +689,7 @@ class ViewsDataRenderer extends Disposable {
|
|
|
758
689
|
}
|
|
759
690
|
( (Registry.as(Extensions$2.ExtensionFeaturesRegistry))).registerExtensionFeature({
|
|
760
691
|
id: 'viewsContainers',
|
|
761
|
-
label: (
|
|
692
|
+
label: ( localize(4231, "View Containers")),
|
|
762
693
|
access: {
|
|
763
694
|
canToggle: false
|
|
764
695
|
},
|
|
@@ -766,7 +697,7 @@ class ViewsDataRenderer extends Disposable {
|
|
|
766
697
|
});
|
|
767
698
|
( (Registry.as(Extensions$2.ExtensionFeaturesRegistry))).registerExtensionFeature({
|
|
768
699
|
id: 'views',
|
|
769
|
-
label: (
|
|
700
|
+
label: ( localize(4232, "Views")),
|
|
770
701
|
access: {
|
|
771
702
|
canToggle: false
|
|
772
703
|
},
|
|
@@ -15,10 +15,9 @@ import { AbstractTree, TreeFindMode, TreeFindMatchType } from 'vscode/vscode/vs/
|
|
|
15
15
|
import { isActiveElement } from 'vscode/vscode/vs/base/browser/dom';
|
|
16
16
|
import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
17
17
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
18
|
-
import {
|
|
18
|
+
import { localize2, localize } from 'vscode/vscode/vs/nls';
|
|
19
19
|
import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover.service';
|
|
20
20
|
|
|
21
|
-
const _moduleId = "vs/workbench/browser/actions/listCommands";
|
|
22
21
|
function ensureDOMFocus(widget) {
|
|
23
22
|
const element = widget?.getHTMLElement();
|
|
24
23
|
if (element && !isActiveElement(element)) {
|
|
@@ -788,13 +787,12 @@ registerAction2(class ToggleStickyScroll extends Action2 {
|
|
|
788
787
|
super({
|
|
789
788
|
id: 'tree.toggleStickyScroll',
|
|
790
789
|
title: {
|
|
791
|
-
...(
|
|
792
|
-
mnemonicTitle: (
|
|
790
|
+
...( localize2(4182, "Toggle Tree Sticky Scroll")),
|
|
791
|
+
mnemonicTitle: ( localize(4183, "&&Toggle Tree Sticky Scroll")),
|
|
793
792
|
},
|
|
794
793
|
category: 'View',
|
|
795
|
-
metadata: { description: (
|
|
796
|
-
|
|
797
|
-
2,
|
|
794
|
+
metadata: { description: ( localize(
|
|
795
|
+
4184,
|
|
798
796
|
"Toggles Sticky Scroll widget at the top of tree structures such as the File Explorer and Debug variables View."
|
|
799
797
|
)) },
|
|
800
798
|
f1: true
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { localize2 } from 'vscode/vscode/vs/nls';
|
|
2
2
|
import { GroupLocation, GroupDirection } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService';
|
|
3
3
|
import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
4
4
|
import { Parts } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
@@ -14,7 +14,6 @@ import { KeybindingWeight } from 'vscode/vscode/vs/platform/keybinding/common/ke
|
|
|
14
14
|
import { getActiveWindow } from 'vscode/vscode/vs/base/browser/dom';
|
|
15
15
|
import { isAuxiliaryWindow } from 'vscode/vscode/vs/base/browser/window';
|
|
16
16
|
|
|
17
|
-
const _moduleId = "vs/workbench/browser/actions/navigationActions";
|
|
18
17
|
class BaseNavigationAction extends Action2 {
|
|
19
18
|
constructor(options, direction) {
|
|
20
19
|
super(options);
|
|
@@ -149,7 +148,7 @@ registerAction2(class extends BaseNavigationAction {
|
|
|
149
148
|
constructor() {
|
|
150
149
|
super({
|
|
151
150
|
id: 'workbench.action.navigateLeft',
|
|
152
|
-
title: (
|
|
151
|
+
title: ( localize2(4400, 'Navigate to the View on the Left')),
|
|
153
152
|
category: Categories.View,
|
|
154
153
|
f1: true
|
|
155
154
|
}, Direction.Left);
|
|
@@ -159,7 +158,7 @@ registerAction2(class extends BaseNavigationAction {
|
|
|
159
158
|
constructor() {
|
|
160
159
|
super({
|
|
161
160
|
id: 'workbench.action.navigateRight',
|
|
162
|
-
title: (
|
|
161
|
+
title: ( localize2(4401, 'Navigate to the View on the Right')),
|
|
163
162
|
category: Categories.View,
|
|
164
163
|
f1: true
|
|
165
164
|
}, Direction.Right);
|
|
@@ -169,7 +168,7 @@ registerAction2(class extends BaseNavigationAction {
|
|
|
169
168
|
constructor() {
|
|
170
169
|
super({
|
|
171
170
|
id: 'workbench.action.navigateUp',
|
|
172
|
-
title: (
|
|
171
|
+
title: ( localize2(4402, 'Navigate to the View Above')),
|
|
173
172
|
category: Categories.View,
|
|
174
173
|
f1: true
|
|
175
174
|
}, Direction.Up);
|
|
@@ -179,7 +178,7 @@ registerAction2(class extends BaseNavigationAction {
|
|
|
179
178
|
constructor() {
|
|
180
179
|
super({
|
|
181
180
|
id: 'workbench.action.navigateDown',
|
|
182
|
-
title: (
|
|
181
|
+
title: ( localize2(4403, 'Navigate to the View Below')),
|
|
183
182
|
category: Categories.View,
|
|
184
183
|
f1: true
|
|
185
184
|
}, Direction.Down);
|
|
@@ -264,7 +263,7 @@ registerAction2(class extends BaseFocusAction {
|
|
|
264
263
|
constructor() {
|
|
265
264
|
super({
|
|
266
265
|
id: 'workbench.action.focusNextPart',
|
|
267
|
-
title: (
|
|
266
|
+
title: ( localize2(4404, 'Focus Next Part')),
|
|
268
267
|
category: Categories.View,
|
|
269
268
|
f1: true,
|
|
270
269
|
keybinding: {
|
|
@@ -278,7 +277,7 @@ registerAction2(class extends BaseFocusAction {
|
|
|
278
277
|
constructor() {
|
|
279
278
|
super({
|
|
280
279
|
id: 'workbench.action.focusPreviousPart',
|
|
281
|
-
title: (
|
|
280
|
+
title: ( localize2(4405, 'Focus Previous Part')),
|
|
282
281
|
category: Categories.View,
|
|
283
282
|
f1: true,
|
|
284
283
|
keybinding: {
|