@codingame/monaco-vscode-view-common-service-override 11.1.2 → 12.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +3 -1
- package/index.js +110 -1
- package/package.json +64 -10
- package/service-override/tools/editorAssets.d.ts +1 -0
- package/service-override/tools/editorAssets.js +5 -0
- package/vscode/src/vs/platform/actions/browser/actionViewItemService.d.ts +21 -0
- package/vscode/src/vs/platform/actions/browser/actionViewItemService.js +2 -0
- package/vscode/src/vs/platform/webview/common/mimeTypes.d.ts +2 -0
- package/vscode/src/vs/platform/webview/common/mimeTypes.js +1 -0
- package/vscode/src/vs/platform/webview/common/webviewPortMapping.d.ts +18 -0
- package/vscode/src/vs/platform/webview/common/webviewPortMapping.js +1 -0
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.d.ts +7 -0
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +116 -115
- package/vscode/src/vs/workbench/browser/actions/listCommands.d.ts +1 -0
- package/vscode/src/vs/workbench/browser/actions/listCommands.js +120 -125
- package/vscode/src/vs/workbench/browser/actions/navigationActions.d.ts +1 -0
- package/vscode/src/vs/workbench/browser/actions/navigationActions.js +81 -74
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +216 -250
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.d.ts +21 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +26 -25
- package/vscode/src/vs/workbench/browser/parts/paneCompositePartService.d.ts +32 -0
- package/vscode/src/vs/workbench/browser/parts/paneCompositePartService.js +10 -8
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +58 -64
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +48 -38
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.d.ts +54 -0
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +19 -40
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/media/callHierarchy.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.js +7 -5
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.d.ts +58 -0
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +6 -4
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +6 -4
- package/vscode/src/vs/workbench/contrib/customEditor/browser/media/customEditor.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +16 -16
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.d.ts +65 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +15 -10
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.js +1 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +27 -25
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution.js +4 -2
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +6 -386
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.js +385 -0
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/media/languageStatus.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +20 -20
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.d.ts +105 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +50 -62
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.js +16 -15
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +15 -13
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorSerializer.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorSerializer.js +2 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.js +14 -13
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editorGutter.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editorGutter.js +2 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +15 -14
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.js +3 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.d.ts +43 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +37 -39
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +22 -21
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/lineAlignment.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/lineAlignment.js +3 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/media/mergeEditor.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.d.ts +117 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +57 -53
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.js +27 -25
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.d.ts +41 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +15 -13
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewZones.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewZones.js +4 -3
- package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +28 -28
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js +7 -5
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.js +2 -1
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/media/typeHierarchy.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +54 -56
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +48 -38
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.d.ts +52 -0
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +19 -30
- package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.d.ts +101 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.js +3 -2
- package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.js +7 -6
- package/vscode/src/vs/workbench/contrib/webview/browser/themeing.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/themeing.js +7 -6
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.d.ts +139 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +58 -56
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindWidget.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindWidget.js +4 -3
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewService.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewService.js +2 -1
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +28 -28
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInputSerializer.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInputSerializer.js +3 -2
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +15 -13
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.d.ts +64 -0
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +10 -8
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewService.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewService.js +1 -0
- package/vscode/src/vs/workbench/services/editor/browser/editorPaneService.d.ts +6 -0
- package/vscode/src/vs/workbench/services/editor/browser/editorPaneService.js +3 -1
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.d.ts +60 -0
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +64 -63
- package/vscode/src/vs/workbench/services/history/browser/historyService.d.ts +184 -0
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +154 -148
- package/vscode/src/vs/workbench/services/progress/browser/media/progressService.css.js +1 -1
- package/vscode/src/vs/workbench/services/progress/browser/progressService.d.ts +36 -0
- package/vscode/src/vs/workbench/services/progress/browser/progressService.js +59 -54
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorHandler.d.ts +34 -0
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorHandler.js +4 -3
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.d.ts +71 -0
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.js +4 -2
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.d.ts +122 -0
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +86 -90
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.d.ts +80 -0
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +58 -64
- package/override/vs/workbench/browser/parts/editor/textEditor.js +0 -5
- package/override/vs/workbench/browser/parts/editor/textEditor.weak.js +0 -11
- package/tools/editorAssets.js +0 -4
- package/tools/url.js +0 -10
- package/viewCommon.js +0 -109
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { joinPath } from 'vscode/vscode/vs/base/common/resources';
|
|
3
4
|
import { isFalsyOrWhitespace } from 'vscode/vscode/vs/base/common/strings';
|
|
4
5
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
@@ -8,15 +9,15 @@ import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/d
|
|
|
8
9
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
9
10
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
10
11
|
import { ThemeIcon } from 'vscode/vscode/vs/base/common/themables';
|
|
11
|
-
import { Extensions as Extensions$1 } from 'vscode/vscode/vs/workbench/browser/panecomposite';
|
|
12
|
-
import { TreeViewPane, CustomTreeView } from 'vscode/vscode/vs/workbench/browser/parts/views/treeView';
|
|
13
|
-
import { ViewPaneContainer } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPaneContainer';
|
|
14
|
-
import { registerWorkbenchContribution2 } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
15
|
-
import { Extensions } from 'vscode/vscode/vs/workbench/common/views';
|
|
12
|
+
import { Extensions as Extensions$1 } from '@codingame/monaco-vscode-b8988f79-16c1-5bff-b0e7-699bab3431da-common/vscode/vs/workbench/browser/panecomposite';
|
|
13
|
+
import { TreeViewPane, CustomTreeView } from '@codingame/monaco-vscode-4a316137-39d1-5d77-8b53-112db3547c1e-common/vscode/vs/workbench/browser/parts/views/treeView';
|
|
14
|
+
import { ViewPaneContainer } from '@codingame/monaco-vscode-9e888134-1a6f-58d9-b0e6-0fc047448366-common/vscode/vs/workbench/browser/parts/views/viewPaneContainer';
|
|
15
|
+
import { registerWorkbenchContribution2, WorkbenchPhase } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
16
|
+
import { Extensions, ViewContainerLocation } from 'vscode/vscode/vs/workbench/common/views';
|
|
16
17
|
import { VIEWLET_ID as VIEWLET_ID$3 } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
17
|
-
import { VIEWLET_ID as VIEWLET_ID$1 } from 'vscode/vscode/vs/workbench/contrib/files/common/files';
|
|
18
|
-
import { VIEWLET_ID } from 'vscode/vscode/vs/workbench/contrib/remote/browser/remoteExplorer';
|
|
19
|
-
import { VIEWLET_ID as VIEWLET_ID$2 } from 'vscode/vscode/vs/workbench/contrib/scm/common/scm';
|
|
18
|
+
import { VIEWLET_ID as VIEWLET_ID$1 } from '@codingame/monaco-vscode-cc9ccbec-e2a1-599d-84ae-46f5efc666e3-common/vscode/vs/workbench/contrib/files/common/files';
|
|
19
|
+
import { VIEWLET_ID } from '@codingame/monaco-vscode-1b4486de-4fe4-59c4-9e6d-34f265ff6625-common/vscode/vs/workbench/contrib/remote/browser/remoteExplorer';
|
|
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';
|
|
20
21
|
import { WebviewViewPane } from '../../contrib/webviewView/browser/webviewViewPane.js';
|
|
21
22
|
import { isProposedApiEnabled } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
|
|
22
23
|
import { ExtensionsRegistry } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionsRegistry';
|
|
@@ -30,19 +31,19 @@ const viewsContainerSchema = {
|
|
|
30
31
|
properties: {
|
|
31
32
|
id: {
|
|
32
33
|
description: ( localize(
|
|
33
|
-
|
|
34
|
+
2322,
|
|
34
35
|
"Unique id used to identify the container in which views can be contributed using 'views' contribution point"
|
|
35
36
|
)),
|
|
36
37
|
type: 'string',
|
|
37
38
|
pattern: '^[a-zA-Z0-9_-]+$'
|
|
38
39
|
},
|
|
39
40
|
title: {
|
|
40
|
-
description: ( localize(
|
|
41
|
+
description: ( localize(2323, 'Human readable string used to render the container')),
|
|
41
42
|
type: 'string'
|
|
42
43
|
},
|
|
43
44
|
icon: {
|
|
44
45
|
description: ( localize(
|
|
45
|
-
|
|
46
|
+
2324,
|
|
46
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."
|
|
47
48
|
)),
|
|
48
49
|
type: 'string'
|
|
@@ -51,32 +52,32 @@ const viewsContainerSchema = {
|
|
|
51
52
|
required: ['id', 'title', 'icon']
|
|
52
53
|
};
|
|
53
54
|
const viewsContainersContribution = {
|
|
54
|
-
description: ( localize(
|
|
55
|
+
description: ( localize(2325, 'Contributes views containers to the editor')),
|
|
55
56
|
type: 'object',
|
|
56
57
|
properties: {
|
|
57
58
|
'activitybar': {
|
|
58
|
-
description: ( localize(
|
|
59
|
+
description: ( localize(2326, "Contribute views containers to Activity Bar")),
|
|
59
60
|
type: 'array',
|
|
60
61
|
items: viewsContainerSchema
|
|
61
62
|
},
|
|
62
63
|
'panel': {
|
|
63
|
-
description: ( localize(
|
|
64
|
+
description: ( localize(2327, "Contribute views containers to Panel")),
|
|
64
65
|
type: 'array',
|
|
65
66
|
items: viewsContainerSchema
|
|
66
67
|
}
|
|
67
68
|
}
|
|
68
69
|
};
|
|
69
70
|
var ViewType;
|
|
70
|
-
( (
|
|
71
|
+
(function (ViewType) {
|
|
71
72
|
ViewType["Tree"] = "tree";
|
|
72
73
|
ViewType["Webview"] = "webview";
|
|
73
|
-
})(ViewType || (ViewType = {}))
|
|
74
|
+
})(ViewType || (ViewType = {}));
|
|
74
75
|
var InitialVisibility;
|
|
75
|
-
( (
|
|
76
|
+
(function (InitialVisibility) {
|
|
76
77
|
InitialVisibility["Visible"] = "visible";
|
|
77
78
|
InitialVisibility["Hidden"] = "hidden";
|
|
78
79
|
InitialVisibility["Collapsed"] = "collapsed";
|
|
79
|
-
})(InitialVisibility || (InitialVisibility = {}))
|
|
80
|
+
})(InitialVisibility || (InitialVisibility = {}));
|
|
80
81
|
const viewDescriptor = {
|
|
81
82
|
type: 'object',
|
|
82
83
|
required: ['id', 'name'],
|
|
@@ -84,7 +85,7 @@ const viewDescriptor = {
|
|
|
84
85
|
properties: {
|
|
85
86
|
type: {
|
|
86
87
|
markdownDescription: ( localize(
|
|
87
|
-
|
|
88
|
+
2328,
|
|
88
89
|
"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`."
|
|
89
90
|
)),
|
|
90
91
|
type: 'string',
|
|
@@ -93,45 +94,45 @@ const viewDescriptor = {
|
|
|
93
94
|
'webview',
|
|
94
95
|
],
|
|
95
96
|
markdownEnumDescriptions: [
|
|
96
|
-
( localize(
|
|
97
|
+
( localize(2329, "The view is backed by a `TreeView` created by `createTreeView`.")),
|
|
97
98
|
( localize(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
2330,
|
|
100
|
+
"The view is backed by a `WebviewView` registered by `registerWebviewViewProvider`."
|
|
101
|
+
)),
|
|
101
102
|
]
|
|
102
103
|
},
|
|
103
104
|
id: {
|
|
104
105
|
markdownDescription: ( localize(
|
|
105
|
-
|
|
106
|
+
2331,
|
|
106
107
|
'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`.'
|
|
107
108
|
)),
|
|
108
109
|
type: 'string'
|
|
109
110
|
},
|
|
110
111
|
name: {
|
|
111
|
-
description: ( localize(
|
|
112
|
+
description: ( localize(2332, 'The human-readable name of the view. Will be shown')),
|
|
112
113
|
type: 'string'
|
|
113
114
|
},
|
|
114
115
|
when: {
|
|
115
|
-
description: ( localize(
|
|
116
|
+
description: ( localize(2333, 'Condition which must be true to show this view')),
|
|
116
117
|
type: 'string'
|
|
117
118
|
},
|
|
118
119
|
icon: {
|
|
119
120
|
description: ( localize(
|
|
120
|
-
|
|
121
|
+
2334,
|
|
121
122
|
"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."
|
|
122
123
|
)),
|
|
123
124
|
type: 'string'
|
|
124
125
|
},
|
|
125
126
|
contextualTitle: {
|
|
126
127
|
description: ( localize(
|
|
127
|
-
|
|
128
|
+
2335,
|
|
128
129
|
"Human-readable context for when the view is moved out of its original location. By default, the view's container name will be used."
|
|
129
130
|
)),
|
|
130
131
|
type: 'string'
|
|
131
132
|
},
|
|
132
133
|
visibility: {
|
|
133
134
|
description: ( localize(
|
|
134
|
-
|
|
135
|
+
2336,
|
|
135
136
|
"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."
|
|
136
137
|
)),
|
|
137
138
|
type: 'string',
|
|
@@ -143,27 +144,27 @@ const viewDescriptor = {
|
|
|
143
144
|
default: 'visible',
|
|
144
145
|
enumDescriptions: [
|
|
145
146
|
( localize(
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
147
|
+
2337,
|
|
148
|
+
"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`."
|
|
149
|
+
)),
|
|
149
150
|
( localize(
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
( localize(
|
|
151
|
+
2338,
|
|
152
|
+
"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."
|
|
153
|
+
)),
|
|
154
|
+
( localize(2339, "The view will show in the view container, but will be collapsed."))
|
|
154
155
|
]
|
|
155
156
|
},
|
|
156
157
|
initialSize: {
|
|
157
158
|
type: 'number',
|
|
158
159
|
description: ( localize(
|
|
159
|
-
|
|
160
|
+
2340,
|
|
160
161
|
"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."
|
|
161
162
|
)),
|
|
162
163
|
},
|
|
163
164
|
accessibilityHelpContent: {
|
|
164
165
|
type: 'string',
|
|
165
166
|
markdownDescription: ( localize(
|
|
166
|
-
|
|
167
|
+
2341,
|
|
167
168
|
"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."
|
|
168
169
|
))
|
|
169
170
|
}
|
|
@@ -175,25 +176,25 @@ const remoteViewDescriptor = {
|
|
|
175
176
|
properties: {
|
|
176
177
|
id: {
|
|
177
178
|
description: ( localize(
|
|
178
|
-
|
|
179
|
+
2331,
|
|
179
180
|
'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`.'
|
|
180
181
|
)),
|
|
181
182
|
type: 'string'
|
|
182
183
|
},
|
|
183
184
|
name: {
|
|
184
|
-
description: ( localize(
|
|
185
|
+
description: ( localize(2332, 'The human-readable name of the view. Will be shown')),
|
|
185
186
|
type: 'string'
|
|
186
187
|
},
|
|
187
188
|
when: {
|
|
188
|
-
description: ( localize(
|
|
189
|
+
description: ( localize(2333, 'Condition which must be true to show this view')),
|
|
189
190
|
type: 'string'
|
|
190
191
|
},
|
|
191
192
|
group: {
|
|
192
|
-
description: ( localize(
|
|
193
|
+
description: ( localize(2342, 'Nested group in the viewlet')),
|
|
193
194
|
type: 'string'
|
|
194
195
|
},
|
|
195
196
|
remoteName: {
|
|
196
|
-
description: ( localize(
|
|
197
|
+
description: ( localize(2343, 'The name of the remote type associated with this view')),
|
|
197
198
|
type: ['string', 'array'],
|
|
198
199
|
items: {
|
|
199
200
|
type: 'string'
|
|
@@ -202,36 +203,36 @@ const remoteViewDescriptor = {
|
|
|
202
203
|
}
|
|
203
204
|
};
|
|
204
205
|
const viewsContribution = {
|
|
205
|
-
description: ( localize(
|
|
206
|
+
description: ( localize(2344, "Contributes views to the editor")),
|
|
206
207
|
type: 'object',
|
|
207
208
|
properties: {
|
|
208
209
|
'explorer': {
|
|
209
|
-
description: ( localize(
|
|
210
|
+
description: ( localize(2345, "Contributes views to Explorer container in the Activity bar")),
|
|
210
211
|
type: 'array',
|
|
211
212
|
items: viewDescriptor,
|
|
212
213
|
default: []
|
|
213
214
|
},
|
|
214
215
|
'debug': {
|
|
215
|
-
description: ( localize(
|
|
216
|
+
description: ( localize(2346, "Contributes views to Debug container in the Activity bar")),
|
|
216
217
|
type: 'array',
|
|
217
218
|
items: viewDescriptor,
|
|
218
219
|
default: []
|
|
219
220
|
},
|
|
220
221
|
'scm': {
|
|
221
|
-
description: ( localize(
|
|
222
|
+
description: ( localize(2347, "Contributes views to SCM container in the Activity bar")),
|
|
222
223
|
type: 'array',
|
|
223
224
|
items: viewDescriptor,
|
|
224
225
|
default: []
|
|
225
226
|
},
|
|
226
227
|
'test': {
|
|
227
|
-
description: ( localize(
|
|
228
|
+
description: ( localize(2348, "Contributes views to Test container in the Activity bar")),
|
|
228
229
|
type: 'array',
|
|
229
230
|
items: viewDescriptor,
|
|
230
231
|
default: []
|
|
231
232
|
},
|
|
232
233
|
'remote': {
|
|
233
234
|
description: ( localize(
|
|
234
|
-
|
|
235
|
+
2349,
|
|
235
236
|
"Contributes views to Remote container in the Activity bar. To contribute to this container, enableProposedApi needs to be turned on"
|
|
236
237
|
)),
|
|
237
238
|
type: 'array',
|
|
@@ -240,7 +241,7 @@ const viewsContribution = {
|
|
|
240
241
|
}
|
|
241
242
|
},
|
|
242
243
|
additionalProperties: {
|
|
243
|
-
description: ( localize(
|
|
244
|
+
description: ( localize(2350, "Contributes views to contributed views container")),
|
|
244
245
|
type: 'array',
|
|
245
246
|
items: viewDescriptor,
|
|
246
247
|
default: []
|
|
@@ -256,7 +257,7 @@ const viewsExtensionPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
|
256
257
|
jsonSchema: viewsContribution,
|
|
257
258
|
activationEventsGenerator: (viewExtensionPointTypeArray, result) => {
|
|
258
259
|
for (const viewExtensionPointType of viewExtensionPointTypeArray) {
|
|
259
|
-
for (const viewDescriptors of (
|
|
260
|
+
for (const viewDescriptors of ( Object.values(viewExtensionPointType))) {
|
|
260
261
|
for (const viewDescriptor of viewDescriptors) {
|
|
261
262
|
if (viewDescriptor.id) {
|
|
262
263
|
result.push(`onView:${viewDescriptor.id}`);
|
|
@@ -272,8 +273,8 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
272
273
|
constructor(instantiationService, logService) {
|
|
273
274
|
this.instantiationService = instantiationService;
|
|
274
275
|
this.logService = logService;
|
|
275
|
-
this.viewContainersRegistry = (
|
|
276
|
-
this.viewsRegistry = (
|
|
276
|
+
this.viewContainersRegistry = ( Registry.as(Extensions.ViewContainersRegistry));
|
|
277
|
+
this.viewsRegistry = ( Registry.as(Extensions.ViewsRegistry));
|
|
277
278
|
this.handleAndRegisterCustomViewContainers();
|
|
278
279
|
this.handleAndRegisterCustomViews();
|
|
279
280
|
}
|
|
@@ -288,9 +289,9 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
288
289
|
});
|
|
289
290
|
}
|
|
290
291
|
addCustomViewContainers(extensionPoints, existingViewContainers) {
|
|
291
|
-
const viewContainersRegistry = (
|
|
292
|
-
let activityBarOrder = CUSTOM_VIEWS_START_ORDER + viewContainersRegistry.all.filter(v => !!v.extensionId && viewContainersRegistry.getViewContainerLocation(v) ===
|
|
293
|
-
let panelOrder = 5 + viewContainersRegistry.all.filter(v => !!v.extensionId && viewContainersRegistry.getViewContainerLocation(v) ===
|
|
292
|
+
const viewContainersRegistry = ( Registry.as(Extensions.ViewContainersRegistry));
|
|
293
|
+
let activityBarOrder = CUSTOM_VIEWS_START_ORDER + viewContainersRegistry.all.filter(v => !!v.extensionId && viewContainersRegistry.getViewContainerLocation(v) === ViewContainerLocation.Sidebar).length;
|
|
294
|
+
let panelOrder = 5 + viewContainersRegistry.all.filter(v => !!v.extensionId && viewContainersRegistry.getViewContainerLocation(v) === ViewContainerLocation.Panel).length + 1;
|
|
294
295
|
for (const { value, collector, description } of extensionPoints) {
|
|
295
296
|
Object.entries(value).forEach(([key, value]) => {
|
|
296
297
|
if (!this.isValidViewsContainer(value, collector)) {
|
|
@@ -298,20 +299,20 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
298
299
|
}
|
|
299
300
|
switch (key) {
|
|
300
301
|
case 'activitybar':
|
|
301
|
-
activityBarOrder = this.registerCustomViewContainers(value, description, activityBarOrder, existingViewContainers,
|
|
302
|
+
activityBarOrder = this.registerCustomViewContainers(value, description, activityBarOrder, existingViewContainers, ViewContainerLocation.Sidebar);
|
|
302
303
|
break;
|
|
303
304
|
case 'panel':
|
|
304
|
-
panelOrder = this.registerCustomViewContainers(value, description, panelOrder, existingViewContainers,
|
|
305
|
+
panelOrder = this.registerCustomViewContainers(value, description, panelOrder, existingViewContainers, ViewContainerLocation.Panel);
|
|
305
306
|
break;
|
|
306
307
|
}
|
|
307
308
|
});
|
|
308
309
|
}
|
|
309
310
|
}
|
|
310
311
|
removeCustomViewContainers(extensionPoints) {
|
|
311
|
-
const viewContainersRegistry = (
|
|
312
|
-
const removedExtensions = extensionPoints.reduce((result, e) => { result.add(e.description.identifier); return result; }, (
|
|
312
|
+
const viewContainersRegistry = ( Registry.as(Extensions.ViewContainersRegistry));
|
|
313
|
+
const removedExtensions = extensionPoints.reduce((result, e) => { result.add(e.description.identifier); return result; }, ( new ExtensionIdentifierSet()));
|
|
313
314
|
for (const viewContainer of viewContainersRegistry.all) {
|
|
314
|
-
if (viewContainer.extensionId && (
|
|
315
|
+
if (viewContainer.extensionId && ( removedExtensions.has(viewContainer.extensionId))) {
|
|
315
316
|
const views = this.viewsRegistry.getViews(viewContainer);
|
|
316
317
|
if (views.length) {
|
|
317
318
|
this.viewsRegistry.moveViews(views, this.getDefaultViewContainer());
|
|
@@ -322,13 +323,13 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
322
323
|
}
|
|
323
324
|
isValidViewsContainer(viewsContainersDescriptors, collector) {
|
|
324
325
|
if (!Array.isArray(viewsContainersDescriptors)) {
|
|
325
|
-
collector.error(( localize(
|
|
326
|
+
collector.error(( localize(2351, "views containers must be an array")));
|
|
326
327
|
return false;
|
|
327
328
|
}
|
|
328
329
|
for (const descriptor of viewsContainersDescriptors) {
|
|
329
330
|
if (typeof descriptor.id !== 'string' && isFalsyOrWhitespace(descriptor.id)) {
|
|
330
331
|
collector.error(( localize(
|
|
331
|
-
|
|
332
|
+
2352,
|
|
332
333
|
"property `{0}` is mandatory and must be of type `string` with non-empty value. Only alphanumeric characters, '_', and '-' are allowed.",
|
|
333
334
|
'id'
|
|
334
335
|
)));
|
|
@@ -336,23 +337,23 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
336
337
|
}
|
|
337
338
|
if (!(/^[a-z0-9_-]+$/i.test(descriptor.id))) {
|
|
338
339
|
collector.error(( localize(
|
|
339
|
-
|
|
340
|
+
2352,
|
|
340
341
|
"property `{0}` is mandatory and must be of type `string` with non-empty value. Only alphanumeric characters, '_', and '-' are allowed.",
|
|
341
342
|
'id'
|
|
342
343
|
)));
|
|
343
344
|
return false;
|
|
344
345
|
}
|
|
345
346
|
if (typeof descriptor.title !== 'string') {
|
|
346
|
-
collector.error(( localize(
|
|
347
|
+
collector.error(( localize(2353, "property `{0}` is mandatory and must be of type `string`", 'title')));
|
|
347
348
|
return false;
|
|
348
349
|
}
|
|
349
350
|
if (typeof descriptor.icon !== 'string') {
|
|
350
|
-
collector.error(( localize(
|
|
351
|
+
collector.error(( localize(2353, "property `{0}` is mandatory and must be of type `string`", 'icon')));
|
|
351
352
|
return false;
|
|
352
353
|
}
|
|
353
354
|
if (isFalsyOrWhitespace(descriptor.title)) {
|
|
354
355
|
collector.warn(( localize(
|
|
355
|
-
|
|
356
|
+
2354,
|
|
356
357
|
"property `{0}` is mandatory and must be of type `string` with non-empty value",
|
|
357
358
|
'title'
|
|
358
359
|
)));
|
|
@@ -389,7 +390,7 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
389
390
|
id,
|
|
390
391
|
title: { value: title, original: title },
|
|
391
392
|
extensionId,
|
|
392
|
-
ctorDescriptor: (
|
|
393
|
+
ctorDescriptor: ( new SyncDescriptor(ViewPaneContainer, [id, { mergeViewWithContainerWhenSingleView: true }])),
|
|
393
394
|
hideIfEmpty: true,
|
|
394
395
|
order,
|
|
395
396
|
icon,
|
|
@@ -399,7 +400,7 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
399
400
|
}
|
|
400
401
|
deregisterCustomViewContainer(viewContainer) {
|
|
401
402
|
this.viewContainersRegistry.deregisterViewContainer(viewContainer);
|
|
402
|
-
(
|
|
403
|
+
( Registry.as(Extensions$1.Viewlets)).deregisterPaneComposite(viewContainer.id);
|
|
403
404
|
}
|
|
404
405
|
handleAndRegisterCustomViews() {
|
|
405
406
|
viewsExtensionPoint.setHandler((extensions, { added, removed }) => {
|
|
@@ -412,7 +413,7 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
412
413
|
});
|
|
413
414
|
}
|
|
414
415
|
addViews(extensions) {
|
|
415
|
-
const viewIds = (
|
|
416
|
+
const viewIds = ( new Set());
|
|
416
417
|
const allViewDescriptors = [];
|
|
417
418
|
for (const extension of extensions) {
|
|
418
419
|
const { value, collector } = extension;
|
|
@@ -422,7 +423,7 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
422
423
|
}
|
|
423
424
|
if (key === 'remote' && !isProposedApiEnabled(extension.description, 'contribViewsRemote')) {
|
|
424
425
|
collector.warn(( localize(
|
|
425
|
-
|
|
426
|
+
2355,
|
|
426
427
|
"View container '{0}' requires 'enabledApiProposals: [\"contribViewsRemote\"]' to be added to 'Remote'.",
|
|
427
428
|
key
|
|
428
429
|
)));
|
|
@@ -431,7 +432,7 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
431
432
|
const viewContainer = this.getViewContainer(key);
|
|
432
433
|
if (!viewContainer) {
|
|
433
434
|
collector.warn(( localize(
|
|
434
|
-
|
|
435
|
+
2356,
|
|
435
436
|
"View container '{0}' does not exist and all views registered to it will be added to 'Explorer'.",
|
|
436
437
|
key
|
|
437
438
|
)));
|
|
@@ -440,12 +441,12 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
440
441
|
const viewDescriptors = [];
|
|
441
442
|
for (let index = 0; index < value.length; index++) {
|
|
442
443
|
const item = value[index];
|
|
443
|
-
if ((
|
|
444
|
-
collector.error(( localize(
|
|
444
|
+
if (( viewIds.has(item.id))) {
|
|
445
|
+
collector.error(( localize(2357, "Cannot register multiple views with same id `{0}`", item.id)));
|
|
445
446
|
continue;
|
|
446
447
|
}
|
|
447
448
|
if (this.viewsRegistry.getView(item.id) !== null) {
|
|
448
|
-
collector.error(( localize(
|
|
449
|
+
collector.error(( localize(2358, "A view with id `{0}` is already registered.", item.id)));
|
|
449
450
|
continue;
|
|
450
451
|
}
|
|
451
452
|
const order = ExtensionIdentifier.equals(extension.description.identifier, container.extensionId)
|
|
@@ -460,7 +461,7 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
460
461
|
const initialVisibility = this.convertInitialVisibility(item.visibility);
|
|
461
462
|
const type = this.getViewType(item.type);
|
|
462
463
|
if (!type) {
|
|
463
|
-
collector.error(( localize(
|
|
464
|
+
collector.error(( localize(2359, "Unknown view type `{0}`.", item.type)));
|
|
464
465
|
continue;
|
|
465
466
|
}
|
|
466
467
|
let weight = undefined;
|
|
@@ -474,11 +475,11 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
474
475
|
}
|
|
475
476
|
let accessibilityHelpContent;
|
|
476
477
|
if (isProposedApiEnabled(extension.description, 'contribAccessibilityHelpContent') && item.accessibilityHelpContent) {
|
|
477
|
-
accessibilityHelpContent = (
|
|
478
|
+
accessibilityHelpContent = ( new MarkdownString(item.accessibilityHelpContent));
|
|
478
479
|
}
|
|
479
480
|
const viewDescriptor = {
|
|
480
481
|
type: type,
|
|
481
|
-
ctorDescriptor: type === ViewType.Tree ? (
|
|
482
|
+
ctorDescriptor: type === ViewType.Tree ? ( new SyncDescriptor(TreeViewPane)) : ( new SyncDescriptor(WebviewViewPane)),
|
|
482
483
|
id: item.id,
|
|
483
484
|
name: { value: item.name, original: item.name },
|
|
484
485
|
when: ContextKeyExpr.deserialize(item.when),
|
|
@@ -520,9 +521,9 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
520
521
|
return this.viewContainersRegistry.get(VIEWLET_ID$1);
|
|
521
522
|
}
|
|
522
523
|
removeViews(extensions) {
|
|
523
|
-
const removedExtensions = extensions.reduce((result, e) => { result.add(e.description.identifier); return result; }, (
|
|
524
|
+
const removedExtensions = extensions.reduce((result, e) => { result.add(e.description.identifier); return result; }, ( new ExtensionIdentifierSet()));
|
|
524
525
|
for (const viewContainer of this.viewContainersRegistry.all) {
|
|
525
|
-
const removedViews = this.viewsRegistry.getViews(viewContainer).filter(v => v.extensionId && (
|
|
526
|
+
const removedViews = this.viewsRegistry.getViews(viewContainer).filter(v => v.extensionId && ( removedExtensions.has(v.extensionId)));
|
|
526
527
|
if (removedViews.length) {
|
|
527
528
|
this.viewsRegistry.deregisterViews(removedViews, viewContainer);
|
|
528
529
|
for (const view of removedViews) {
|
|
@@ -535,36 +536,36 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
535
536
|
}
|
|
536
537
|
}
|
|
537
538
|
convertInitialVisibility(value) {
|
|
538
|
-
if ((
|
|
539
|
+
if (( Object.values(InitialVisibility)).includes(value)) {
|
|
539
540
|
return value;
|
|
540
541
|
}
|
|
541
542
|
return undefined;
|
|
542
543
|
}
|
|
543
544
|
isValidViewDescriptors(viewDescriptors, collector) {
|
|
544
545
|
if (!Array.isArray(viewDescriptors)) {
|
|
545
|
-
collector.error(( localize(
|
|
546
|
+
collector.error(( localize(2360, "views must be an array")));
|
|
546
547
|
return false;
|
|
547
548
|
}
|
|
548
549
|
for (const descriptor of viewDescriptors) {
|
|
549
550
|
if (typeof descriptor.id !== 'string') {
|
|
550
|
-
collector.error(( localize(
|
|
551
|
+
collector.error(( localize(2353, "property `{0}` is mandatory and must be of type `string`", 'id')));
|
|
551
552
|
return false;
|
|
552
553
|
}
|
|
553
554
|
if (typeof descriptor.name !== 'string') {
|
|
554
|
-
collector.error(( localize(
|
|
555
|
+
collector.error(( localize(2353, "property `{0}` is mandatory and must be of type `string`", 'name')));
|
|
555
556
|
return false;
|
|
556
557
|
}
|
|
557
558
|
if (descriptor.when && typeof descriptor.when !== 'string') {
|
|
558
|
-
collector.error(( localize(
|
|
559
|
+
collector.error(( localize(2361, "property `{0}` can be omitted or must be of type `string`", 'when')));
|
|
559
560
|
return false;
|
|
560
561
|
}
|
|
561
562
|
if (descriptor.icon && typeof descriptor.icon !== 'string') {
|
|
562
|
-
collector.error(( localize(
|
|
563
|
+
collector.error(( localize(2361, "property `{0}` can be omitted or must be of type `string`", 'icon')));
|
|
563
564
|
return false;
|
|
564
565
|
}
|
|
565
566
|
if (descriptor.contextualTitle && typeof descriptor.contextualTitle !== 'string') {
|
|
566
567
|
collector.error(( localize(
|
|
567
|
-
|
|
568
|
+
2361,
|
|
568
569
|
"property `{0}` can be omitted or must be of type `string`",
|
|
569
570
|
'contextualTitle'
|
|
570
571
|
)));
|
|
@@ -572,10 +573,10 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
572
573
|
}
|
|
573
574
|
if (descriptor.visibility && !this.convertInitialVisibility(descriptor.visibility)) {
|
|
574
575
|
collector.error(( localize(
|
|
575
|
-
|
|
576
|
+
2362,
|
|
576
577
|
"property `{0}` can be omitted or must be one of {1}",
|
|
577
578
|
'visibility',
|
|
578
|
-
(
|
|
579
|
+
( Object.values(InitialVisibility)).join(', ')
|
|
579
580
|
)));
|
|
580
581
|
return false;
|
|
581
582
|
}
|
|
@@ -601,10 +602,10 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
601
602
|
return false;
|
|
602
603
|
}
|
|
603
604
|
};
|
|
604
|
-
ViewsExtensionHandler = (
|
|
605
|
-
(
|
|
606
|
-
(
|
|
607
|
-
], ViewsExtensionHandler))
|
|
605
|
+
ViewsExtensionHandler = ( __decorate([
|
|
606
|
+
( __param(0, IInstantiationService)),
|
|
607
|
+
( __param(1, ILogService))
|
|
608
|
+
], ViewsExtensionHandler));
|
|
608
609
|
class ViewContainersDataRenderer extends Disposable {
|
|
609
610
|
constructor() {
|
|
610
611
|
super(...arguments);
|
|
@@ -615,20 +616,20 @@ class ViewContainersDataRenderer extends Disposable {
|
|
|
615
616
|
}
|
|
616
617
|
render(manifest) {
|
|
617
618
|
const contrib = manifest.contributes?.viewsContainers || {};
|
|
618
|
-
const viewContainers = (
|
|
619
|
+
const viewContainers = ( Object.keys(contrib)).reduce((result, location) => {
|
|
619
620
|
const viewContainersForLocation = contrib[location];
|
|
620
|
-
result.push(...(
|
|
621
|
+
result.push(...( viewContainersForLocation.map(viewContainer => ({ ...viewContainer, location }))));
|
|
621
622
|
return result;
|
|
622
623
|
}, []);
|
|
623
624
|
if (!viewContainers.length) {
|
|
624
625
|
return { data: { headers: [], rows: [] }, dispose: () => { } };
|
|
625
626
|
}
|
|
626
627
|
const headers = [
|
|
627
|
-
( localize(
|
|
628
|
-
( localize(
|
|
629
|
-
( localize(
|
|
628
|
+
( localize(2363, "ID")),
|
|
629
|
+
( localize(2364, "Title")),
|
|
630
|
+
( localize(2365, "Where")),
|
|
630
631
|
];
|
|
631
|
-
const rows = (
|
|
632
|
+
const rows = ( viewContainers
|
|
632
633
|
.sort((a, b) => a.id.localeCompare(b.id))
|
|
633
634
|
.map(viewContainer => {
|
|
634
635
|
return [
|
|
@@ -636,7 +637,7 @@ class ViewContainersDataRenderer extends Disposable {
|
|
|
636
637
|
viewContainer.title,
|
|
637
638
|
viewContainer.location
|
|
638
639
|
];
|
|
639
|
-
}))
|
|
640
|
+
}));
|
|
640
641
|
return {
|
|
641
642
|
data: {
|
|
642
643
|
headers,
|
|
@@ -656,20 +657,20 @@ class ViewsDataRenderer extends Disposable {
|
|
|
656
657
|
}
|
|
657
658
|
render(manifest) {
|
|
658
659
|
const contrib = manifest.contributes?.views || {};
|
|
659
|
-
const views = (
|
|
660
|
+
const views = ( Object.keys(contrib)).reduce((result, location) => {
|
|
660
661
|
const viewsForLocation = contrib[location];
|
|
661
|
-
result.push(...(
|
|
662
|
+
result.push(...( viewsForLocation.map(view => ({ ...view, location }))));
|
|
662
663
|
return result;
|
|
663
664
|
}, []);
|
|
664
665
|
if (!views.length) {
|
|
665
666
|
return { data: { headers: [], rows: [] }, dispose: () => { } };
|
|
666
667
|
}
|
|
667
668
|
const headers = [
|
|
668
|
-
( localize(
|
|
669
|
-
( localize(
|
|
670
|
-
( localize(
|
|
669
|
+
( localize(2366, "ID")),
|
|
670
|
+
( localize(2367, "Name")),
|
|
671
|
+
( localize(2365, "Where")),
|
|
671
672
|
];
|
|
672
|
-
const rows = (
|
|
673
|
+
const rows = ( views
|
|
673
674
|
.sort((a, b) => a.id.localeCompare(b.id))
|
|
674
675
|
.map(view => {
|
|
675
676
|
return [
|
|
@@ -677,7 +678,7 @@ class ViewsDataRenderer extends Disposable {
|
|
|
677
678
|
view.name,
|
|
678
679
|
view.location
|
|
679
680
|
];
|
|
680
|
-
}))
|
|
681
|
+
}));
|
|
681
682
|
return {
|
|
682
683
|
data: {
|
|
683
684
|
headers,
|
|
@@ -687,22 +688,22 @@ class ViewsDataRenderer extends Disposable {
|
|
|
687
688
|
};
|
|
688
689
|
}
|
|
689
690
|
}
|
|
690
|
-
(
|
|
691
|
+
( Registry.as(Extensions$2.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
691
692
|
id: 'viewsContainers',
|
|
692
|
-
label: ( localize(
|
|
693
|
+
label: ( localize(2368, "View Containers")),
|
|
693
694
|
access: {
|
|
694
695
|
canToggle: false
|
|
695
696
|
},
|
|
696
|
-
renderer: (
|
|
697
|
+
renderer: ( new SyncDescriptor(ViewContainersDataRenderer)),
|
|
697
698
|
});
|
|
698
|
-
(
|
|
699
|
+
( Registry.as(Extensions$2.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
699
700
|
id: 'views',
|
|
700
|
-
label: ( localize(
|
|
701
|
+
label: ( localize(2369, "Views")),
|
|
701
702
|
access: {
|
|
702
703
|
canToggle: false
|
|
703
704
|
},
|
|
704
|
-
renderer: (
|
|
705
|
+
renderer: ( new SyncDescriptor(ViewsDataRenderer)),
|
|
705
706
|
});
|
|
706
|
-
registerWorkbenchContribution2(ViewsExtensionHandler.ID, ViewsExtensionHandler,
|
|
707
|
+
registerWorkbenchContribution2(ViewsExtensionHandler.ID, ViewsExtensionHandler, WorkbenchPhase.BlockStartup);
|
|
707
708
|
|
|
708
709
|
export { viewsContainersContribution };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|