@codingame/monaco-vscode-view-common-service-override 4.5.1 → 5.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/package.json +3 -3
- package/viewCommon.js +3 -6
- package/vscode/src/vs/base/browser/ui/grid/grid.js +12 -12
- package/vscode/src/vs/base/browser/ui/grid/gridview.js +26 -26
- package/vscode/src/vs/platform/languagePacks/common/localizedStrings.js +4 -3
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +142 -221
- package/vscode/src/vs/workbench/browser/actions/listCommands.js +49 -45
- package/vscode/src/vs/workbench/browser/actions/navigationActions.js +7 -30
- package/vscode/src/vs/workbench/browser/media/style.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +67 -138
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +25 -38
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/media/auxiliaryBarPart.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/compositeBar.js +26 -27
- package/vscode/src/vs/workbench/browser/parts/compositePart.js +20 -34
- package/vscode/src/vs/workbench/browser/parts/editor/auxiliaryEditorPart.js +7 -4
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +216 -765
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +27 -42
- package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +24 -23
- package/vscode/src/vs/workbench/browser/parts/editor/editorPart.js +54 -19
- package/vscode/src/vs/workbench/browser/parts/editor/editorParts.js +122 -72
- package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.js +51 -54
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +44 -44
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +25 -26
- 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 -5
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +22 -22
- package/vscode/src/vs/workbench/browser/window.js +41 -92
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +41 -78
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +23 -46
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +36 -27
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +14 -15
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +10 -11
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +25 -52
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +59 -88
- package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +18 -48
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +61 -150
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.js +15 -70
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +9 -20
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.js +14 -65
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/conflictActions.js +39 -113
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editorGutter.js +1 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +13 -19
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.js +1 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +35 -75
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +16 -37
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +41 -43
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.js +6 -5
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +13 -11
- package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +24 -61
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js +7 -6
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +37 -70
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +23 -46
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +26 -27
- package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.js +2 -2
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +50 -52
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindWidget.js +5 -3
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +18 -34
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +7 -10
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +13 -11
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewService.js +2 -2
- package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +79 -49
- package/vscode/src/vs/workbench/services/driver/browser/driver.js +9 -7
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +45 -68
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +95 -98
- package/vscode/src/vs/workbench/services/progress/browser/progressService.js +34 -74
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +69 -67
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +52 -47
|
@@ -31,31 +31,29 @@ import { ITreeViewsService } from 'vscode/vscode/vs/workbench/services/views/bro
|
|
|
31
31
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
32
32
|
import { Extensions as Extensions$2 } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionFeatures';
|
|
33
33
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
34
|
+
import { MarkdownString } from 'vscode/vscode/vs/base/common/htmlContent';
|
|
34
35
|
|
|
36
|
+
const _moduleId = "vs/workbench/api/browser/viewsExtensionPoint";
|
|
35
37
|
const viewsContainerSchema = {
|
|
36
38
|
type: 'object',
|
|
37
39
|
properties: {
|
|
38
40
|
id: {
|
|
39
41
|
description: ( localizeWithPath(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
_moduleId,
|
|
43
|
+
0,
|
|
42
44
|
"Unique id used to identify the container in which views can be contributed using 'views' contribution point"
|
|
43
45
|
)),
|
|
44
46
|
type: 'string',
|
|
45
47
|
pattern: '^[a-zA-Z0-9_-]+$'
|
|
46
48
|
},
|
|
47
49
|
title: {
|
|
48
|
-
description: ( localizeWithPath(
|
|
49
|
-
'vs/workbench/api/browser/viewsExtensionPoint',
|
|
50
|
-
'vscode.extension.contributes.views.containers.title',
|
|
51
|
-
'Human readable string used to render the container'
|
|
52
|
-
)),
|
|
50
|
+
description: ( localizeWithPath(_moduleId, 1, 'Human readable string used to render the container')),
|
|
53
51
|
type: 'string'
|
|
54
52
|
},
|
|
55
53
|
icon: {
|
|
56
54
|
description: ( localizeWithPath(
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
_moduleId,
|
|
56
|
+
2,
|
|
59
57
|
"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."
|
|
60
58
|
)),
|
|
61
59
|
type: 'string'
|
|
@@ -64,44 +62,32 @@ const viewsContainerSchema = {
|
|
|
64
62
|
required: ['id', 'title', 'icon']
|
|
65
63
|
};
|
|
66
64
|
const viewsContainersContribution = {
|
|
67
|
-
description: ( localizeWithPath(
|
|
68
|
-
'vs/workbench/api/browser/viewsExtensionPoint',
|
|
69
|
-
'vscode.extension.contributes.viewsContainers',
|
|
70
|
-
'Contributes views containers to the editor'
|
|
71
|
-
)),
|
|
65
|
+
description: ( localizeWithPath(_moduleId, 3, 'Contributes views containers to the editor')),
|
|
72
66
|
type: 'object',
|
|
73
67
|
properties: {
|
|
74
68
|
'activitybar': {
|
|
75
|
-
description: ( localizeWithPath(
|
|
76
|
-
'vs/workbench/api/browser/viewsExtensionPoint',
|
|
77
|
-
'views.container.activitybar',
|
|
78
|
-
"Contribute views containers to Activity Bar"
|
|
79
|
-
)),
|
|
69
|
+
description: ( localizeWithPath(_moduleId, 4, "Contribute views containers to Activity Bar")),
|
|
80
70
|
type: 'array',
|
|
81
71
|
items: viewsContainerSchema
|
|
82
72
|
},
|
|
83
73
|
'panel': {
|
|
84
|
-
description: ( localizeWithPath(
|
|
85
|
-
'vs/workbench/api/browser/viewsExtensionPoint',
|
|
86
|
-
'views.container.panel',
|
|
87
|
-
"Contribute views containers to Panel"
|
|
88
|
-
)),
|
|
74
|
+
description: ( localizeWithPath(_moduleId, 5, "Contribute views containers to Panel")),
|
|
89
75
|
type: 'array',
|
|
90
76
|
items: viewsContainerSchema
|
|
91
77
|
}
|
|
92
78
|
}
|
|
93
79
|
};
|
|
94
80
|
var ViewType;
|
|
95
|
-
( (function(ViewType) {
|
|
81
|
+
( ((function(ViewType) {
|
|
96
82
|
ViewType["Tree"] = "tree";
|
|
97
83
|
ViewType["Webview"] = "webview";
|
|
98
|
-
})(ViewType || (ViewType = {})));
|
|
84
|
+
})(ViewType || (ViewType = {}))));
|
|
99
85
|
var InitialVisibility;
|
|
100
|
-
( (function(InitialVisibility) {
|
|
86
|
+
( ((function(InitialVisibility) {
|
|
101
87
|
InitialVisibility["Visible"] = "visible";
|
|
102
88
|
InitialVisibility["Hidden"] = "hidden";
|
|
103
89
|
InitialVisibility["Collapsed"] = "collapsed";
|
|
104
|
-
})(InitialVisibility || (InitialVisibility = {})));
|
|
90
|
+
})(InitialVisibility || (InitialVisibility = {}))));
|
|
105
91
|
const viewDescriptor = {
|
|
106
92
|
type: 'object',
|
|
107
93
|
required: ['id', 'name'],
|
|
@@ -109,8 +95,8 @@ const viewDescriptor = {
|
|
|
109
95
|
properties: {
|
|
110
96
|
type: {
|
|
111
97
|
markdownDescription: ( localizeWithPath(
|
|
112
|
-
|
|
113
|
-
|
|
98
|
+
_moduleId,
|
|
99
|
+
6,
|
|
114
100
|
"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`."
|
|
115
101
|
)),
|
|
116
102
|
type: 'string',
|
|
@@ -120,61 +106,53 @@ const viewDescriptor = {
|
|
|
120
106
|
],
|
|
121
107
|
markdownEnumDescriptions: [
|
|
122
108
|
( localizeWithPath(
|
|
123
|
-
|
|
124
|
-
|
|
109
|
+
_moduleId,
|
|
110
|
+
7,
|
|
125
111
|
"The view is backed by a `TreeView` created by `createTreeView`."
|
|
126
112
|
)),
|
|
127
113
|
( localizeWithPath(
|
|
128
|
-
|
|
129
|
-
|
|
114
|
+
_moduleId,
|
|
115
|
+
8,
|
|
130
116
|
"The view is backed by a `WebviewView` registered by `registerWebviewViewProvider`."
|
|
131
117
|
)),
|
|
132
118
|
]
|
|
133
119
|
},
|
|
134
120
|
id: {
|
|
135
121
|
markdownDescription: ( localizeWithPath(
|
|
136
|
-
|
|
137
|
-
|
|
122
|
+
_moduleId,
|
|
123
|
+
9,
|
|
138
124
|
'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`.'
|
|
139
125
|
)),
|
|
140
126
|
type: 'string'
|
|
141
127
|
},
|
|
142
128
|
name: {
|
|
143
|
-
description: ( localizeWithPath(
|
|
144
|
-
'vs/workbench/api/browser/viewsExtensionPoint',
|
|
145
|
-
'vscode.extension.contributes.view.name',
|
|
146
|
-
'The human-readable name of the view. Will be shown'
|
|
147
|
-
)),
|
|
129
|
+
description: ( localizeWithPath(_moduleId, 10, 'The human-readable name of the view. Will be shown')),
|
|
148
130
|
type: 'string'
|
|
149
131
|
},
|
|
150
132
|
when: {
|
|
151
|
-
description: ( localizeWithPath(
|
|
152
|
-
'vs/workbench/api/browser/viewsExtensionPoint',
|
|
153
|
-
'vscode.extension.contributes.view.when',
|
|
154
|
-
'Condition which must be true to show this view'
|
|
155
|
-
)),
|
|
133
|
+
description: ( localizeWithPath(_moduleId, 11, 'Condition which must be true to show this view')),
|
|
156
134
|
type: 'string'
|
|
157
135
|
},
|
|
158
136
|
icon: {
|
|
159
137
|
description: ( localizeWithPath(
|
|
160
|
-
|
|
161
|
-
|
|
138
|
+
_moduleId,
|
|
139
|
+
12,
|
|
162
140
|
"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."
|
|
163
141
|
)),
|
|
164
142
|
type: 'string'
|
|
165
143
|
},
|
|
166
144
|
contextualTitle: {
|
|
167
145
|
description: ( localizeWithPath(
|
|
168
|
-
|
|
169
|
-
|
|
146
|
+
_moduleId,
|
|
147
|
+
13,
|
|
170
148
|
"Human-readable context for when the view is moved out of its original location. By default, the view's container name will be used."
|
|
171
149
|
)),
|
|
172
150
|
type: 'string'
|
|
173
151
|
},
|
|
174
152
|
visibility: {
|
|
175
153
|
description: ( localizeWithPath(
|
|
176
|
-
|
|
177
|
-
|
|
154
|
+
_moduleId,
|
|
155
|
+
14,
|
|
178
156
|
"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."
|
|
179
157
|
)),
|
|
180
158
|
type: 'string',
|
|
@@ -186,18 +164,18 @@ const viewDescriptor = {
|
|
|
186
164
|
default: 'visible',
|
|
187
165
|
enumDescriptions: [
|
|
188
166
|
( localizeWithPath(
|
|
189
|
-
|
|
190
|
-
|
|
167
|
+
_moduleId,
|
|
168
|
+
15,
|
|
191
169
|
"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`."
|
|
192
170
|
)),
|
|
193
171
|
( localizeWithPath(
|
|
194
|
-
|
|
195
|
-
|
|
172
|
+
_moduleId,
|
|
173
|
+
16,
|
|
196
174
|
"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."
|
|
197
175
|
)),
|
|
198
176
|
( localizeWithPath(
|
|
199
|
-
|
|
200
|
-
|
|
177
|
+
_moduleId,
|
|
178
|
+
17,
|
|
201
179
|
"The view will show in the view container, but will be collapsed."
|
|
202
180
|
))
|
|
203
181
|
]
|
|
@@ -205,10 +183,18 @@ const viewDescriptor = {
|
|
|
205
183
|
initialSize: {
|
|
206
184
|
type: 'number',
|
|
207
185
|
description: ( localizeWithPath(
|
|
208
|
-
|
|
209
|
-
|
|
186
|
+
_moduleId,
|
|
187
|
+
18,
|
|
210
188
|
"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."
|
|
211
189
|
)),
|
|
190
|
+
},
|
|
191
|
+
accessibilityHelpContent: {
|
|
192
|
+
type: 'string',
|
|
193
|
+
markdownDescription: ( localizeWithPath(
|
|
194
|
+
_moduleId,
|
|
195
|
+
19,
|
|
196
|
+
"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 with a link to configure one."
|
|
197
|
+
))
|
|
212
198
|
}
|
|
213
199
|
}
|
|
214
200
|
};
|
|
@@ -218,42 +204,26 @@ const remoteViewDescriptor = {
|
|
|
218
204
|
properties: {
|
|
219
205
|
id: {
|
|
220
206
|
description: ( localizeWithPath(
|
|
221
|
-
|
|
222
|
-
|
|
207
|
+
_moduleId,
|
|
208
|
+
9,
|
|
223
209
|
'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`.'
|
|
224
210
|
)),
|
|
225
211
|
type: 'string'
|
|
226
212
|
},
|
|
227
213
|
name: {
|
|
228
|
-
description: ( localizeWithPath(
|
|
229
|
-
'vs/workbench/api/browser/viewsExtensionPoint',
|
|
230
|
-
'vscode.extension.contributes.view.name',
|
|
231
|
-
'The human-readable name of the view. Will be shown'
|
|
232
|
-
)),
|
|
214
|
+
description: ( localizeWithPath(_moduleId, 10, 'The human-readable name of the view. Will be shown')),
|
|
233
215
|
type: 'string'
|
|
234
216
|
},
|
|
235
217
|
when: {
|
|
236
|
-
description: ( localizeWithPath(
|
|
237
|
-
'vs/workbench/api/browser/viewsExtensionPoint',
|
|
238
|
-
'vscode.extension.contributes.view.when',
|
|
239
|
-
'Condition which must be true to show this view'
|
|
240
|
-
)),
|
|
218
|
+
description: ( localizeWithPath(_moduleId, 11, 'Condition which must be true to show this view')),
|
|
241
219
|
type: 'string'
|
|
242
220
|
},
|
|
243
221
|
group: {
|
|
244
|
-
description: ( localizeWithPath(
|
|
245
|
-
'vs/workbench/api/browser/viewsExtensionPoint',
|
|
246
|
-
'vscode.extension.contributes.view.group',
|
|
247
|
-
'Nested group in the viewlet'
|
|
248
|
-
)),
|
|
222
|
+
description: ( localizeWithPath(_moduleId, 20, 'Nested group in the viewlet')),
|
|
249
223
|
type: 'string'
|
|
250
224
|
},
|
|
251
225
|
remoteName: {
|
|
252
|
-
description: ( localizeWithPath(
|
|
253
|
-
'vs/workbench/api/browser/viewsExtensionPoint',
|
|
254
|
-
'vscode.extension.contributes.view.remoteName',
|
|
255
|
-
'The name of the remote type associated with this view'
|
|
256
|
-
)),
|
|
226
|
+
description: ( localizeWithPath(_moduleId, 21, 'The name of the remote type associated with this view')),
|
|
257
227
|
type: ['string', 'array'],
|
|
258
228
|
items: {
|
|
259
229
|
type: 'string'
|
|
@@ -262,17 +232,13 @@ const remoteViewDescriptor = {
|
|
|
262
232
|
}
|
|
263
233
|
};
|
|
264
234
|
const viewsContribution = {
|
|
265
|
-
description: ( localizeWithPath(
|
|
266
|
-
'vs/workbench/api/browser/viewsExtensionPoint',
|
|
267
|
-
'vscode.extension.contributes.views',
|
|
268
|
-
"Contributes views to the editor"
|
|
269
|
-
)),
|
|
235
|
+
description: ( localizeWithPath(_moduleId, 22, "Contributes views to the editor")),
|
|
270
236
|
type: 'object',
|
|
271
237
|
properties: {
|
|
272
238
|
'explorer': {
|
|
273
239
|
description: ( localizeWithPath(
|
|
274
|
-
|
|
275
|
-
|
|
240
|
+
_moduleId,
|
|
241
|
+
23,
|
|
276
242
|
"Contributes views to Explorer container in the Activity bar"
|
|
277
243
|
)),
|
|
278
244
|
type: 'array',
|
|
@@ -280,39 +246,27 @@ const viewsContribution = {
|
|
|
280
246
|
default: []
|
|
281
247
|
},
|
|
282
248
|
'debug': {
|
|
283
|
-
description: ( localizeWithPath(
|
|
284
|
-
'vs/workbench/api/browser/viewsExtensionPoint',
|
|
285
|
-
'views.debug',
|
|
286
|
-
"Contributes views to Debug container in the Activity bar"
|
|
287
|
-
)),
|
|
249
|
+
description: ( localizeWithPath(_moduleId, 24, "Contributes views to Debug container in the Activity bar")),
|
|
288
250
|
type: 'array',
|
|
289
251
|
items: viewDescriptor,
|
|
290
252
|
default: []
|
|
291
253
|
},
|
|
292
254
|
'scm': {
|
|
293
|
-
description: ( localizeWithPath(
|
|
294
|
-
'vs/workbench/api/browser/viewsExtensionPoint',
|
|
295
|
-
'views.scm',
|
|
296
|
-
"Contributes views to SCM container in the Activity bar"
|
|
297
|
-
)),
|
|
255
|
+
description: ( localizeWithPath(_moduleId, 25, "Contributes views to SCM container in the Activity bar")),
|
|
298
256
|
type: 'array',
|
|
299
257
|
items: viewDescriptor,
|
|
300
258
|
default: []
|
|
301
259
|
},
|
|
302
260
|
'test': {
|
|
303
|
-
description: ( localizeWithPath(
|
|
304
|
-
'vs/workbench/api/browser/viewsExtensionPoint',
|
|
305
|
-
'views.test',
|
|
306
|
-
"Contributes views to Test container in the Activity bar"
|
|
307
|
-
)),
|
|
261
|
+
description: ( localizeWithPath(_moduleId, 26, "Contributes views to Test container in the Activity bar")),
|
|
308
262
|
type: 'array',
|
|
309
263
|
items: viewDescriptor,
|
|
310
264
|
default: []
|
|
311
265
|
},
|
|
312
266
|
'remote': {
|
|
313
267
|
description: ( localizeWithPath(
|
|
314
|
-
|
|
315
|
-
|
|
268
|
+
_moduleId,
|
|
269
|
+
27,
|
|
316
270
|
"Contributes views to Remote container in the Activity bar. To contribute to this container, enableProposedApi needs to be turned on"
|
|
317
271
|
)),
|
|
318
272
|
type: 'array',
|
|
@@ -321,11 +275,7 @@ const viewsContribution = {
|
|
|
321
275
|
}
|
|
322
276
|
},
|
|
323
277
|
additionalProperties: {
|
|
324
|
-
description: ( localizeWithPath(
|
|
325
|
-
'vs/workbench/api/browser/viewsExtensionPoint',
|
|
326
|
-
'views.contributed',
|
|
327
|
-
"Contributes views to contributed views container"
|
|
328
|
-
)),
|
|
278
|
+
description: ( localizeWithPath(_moduleId, 28, "Contributes views to contributed views container")),
|
|
329
279
|
type: 'array',
|
|
330
280
|
items: viewDescriptor,
|
|
331
281
|
default: []
|
|
@@ -341,7 +291,7 @@ const viewsExtensionPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
|
341
291
|
jsonSchema: viewsContribution,
|
|
342
292
|
activationEventsGenerator: (viewExtensionPointTypeArray, result) => {
|
|
343
293
|
for (const viewExtensionPointType of viewExtensionPointTypeArray) {
|
|
344
|
-
for (const viewDescriptors of ( Object.values(viewExtensionPointType))) {
|
|
294
|
+
for (const viewDescriptors of ( (Object.values(viewExtensionPointType)))) {
|
|
345
295
|
for (const viewDescriptor of viewDescriptors) {
|
|
346
296
|
if (viewDescriptor.id) {
|
|
347
297
|
result.push(`onView:${viewDescriptor.id}`);
|
|
@@ -357,16 +307,16 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
357
307
|
constructor(instantiationService, logService) {
|
|
358
308
|
this.instantiationService = instantiationService;
|
|
359
309
|
this.logService = logService;
|
|
360
|
-
this.viewContainersRegistry = ( Registry.as(Extensions.ViewContainersRegistry));
|
|
361
|
-
this.viewsRegistry = ( Registry.as(Extensions.ViewsRegistry));
|
|
310
|
+
this.viewContainersRegistry = ( (Registry.as(Extensions.ViewContainersRegistry)));
|
|
311
|
+
this.viewsRegistry = ( (Registry.as(Extensions.ViewsRegistry)));
|
|
362
312
|
this.handleAndRegisterCustomViewContainers();
|
|
363
313
|
this.handleAndRegisterCustomViews();
|
|
364
|
-
let showTreeHoverCancellation = ( new CancellationTokenSource());
|
|
314
|
+
let showTreeHoverCancellation = ( (new CancellationTokenSource()));
|
|
365
315
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
366
316
|
id: 'workbench.action.showTreeHover',
|
|
367
317
|
handler: async (accessor, ...args) => {
|
|
368
318
|
showTreeHoverCancellation.cancel();
|
|
369
|
-
showTreeHoverCancellation = ( new CancellationTokenSource());
|
|
319
|
+
showTreeHoverCancellation = ( (new CancellationTokenSource()));
|
|
370
320
|
const listService = accessor.get(IListService);
|
|
371
321
|
const treeViewsService = accessor.get(ITreeViewsService);
|
|
372
322
|
const hoverService = accessor.get(IHoverService);
|
|
@@ -402,7 +352,7 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
402
352
|
},
|
|
403
353
|
weight: 200 ,
|
|
404
354
|
primary: KeyChord(2048 | 41 , 2048 | 39 ),
|
|
405
|
-
when: ( ContextKeyExpr.and(RawCustomTreeViewContextKey, WorkbenchListFocusContextKey))
|
|
355
|
+
when: ( (ContextKeyExpr.and(RawCustomTreeViewContextKey, WorkbenchListFocusContextKey)))
|
|
406
356
|
});
|
|
407
357
|
}
|
|
408
358
|
handleAndRegisterCustomViewContainers() {
|
|
@@ -416,7 +366,7 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
416
366
|
});
|
|
417
367
|
}
|
|
418
368
|
addCustomViewContainers(extensionPoints, existingViewContainers) {
|
|
419
|
-
const viewContainersRegistry = ( Registry.as(Extensions.ViewContainersRegistry));
|
|
369
|
+
const viewContainersRegistry = ( (Registry.as(Extensions.ViewContainersRegistry)));
|
|
420
370
|
let activityBarOrder = CUSTOM_VIEWS_START_ORDER + viewContainersRegistry.all.filter(v => !!v.extensionId && viewContainersRegistry.getViewContainerLocation(v) === 0 ).length;
|
|
421
371
|
let panelOrder = 5 + viewContainersRegistry.all.filter(v => !!v.extensionId && viewContainersRegistry.getViewContainerLocation(v) === 1 ).length + 1;
|
|
422
372
|
for (const { value, collector, description } of extensionPoints) {
|
|
@@ -436,10 +386,10 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
436
386
|
}
|
|
437
387
|
}
|
|
438
388
|
removeCustomViewContainers(extensionPoints) {
|
|
439
|
-
const viewContainersRegistry = ( Registry.as(Extensions.ViewContainersRegistry));
|
|
440
|
-
const removedExtensions = extensionPoints.reduce((result, e) => { result.add(e.description.identifier); return result; }, ( new ExtensionIdentifierSet()));
|
|
389
|
+
const viewContainersRegistry = ( (Registry.as(Extensions.ViewContainersRegistry)));
|
|
390
|
+
const removedExtensions = extensionPoints.reduce((result, e) => { result.add(e.description.identifier); return result; }, ( (new ExtensionIdentifierSet())));
|
|
441
391
|
for (const viewContainer of viewContainersRegistry.all) {
|
|
442
|
-
if (viewContainer.extensionId && ( removedExtensions.has(viewContainer.extensionId))) {
|
|
392
|
+
if (viewContainer.extensionId && ( (removedExtensions.has(viewContainer.extensionId)))) {
|
|
443
393
|
const views = this.viewsRegistry.getViews(viewContainer);
|
|
444
394
|
if (views.length) {
|
|
445
395
|
this.viewsRegistry.moveViews(views, this.getDefaultViewContainer());
|
|
@@ -450,18 +400,14 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
450
400
|
}
|
|
451
401
|
isValidViewsContainer(viewsContainersDescriptors, collector) {
|
|
452
402
|
if (!Array.isArray(viewsContainersDescriptors)) {
|
|
453
|
-
collector.error(( localizeWithPath(
|
|
454
|
-
'vs/workbench/api/browser/viewsExtensionPoint',
|
|
455
|
-
'viewcontainer requirearray',
|
|
456
|
-
"views containers must be an array"
|
|
457
|
-
)));
|
|
403
|
+
collector.error(( localizeWithPath(_moduleId, 29, "views containers must be an array")));
|
|
458
404
|
return false;
|
|
459
405
|
}
|
|
460
406
|
for (const descriptor of viewsContainersDescriptors) {
|
|
461
407
|
if (typeof descriptor.id !== 'string' && isFalsyOrWhitespace(descriptor.id)) {
|
|
462
408
|
collector.error(( localizeWithPath(
|
|
463
|
-
|
|
464
|
-
|
|
409
|
+
_moduleId,
|
|
410
|
+
30,
|
|
465
411
|
"property `{0}` is mandatory and must be of type `string` with non-empty value. Only alphanumeric characters, '_', and '-' are allowed.",
|
|
466
412
|
'id'
|
|
467
413
|
)));
|
|
@@ -469,8 +415,8 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
469
415
|
}
|
|
470
416
|
if (!(/^[a-z0-9_-]+$/i.test(descriptor.id))) {
|
|
471
417
|
collector.error(( localizeWithPath(
|
|
472
|
-
|
|
473
|
-
|
|
418
|
+
_moduleId,
|
|
419
|
+
30,
|
|
474
420
|
"property `{0}` is mandatory and must be of type `string` with non-empty value. Only alphanumeric characters, '_', and '-' are allowed.",
|
|
475
421
|
'id'
|
|
476
422
|
)));
|
|
@@ -478,8 +424,8 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
478
424
|
}
|
|
479
425
|
if (typeof descriptor.title !== 'string') {
|
|
480
426
|
collector.error(( localizeWithPath(
|
|
481
|
-
|
|
482
|
-
|
|
427
|
+
_moduleId,
|
|
428
|
+
31,
|
|
483
429
|
"property `{0}` is mandatory and must be of type `string`",
|
|
484
430
|
'title'
|
|
485
431
|
)));
|
|
@@ -487,8 +433,8 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
487
433
|
}
|
|
488
434
|
if (typeof descriptor.icon !== 'string') {
|
|
489
435
|
collector.error(( localizeWithPath(
|
|
490
|
-
|
|
491
|
-
|
|
436
|
+
_moduleId,
|
|
437
|
+
31,
|
|
492
438
|
"property `{0}` is mandatory and must be of type `string`",
|
|
493
439
|
'icon'
|
|
494
440
|
)));
|
|
@@ -496,8 +442,8 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
496
442
|
}
|
|
497
443
|
if (isFalsyOrWhitespace(descriptor.title)) {
|
|
498
444
|
collector.warn(( localizeWithPath(
|
|
499
|
-
|
|
500
|
-
|
|
445
|
+
_moduleId,
|
|
446
|
+
32,
|
|
501
447
|
"property `{0}` is mandatory and must be of type `string` with non-empty value",
|
|
502
448
|
'title'
|
|
503
449
|
)));
|
|
@@ -534,7 +480,7 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
534
480
|
id,
|
|
535
481
|
title: { value: title, original: title },
|
|
536
482
|
extensionId,
|
|
537
|
-
ctorDescriptor: ( new SyncDescriptor(ViewPaneContainer, [id, { mergeViewWithContainerWhenSingleView: true }])),
|
|
483
|
+
ctorDescriptor: ( (new SyncDescriptor(ViewPaneContainer, [id, { mergeViewWithContainerWhenSingleView: true }]))),
|
|
538
484
|
hideIfEmpty: true,
|
|
539
485
|
order,
|
|
540
486
|
icon,
|
|
@@ -544,7 +490,7 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
544
490
|
}
|
|
545
491
|
deregisterCustomViewContainer(viewContainer) {
|
|
546
492
|
this.viewContainersRegistry.deregisterViewContainer(viewContainer);
|
|
547
|
-
( Registry.as(Extensions$1.Viewlets)).deregisterPaneComposite(viewContainer.id);
|
|
493
|
+
( (Registry.as(Extensions$1.Viewlets))).deregisterPaneComposite(viewContainer.id);
|
|
548
494
|
}
|
|
549
495
|
handleAndRegisterCustomViews() {
|
|
550
496
|
viewsExtensionPoint.setHandler((extensions, { added, removed }) => {
|
|
@@ -557,7 +503,7 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
557
503
|
});
|
|
558
504
|
}
|
|
559
505
|
addViews(extensions) {
|
|
560
|
-
const viewIds = ( new Set());
|
|
506
|
+
const viewIds = ( (new Set()));
|
|
561
507
|
const allViewDescriptors = [];
|
|
562
508
|
for (const extension of extensions) {
|
|
563
509
|
const { value, collector } = extension;
|
|
@@ -567,8 +513,8 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
567
513
|
}
|
|
568
514
|
if (key === 'remote' && !isProposedApiEnabled(extension.description, 'contribViewsRemote')) {
|
|
569
515
|
collector.warn(( localizeWithPath(
|
|
570
|
-
|
|
571
|
-
|
|
516
|
+
_moduleId,
|
|
517
|
+
33,
|
|
572
518
|
"View container '{0}' requires 'enabledApiProposals: [\"contribViewsRemote\"]' to be added to 'Remote'.",
|
|
573
519
|
key
|
|
574
520
|
)));
|
|
@@ -577,8 +523,8 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
577
523
|
const viewContainer = this.getViewContainer(key);
|
|
578
524
|
if (!viewContainer) {
|
|
579
525
|
collector.warn(( localizeWithPath(
|
|
580
|
-
|
|
581
|
-
|
|
526
|
+
_moduleId,
|
|
527
|
+
34,
|
|
582
528
|
"View container '{0}' does not exist and all views registered to it will be added to 'Explorer'.",
|
|
583
529
|
key
|
|
584
530
|
)));
|
|
@@ -587,22 +533,17 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
587
533
|
const viewDescriptors = [];
|
|
588
534
|
for (let index = 0; index < value.length; index++) {
|
|
589
535
|
const item = value[index];
|
|
590
|
-
if (( viewIds.has(item.id))) {
|
|
536
|
+
if (( (viewIds.has(item.id)))) {
|
|
591
537
|
collector.error(( localizeWithPath(
|
|
592
|
-
|
|
593
|
-
|
|
538
|
+
_moduleId,
|
|
539
|
+
35,
|
|
594
540
|
"Cannot register multiple views with same id `{0}`",
|
|
595
541
|
item.id
|
|
596
542
|
)));
|
|
597
543
|
continue;
|
|
598
544
|
}
|
|
599
545
|
if (this.viewsRegistry.getView(item.id) !== null) {
|
|
600
|
-
collector.error(( localizeWithPath(
|
|
601
|
-
'vs/workbench/api/browser/viewsExtensionPoint',
|
|
602
|
-
'duplicateView2',
|
|
603
|
-
"A view with id `{0}` is already registered.",
|
|
604
|
-
item.id
|
|
605
|
-
)));
|
|
546
|
+
collector.error(( localizeWithPath(_moduleId, 36, "A view with id `{0}` is already registered.", item.id)));
|
|
606
547
|
continue;
|
|
607
548
|
}
|
|
608
549
|
const order = ExtensionIdentifier.equals(extension.description.identifier, container.extensionId)
|
|
@@ -617,12 +558,7 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
617
558
|
const initialVisibility = this.convertInitialVisibility(item.visibility);
|
|
618
559
|
const type = this.getViewType(item.type);
|
|
619
560
|
if (!type) {
|
|
620
|
-
collector.error(( localizeWithPath(
|
|
621
|
-
'vs/workbench/api/browser/viewsExtensionPoint',
|
|
622
|
-
'unknownViewType',
|
|
623
|
-
"Unknown view type `{0}`.",
|
|
624
|
-
item.type
|
|
625
|
-
)));
|
|
561
|
+
collector.error(( localizeWithPath(_moduleId, 37, "Unknown view type `{0}`.", item.type)));
|
|
626
562
|
continue;
|
|
627
563
|
}
|
|
628
564
|
let weight = undefined;
|
|
@@ -634,9 +570,13 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
634
570
|
this.logService.warn(`${extension.description.identifier.value} tried to set the view size of ${item.id} but it was ignored because the view container does not belong to it.`);
|
|
635
571
|
}
|
|
636
572
|
}
|
|
573
|
+
let accessibilityHelpContent;
|
|
574
|
+
if (isProposedApiEnabled(extension.description, 'contribAccessibilityHelpContent') && item.accessibilityHelpContent) {
|
|
575
|
+
accessibilityHelpContent = ( (new MarkdownString(item.accessibilityHelpContent)));
|
|
576
|
+
}
|
|
637
577
|
const viewDescriptor = {
|
|
638
578
|
type: type,
|
|
639
|
-
ctorDescriptor: type === ViewType.Tree ? ( new SyncDescriptor(TreeViewPane)) : ( new SyncDescriptor(WebviewViewPane)),
|
|
579
|
+
ctorDescriptor: type === ViewType.Tree ? ( (new SyncDescriptor(TreeViewPane))) : ( (new SyncDescriptor(WebviewViewPane))),
|
|
640
580
|
id: item.id,
|
|
641
581
|
name: { value: item.name, original: item.name },
|
|
642
582
|
when: ContextKeyExpr.deserialize(item.when),
|
|
@@ -654,7 +594,8 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
654
594
|
virtualWorkspace: item.virtualWorkspace,
|
|
655
595
|
hideByDefault: initialVisibility === InitialVisibility.Hidden,
|
|
656
596
|
workspace: viewContainer?.id === VIEWLET_ID ? true : undefined,
|
|
657
|
-
weight
|
|
597
|
+
weight,
|
|
598
|
+
accessibilityHelpContent
|
|
658
599
|
};
|
|
659
600
|
viewIds.add(viewDescriptor.id);
|
|
660
601
|
viewDescriptors.push(viewDescriptor);
|
|
@@ -677,9 +618,9 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
677
618
|
return this.viewContainersRegistry.get(VIEWLET_ID$1);
|
|
678
619
|
}
|
|
679
620
|
removeViews(extensions) {
|
|
680
|
-
const removedExtensions = extensions.reduce((result, e) => { result.add(e.description.identifier); return result; }, ( new ExtensionIdentifierSet()));
|
|
621
|
+
const removedExtensions = extensions.reduce((result, e) => { result.add(e.description.identifier); return result; }, ( (new ExtensionIdentifierSet())));
|
|
681
622
|
for (const viewContainer of this.viewContainersRegistry.all) {
|
|
682
|
-
const removedViews = this.viewsRegistry.getViews(viewContainer).filter(v => v.extensionId && ( removedExtensions.has(v.extensionId)));
|
|
623
|
+
const removedViews = this.viewsRegistry.getViews(viewContainer).filter(v => v.extensionId && ( (removedExtensions.has(v.extensionId))));
|
|
683
624
|
if (removedViews.length) {
|
|
684
625
|
this.viewsRegistry.deregisterViews(removedViews, viewContainer);
|
|
685
626
|
for (const view of removedViews) {
|
|
@@ -692,25 +633,21 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
692
633
|
}
|
|
693
634
|
}
|
|
694
635
|
convertInitialVisibility(value) {
|
|
695
|
-
if (( Object.values(InitialVisibility)).includes(value)) {
|
|
636
|
+
if (( (Object.values(InitialVisibility))).includes(value)) {
|
|
696
637
|
return value;
|
|
697
638
|
}
|
|
698
639
|
return undefined;
|
|
699
640
|
}
|
|
700
641
|
isValidViewDescriptors(viewDescriptors, collector) {
|
|
701
642
|
if (!Array.isArray(viewDescriptors)) {
|
|
702
|
-
collector.error(( localizeWithPath(
|
|
703
|
-
'vs/workbench/api/browser/viewsExtensionPoint',
|
|
704
|
-
'requirearray',
|
|
705
|
-
"views must be an array"
|
|
706
|
-
)));
|
|
643
|
+
collector.error(( localizeWithPath(_moduleId, 38, "views must be an array")));
|
|
707
644
|
return false;
|
|
708
645
|
}
|
|
709
646
|
for (const descriptor of viewDescriptors) {
|
|
710
647
|
if (typeof descriptor.id !== 'string') {
|
|
711
648
|
collector.error(( localizeWithPath(
|
|
712
|
-
|
|
713
|
-
|
|
649
|
+
_moduleId,
|
|
650
|
+
31,
|
|
714
651
|
"property `{0}` is mandatory and must be of type `string`",
|
|
715
652
|
'id'
|
|
716
653
|
)));
|
|
@@ -718,8 +655,8 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
718
655
|
}
|
|
719
656
|
if (typeof descriptor.name !== 'string') {
|
|
720
657
|
collector.error(( localizeWithPath(
|
|
721
|
-
|
|
722
|
-
|
|
658
|
+
_moduleId,
|
|
659
|
+
31,
|
|
723
660
|
"property `{0}` is mandatory and must be of type `string`",
|
|
724
661
|
'name'
|
|
725
662
|
)));
|
|
@@ -727,8 +664,8 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
727
664
|
}
|
|
728
665
|
if (descriptor.when && typeof descriptor.when !== 'string') {
|
|
729
666
|
collector.error(( localizeWithPath(
|
|
730
|
-
|
|
731
|
-
|
|
667
|
+
_moduleId,
|
|
668
|
+
39,
|
|
732
669
|
"property `{0}` can be omitted or must be of type `string`",
|
|
733
670
|
'when'
|
|
734
671
|
)));
|
|
@@ -736,8 +673,8 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
736
673
|
}
|
|
737
674
|
if (descriptor.icon && typeof descriptor.icon !== 'string') {
|
|
738
675
|
collector.error(( localizeWithPath(
|
|
739
|
-
|
|
740
|
-
|
|
676
|
+
_moduleId,
|
|
677
|
+
39,
|
|
741
678
|
"property `{0}` can be omitted or must be of type `string`",
|
|
742
679
|
'icon'
|
|
743
680
|
)));
|
|
@@ -745,8 +682,8 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
745
682
|
}
|
|
746
683
|
if (descriptor.contextualTitle && typeof descriptor.contextualTitle !== 'string') {
|
|
747
684
|
collector.error(( localizeWithPath(
|
|
748
|
-
|
|
749
|
-
|
|
685
|
+
_moduleId,
|
|
686
|
+
39,
|
|
750
687
|
"property `{0}` can be omitted or must be of type `string`",
|
|
751
688
|
'contextualTitle'
|
|
752
689
|
)));
|
|
@@ -754,11 +691,11 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
754
691
|
}
|
|
755
692
|
if (descriptor.visibility && !this.convertInitialVisibility(descriptor.visibility)) {
|
|
756
693
|
collector.error(( localizeWithPath(
|
|
757
|
-
|
|
758
|
-
|
|
694
|
+
_moduleId,
|
|
695
|
+
40,
|
|
759
696
|
"property `{0}` can be omitted or must be one of {1}",
|
|
760
697
|
'visibility',
|
|
761
|
-
( Object.values(InitialVisibility)).join(', ')
|
|
698
|
+
( (Object.values(InitialVisibility))).join(', ')
|
|
762
699
|
)));
|
|
763
700
|
return false;
|
|
764
701
|
}
|
|
@@ -784,10 +721,10 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
784
721
|
return false;
|
|
785
722
|
}
|
|
786
723
|
};
|
|
787
|
-
ViewsExtensionHandler = ( __decorate([
|
|
788
|
-
( __param(0, IInstantiationService)),
|
|
789
|
-
( __param(1, ILogService))
|
|
790
|
-
], ViewsExtensionHandler));
|
|
724
|
+
ViewsExtensionHandler = ( (__decorate([
|
|
725
|
+
( (__param(0, IInstantiationService))),
|
|
726
|
+
( (__param(1, ILogService)))
|
|
727
|
+
], ViewsExtensionHandler)));
|
|
791
728
|
class ViewContainersDataRenderer extends Disposable {
|
|
792
729
|
constructor() {
|
|
793
730
|
super(...arguments);
|
|
@@ -798,28 +735,20 @@ class ViewContainersDataRenderer extends Disposable {
|
|
|
798
735
|
}
|
|
799
736
|
render(manifest) {
|
|
800
737
|
const contrib = manifest.contributes?.viewsContainers || {};
|
|
801
|
-
const viewContainers = ( Object.keys(contrib)).reduce((result, location) => {
|
|
738
|
+
const viewContainers = ( (Object.keys(contrib))).reduce((result, location) => {
|
|
802
739
|
const viewContainersForLocation = contrib[location];
|
|
803
|
-
result.push(...( viewContainersForLocation.map(viewContainer => ({ ...viewContainer, location }))));
|
|
740
|
+
result.push(...( (viewContainersForLocation.map(viewContainer => ({ ...viewContainer, location })))));
|
|
804
741
|
return result;
|
|
805
742
|
}, []);
|
|
806
743
|
if (!viewContainers.length) {
|
|
807
744
|
return { data: { headers: [], rows: [] }, dispose: () => { } };
|
|
808
745
|
}
|
|
809
746
|
const headers = [
|
|
810
|
-
( localizeWithPath(
|
|
811
|
-
( localizeWithPath(
|
|
812
|
-
|
|
813
|
-
'view container title',
|
|
814
|
-
"Title"
|
|
815
|
-
)),
|
|
816
|
-
( localizeWithPath(
|
|
817
|
-
'vs/workbench/api/browser/viewsExtensionPoint',
|
|
818
|
-
'view container location',
|
|
819
|
-
"Where"
|
|
820
|
-
)),
|
|
747
|
+
( localizeWithPath(_moduleId, 41, "ID")),
|
|
748
|
+
( localizeWithPath(_moduleId, 42, "Title")),
|
|
749
|
+
( localizeWithPath(_moduleId, 43, "Where")),
|
|
821
750
|
];
|
|
822
|
-
const rows = ( viewContainers
|
|
751
|
+
const rows = ( (viewContainers
|
|
823
752
|
.sort((a, b) => a.id.localeCompare(b.id))
|
|
824
753
|
.map(viewContainer => {
|
|
825
754
|
return [
|
|
@@ -827,7 +756,7 @@ class ViewContainersDataRenderer extends Disposable {
|
|
|
827
756
|
viewContainer.title,
|
|
828
757
|
viewContainer.location
|
|
829
758
|
];
|
|
830
|
-
}));
|
|
759
|
+
})));
|
|
831
760
|
return {
|
|
832
761
|
data: {
|
|
833
762
|
headers,
|
|
@@ -847,24 +776,20 @@ class ViewsDataRenderer extends Disposable {
|
|
|
847
776
|
}
|
|
848
777
|
render(manifest) {
|
|
849
778
|
const contrib = manifest.contributes?.views || {};
|
|
850
|
-
const views = ( Object.keys(contrib)).reduce((result, location) => {
|
|
779
|
+
const views = ( (Object.keys(contrib))).reduce((result, location) => {
|
|
851
780
|
const viewsForLocation = contrib[location];
|
|
852
|
-
result.push(...( viewsForLocation.map(view => ({ ...view, location }))));
|
|
781
|
+
result.push(...( (viewsForLocation.map(view => ({ ...view, location })))));
|
|
853
782
|
return result;
|
|
854
783
|
}, []);
|
|
855
784
|
if (!views.length) {
|
|
856
785
|
return { data: { headers: [], rows: [] }, dispose: () => { } };
|
|
857
786
|
}
|
|
858
787
|
const headers = [
|
|
859
|
-
( localizeWithPath(
|
|
860
|
-
( localizeWithPath(
|
|
861
|
-
( localizeWithPath(
|
|
862
|
-
'vs/workbench/api/browser/viewsExtensionPoint',
|
|
863
|
-
'view container location',
|
|
864
|
-
"Where"
|
|
865
|
-
)),
|
|
788
|
+
( localizeWithPath(_moduleId, 44, "ID")),
|
|
789
|
+
( localizeWithPath(_moduleId, 45, "Name")),
|
|
790
|
+
( localizeWithPath(_moduleId, 43, "Where")),
|
|
866
791
|
];
|
|
867
|
-
const rows = ( views
|
|
792
|
+
const rows = ( (views
|
|
868
793
|
.sort((a, b) => a.id.localeCompare(b.id))
|
|
869
794
|
.map(view => {
|
|
870
795
|
return [
|
|
@@ -872,7 +797,7 @@ class ViewsDataRenderer extends Disposable {
|
|
|
872
797
|
view.name,
|
|
873
798
|
view.location
|
|
874
799
|
];
|
|
875
|
-
}));
|
|
800
|
+
})));
|
|
876
801
|
return {
|
|
877
802
|
data: {
|
|
878
803
|
headers,
|
|
@@ -882,25 +807,21 @@ class ViewsDataRenderer extends Disposable {
|
|
|
882
807
|
};
|
|
883
808
|
}
|
|
884
809
|
}
|
|
885
|
-
( Registry.as(Extensions$2.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
810
|
+
( (Registry.as(Extensions$2.ExtensionFeaturesRegistry))).registerExtensionFeature({
|
|
886
811
|
id: 'viewsContainers',
|
|
887
|
-
label: ( localizeWithPath(
|
|
888
|
-
'vs/workbench/api/browser/viewsExtensionPoint',
|
|
889
|
-
'viewsContainers',
|
|
890
|
-
"View Containers"
|
|
891
|
-
)),
|
|
812
|
+
label: ( localizeWithPath(_moduleId, 46, "View Containers")),
|
|
892
813
|
access: {
|
|
893
814
|
canToggle: false
|
|
894
815
|
},
|
|
895
|
-
renderer: ( new SyncDescriptor(ViewContainersDataRenderer)),
|
|
816
|
+
renderer: ( (new SyncDescriptor(ViewContainersDataRenderer))),
|
|
896
817
|
});
|
|
897
|
-
( Registry.as(Extensions$2.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
818
|
+
( (Registry.as(Extensions$2.ExtensionFeaturesRegistry))).registerExtensionFeature({
|
|
898
819
|
id: 'views',
|
|
899
|
-
label: ( localizeWithPath(
|
|
820
|
+
label: ( localizeWithPath(_moduleId, 47, "Views")),
|
|
900
821
|
access: {
|
|
901
822
|
canToggle: false
|
|
902
823
|
},
|
|
903
|
-
renderer: ( new SyncDescriptor(ViewsDataRenderer)),
|
|
824
|
+
renderer: ( (new SyncDescriptor(ViewsDataRenderer))),
|
|
904
825
|
});
|
|
905
826
|
registerWorkbenchContribution2(ViewsExtensionHandler.ID, ViewsExtensionHandler, 1 );
|
|
906
827
|
|