@codingame/monaco-vscode-view-common-service-override 11.1.2 → 12.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +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,22 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
3
|
+
import { VIEWS_LOG_ID, VIEWS_LOG_NAME, Extensions, ViewContainerLocation, ViewVisibilityState, defaultViewIcon, ViewContainerLocationToString } from 'vscode/vscode/vs/workbench/common/views';
|
|
3
4
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
4
5
|
import { ContextKeyExpr, RawContextKey } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
5
6
|
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
7
|
+
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
6
8
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
7
9
|
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
8
10
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
9
11
|
import { Disposable, DisposableMap, DisposableStore, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
10
|
-
import { ViewPaneContainer, ViewPaneContainerAction, ViewsSubMenu } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPaneContainer';
|
|
12
|
+
import { ViewPaneContainer, ViewPaneContainerAction, ViewsSubMenu } from '@codingame/monaco-vscode-9e888134-1a6f-58d9-b0e6-0fc047448366-common/vscode/vs/workbench/browser/parts/views/viewPaneContainer';
|
|
11
13
|
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
14
|
+
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
12
15
|
import { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
|
|
13
16
|
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
14
17
|
import { generateUuid } from 'vscode/vscode/vs/base/common/uuid';
|
|
15
18
|
import { getViewsStateStorageId, ViewContainerModel } from '../common/viewContainerModel.js';
|
|
16
19
|
import { registerAction2, MenuId, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
17
|
-
import {
|
|
20
|
+
import { localize, localize2 } from 'vscode/vscode/vs/nls';
|
|
18
21
|
import { ILoggerService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
19
22
|
import { Lazy } from 'vscode/vscode/vs/base/common/lazy';
|
|
23
|
+
import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
20
24
|
|
|
21
25
|
var ViewDescriptorService_1;
|
|
22
26
|
function getViewContainerStorageId(viewContainerId) { return `${viewContainerId}.state`; }
|
|
@@ -32,30 +36,30 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
|
|
|
32
36
|
this.storageService = storageService;
|
|
33
37
|
this.extensionService = extensionService;
|
|
34
38
|
this.telemetryService = telemetryService;
|
|
35
|
-
this._onDidChangeContainer = this._register((
|
|
39
|
+
this._onDidChangeContainer = this._register(( new Emitter()));
|
|
36
40
|
this.onDidChangeContainer = this._onDidChangeContainer.event;
|
|
37
|
-
this._onDidChangeLocation = this._register((
|
|
41
|
+
this._onDidChangeLocation = this._register(( new Emitter()));
|
|
38
42
|
this.onDidChangeLocation = this._onDidChangeLocation.event;
|
|
39
|
-
this._onDidChangeContainerLocation = this._register((
|
|
43
|
+
this._onDidChangeContainerLocation = this._register(( new Emitter()));
|
|
40
44
|
this.onDidChangeContainerLocation = this._onDidChangeContainerLocation.event;
|
|
41
|
-
this.viewContainerModels = this._register((
|
|
42
|
-
this.viewsVisibilityActionDisposables = this._register((
|
|
45
|
+
this.viewContainerModels = this._register(( new DisposableMap()));
|
|
46
|
+
this.viewsVisibilityActionDisposables = this._register(( new DisposableMap()));
|
|
43
47
|
this.canRegisterViewsVisibilityActions = false;
|
|
44
|
-
this._onDidChangeViewContainers = this._register((
|
|
48
|
+
this._onDidChangeViewContainers = this._register(( new Emitter()));
|
|
45
49
|
this.onDidChangeViewContainers = this._onDidChangeViewContainers.event;
|
|
46
|
-
this.logger = (
|
|
50
|
+
this.logger = ( new Lazy(
|
|
47
51
|
() => loggerService.createLogger(VIEWS_LOG_ID, { name: VIEWS_LOG_NAME, hidden: true })
|
|
48
|
-
))
|
|
49
|
-
this.activeViewContextKeys = (
|
|
50
|
-
this.movableViewContextKeys = (
|
|
51
|
-
this.defaultViewLocationContextKeys = (
|
|
52
|
-
this.defaultViewContainerLocationContextKeys = (
|
|
53
|
-
this.viewContainersRegistry = (
|
|
54
|
-
this.viewsRegistry = (
|
|
52
|
+
));
|
|
53
|
+
this.activeViewContextKeys = ( new Map());
|
|
54
|
+
this.movableViewContextKeys = ( new Map());
|
|
55
|
+
this.defaultViewLocationContextKeys = ( new Map());
|
|
56
|
+
this.defaultViewContainerLocationContextKeys = ( new Map());
|
|
57
|
+
this.viewContainersRegistry = ( Registry.as(Extensions.ViewContainersRegistry));
|
|
58
|
+
this.viewsRegistry = ( Registry.as(Extensions.ViewsRegistry));
|
|
55
59
|
this.migrateToViewsCustomizationsStorage();
|
|
56
|
-
this.viewContainersCustomLocations = (
|
|
57
|
-
this.viewDescriptorsCustomLocations = (
|
|
58
|
-
this.viewContainerBadgeEnablementStates = (
|
|
60
|
+
this.viewContainersCustomLocations = ( new Map(Object.entries(this.viewCustomizations.viewContainerLocations)));
|
|
61
|
+
this.viewDescriptorsCustomLocations = ( new Map(Object.entries(this.viewCustomizations.viewLocations)));
|
|
62
|
+
this.viewContainerBadgeEnablementStates = ( new Map(Object.entries(this.viewCustomizations.viewContainerBadgeEnablementStates)));
|
|
59
63
|
this.viewContainers.forEach(viewContainer => this.onDidRegisterViewContainer(viewContainer));
|
|
60
64
|
this._register(this.viewsRegistry.onViewsRegistered(views => this.onDidRegisterViews(views)));
|
|
61
65
|
this._register(this.viewsRegistry.onViewsDeregistered(({ views, viewContainer }) => this.onDidDeregisterViews(views, viewContainer)));
|
|
@@ -68,15 +72,15 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
|
|
|
68
72
|
this.onDidDeregisterViewContainer(viewContainer);
|
|
69
73
|
this._onDidChangeViewContainers.fire({ removed: [{ container: viewContainer, location: viewContainerLocation }], added: [] });
|
|
70
74
|
}));
|
|
71
|
-
this._register(this.storageService.onDidChangeValue(
|
|
75
|
+
this._register(this.storageService.onDidChangeValue(StorageScope.PROFILE, ViewDescriptorService_1.VIEWS_CUSTOMIZATIONS, this._store)(() => this.onDidStorageChange()));
|
|
72
76
|
this.extensionService.whenInstalledExtensionsRegistered().then(() => this.whenExtensionsRegistered());
|
|
73
77
|
}
|
|
74
78
|
migrateToViewsCustomizationsStorage() {
|
|
75
|
-
if (this.storageService.get(ViewDescriptorService_1.VIEWS_CUSTOMIZATIONS,
|
|
79
|
+
if (this.storageService.get(ViewDescriptorService_1.VIEWS_CUSTOMIZATIONS, StorageScope.PROFILE)) {
|
|
76
80
|
return;
|
|
77
81
|
}
|
|
78
|
-
const viewContainerLocationsValue = this.storageService.get('views.cachedViewContainerLocations',
|
|
79
|
-
const viewDescriptorLocationsValue = this.storageService.get('views.cachedViewPositions',
|
|
82
|
+
const viewContainerLocationsValue = this.storageService.get('views.cachedViewContainerLocations', StorageScope.PROFILE);
|
|
83
|
+
const viewDescriptorLocationsValue = this.storageService.get('views.cachedViewPositions', StorageScope.PROFILE);
|
|
80
84
|
if (!viewContainerLocationsValue && !viewDescriptorLocationsValue) {
|
|
81
85
|
return;
|
|
82
86
|
}
|
|
@@ -87,14 +91,14 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
|
|
|
87
91
|
viewLocations: viewDescriptorLocations.reduce((result, [id, { containerId }]) => { result[id] = containerId; return result; }, {}),
|
|
88
92
|
viewContainerBadgeEnablementStates: {}
|
|
89
93
|
};
|
|
90
|
-
this.storageService.store(ViewDescriptorService_1.VIEWS_CUSTOMIZATIONS, JSON.stringify(viewsCustomizations),
|
|
91
|
-
this.storageService.remove('views.cachedViewContainerLocations',
|
|
92
|
-
this.storageService.remove('views.cachedViewPositions',
|
|
94
|
+
this.storageService.store(ViewDescriptorService_1.VIEWS_CUSTOMIZATIONS, JSON.stringify(viewsCustomizations), StorageScope.PROFILE, StorageTarget.USER);
|
|
95
|
+
this.storageService.remove('views.cachedViewContainerLocations', StorageScope.PROFILE);
|
|
96
|
+
this.storageService.remove('views.cachedViewPositions', StorageScope.PROFILE);
|
|
93
97
|
}
|
|
94
98
|
registerGroupedViews(groupedViews) {
|
|
95
99
|
for (const [containerId, views] of groupedViews.entries()) {
|
|
96
100
|
const viewContainer = this.viewContainersRegistry.get(containerId);
|
|
97
|
-
if (!viewContainer || !(
|
|
101
|
+
if (!viewContainer || !( this.viewContainerModels.has(viewContainer))) {
|
|
98
102
|
if (this.isGeneratedContainerId(containerId)) {
|
|
99
103
|
const viewContainerLocation = this.viewContainersCustomLocations.get(containerId);
|
|
100
104
|
if (viewContainerLocation !== undefined) {
|
|
@@ -110,7 +114,7 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
|
|
|
110
114
|
deregisterGroupedViews(groupedViews) {
|
|
111
115
|
for (const [viewContainerId, views] of groupedViews.entries()) {
|
|
112
116
|
const viewContainer = this.viewContainersRegistry.get(viewContainerId);
|
|
113
|
-
if (!viewContainer || !(
|
|
117
|
+
if (!viewContainer || !( this.viewContainerModels.has(viewContainer))) {
|
|
114
118
|
continue;
|
|
115
119
|
}
|
|
116
120
|
this.removeViews(viewContainer, views);
|
|
@@ -130,7 +134,7 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
|
|
|
130
134
|
}
|
|
131
135
|
whenExtensionsRegistered() {
|
|
132
136
|
this.moveOrphanViewsToDefaultLocation();
|
|
133
|
-
for (const viewContainerId of [...(
|
|
137
|
+
for (const viewContainerId of [...( this.viewContainersCustomLocations.keys())]) {
|
|
134
138
|
this.cleanUpGeneratedViewContainer(viewContainerId);
|
|
135
139
|
}
|
|
136
140
|
this.saveViewCustomizations();
|
|
@@ -159,7 +163,7 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
|
|
|
159
163
|
});
|
|
160
164
|
}
|
|
161
165
|
regroupViews(containerId, views) {
|
|
162
|
-
const viewsByContainer = (
|
|
166
|
+
const viewsByContainer = ( new Map());
|
|
163
167
|
for (const viewDescriptor of views) {
|
|
164
168
|
const correctContainerId = this.viewDescriptorsCustomLocations.get(viewDescriptor.id) ?? containerId;
|
|
165
169
|
let containerViews = viewsByContainer.get(correctContainerId);
|
|
@@ -228,7 +232,7 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
|
|
|
228
232
|
if (!views.length) {
|
|
229
233
|
return;
|
|
230
234
|
}
|
|
231
|
-
this.logger.value.info(`moveViewsToContainer: views:${(
|
|
235
|
+
this.logger.value.info(`moveViewsToContainer: views:${( views.map(view => view.id)).join(',')} viewContainer:${viewContainer.id} reason:${reason}`);
|
|
232
236
|
const from = this.getViewContainerByViewId(views[0].id);
|
|
233
237
|
const to = viewContainer;
|
|
234
238
|
if (from && to && from !== to) {
|
|
@@ -260,10 +264,10 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
|
|
|
260
264
|
this.saveViewCustomizations();
|
|
261
265
|
}
|
|
262
266
|
isViewContainerRemovedPermanently(viewContainerId) {
|
|
263
|
-
return this.isGeneratedContainerId(viewContainerId) && !(
|
|
267
|
+
return this.isGeneratedContainerId(viewContainerId) && !( this.viewContainersCustomLocations.has(viewContainerId));
|
|
264
268
|
}
|
|
265
269
|
onDidChangeDefaultContainer(views, from, to) {
|
|
266
|
-
const viewsToMove = views.filter(view => !(
|
|
270
|
+
const viewsToMove = views.filter(view => !( this.viewDescriptorsCustomLocations.has(view.id))
|
|
267
271
|
|| (!this.viewContainers.includes(from) && this.viewDescriptorsCustomLocations.get(view.id) === from.id)
|
|
268
272
|
);
|
|
269
273
|
if (viewsToMove.length) {
|
|
@@ -285,8 +289,8 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
|
|
|
285
289
|
const viewCount = views.length;
|
|
286
290
|
const fromContainer = containerToString(from);
|
|
287
291
|
const toContainer = containerToString(to);
|
|
288
|
-
const fromLocation = oldLocation ===
|
|
289
|
-
const toLocation = newLocation ===
|
|
292
|
+
const fromLocation = oldLocation === ViewContainerLocation.Panel ? 'panel' : 'sidebar';
|
|
293
|
+
const toLocation = newLocation === ViewContainerLocation.Panel ? 'panel' : 'sidebar';
|
|
290
294
|
this.telemetryService.publicLog2('viewDescriptorService.moveViews', { viewCount, fromContainer, toContainer, fromLocation, toLocation });
|
|
291
295
|
}
|
|
292
296
|
moveViewsWithoutSaving(views, from, to, visibilityState = ViewVisibilityState.Expand) {
|
|
@@ -326,7 +330,7 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
|
|
|
326
330
|
if (viewContainer && this.getViewContainerModel(viewContainer)?.allViewDescriptors.length) {
|
|
327
331
|
return;
|
|
328
332
|
}
|
|
329
|
-
if ([...(
|
|
333
|
+
if ([...( this.viewDescriptorsCustomLocations.values())].includes(viewContainerId)) {
|
|
330
334
|
return;
|
|
331
335
|
}
|
|
332
336
|
if (viewContainer) {
|
|
@@ -334,15 +338,15 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
|
|
|
334
338
|
}
|
|
335
339
|
this.viewContainersCustomLocations.delete(viewContainerId);
|
|
336
340
|
this.viewContainerBadgeEnablementStates.delete(viewContainerId);
|
|
337
|
-
this.storageService.remove(getViewsStateStorageId(viewContainer?.storageId || getViewContainerStorageId(viewContainerId)),
|
|
341
|
+
this.storageService.remove(getViewsStateStorageId(viewContainer?.storageId || getViewContainerStorageId(viewContainerId)), StorageScope.PROFILE);
|
|
338
342
|
}
|
|
339
343
|
registerGeneratedViewContainer(location, existingId) {
|
|
340
344
|
const id = existingId || this.generateContainerId(location);
|
|
341
345
|
const container = this.viewContainersRegistry.registerViewContainer({
|
|
342
346
|
id,
|
|
343
|
-
ctorDescriptor: (
|
|
344
|
-
title: { value:
|
|
345
|
-
icon: location ===
|
|
347
|
+
ctorDescriptor: ( new SyncDescriptor(ViewPaneContainer, [id, { mergeViewWithContainerWhenSingleView: true }])),
|
|
348
|
+
title: { value: ( localize(12067, "User View Container")), original: 'User View Container' },
|
|
349
|
+
icon: location === ViewContainerLocation.Sidebar ? defaultViewIcon : undefined,
|
|
346
350
|
storageId: getViewContainerStorageId(id),
|
|
347
351
|
hideIfEmpty: true
|
|
348
352
|
}, location, { doNotRegisterOpenCommand: true });
|
|
@@ -359,8 +363,8 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
|
|
|
359
363
|
}
|
|
360
364
|
onDidViewCustomizationsStorageChange() {
|
|
361
365
|
this._viewCustomizations = undefined;
|
|
362
|
-
const newViewContainerCustomizations = (
|
|
363
|
-
const newViewDescriptorCustomizations = (
|
|
366
|
+
const newViewContainerCustomizations = ( new Map(Object.entries(this.viewCustomizations.viewContainerLocations)));
|
|
367
|
+
const newViewDescriptorCustomizations = ( new Map(Object.entries(this.viewCustomizations.viewLocations)));
|
|
364
368
|
const viewContainersToMove = [];
|
|
365
369
|
const viewsToMove = [];
|
|
366
370
|
for (const [containerId, location] of newViewContainerCustomizations.entries()) {
|
|
@@ -375,7 +379,7 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
|
|
|
375
379
|
}
|
|
376
380
|
}
|
|
377
381
|
for (const viewContainer of this.viewContainers) {
|
|
378
|
-
if (!(
|
|
382
|
+
if (!( newViewContainerCustomizations.has(viewContainer.id))) {
|
|
379
383
|
const currentLocation = this.getViewContainerLocation(viewContainer);
|
|
380
384
|
const defaultLocation = this.getDefaultViewContainerLocation(viewContainer);
|
|
381
385
|
if (currentLocation !== defaultLocation) {
|
|
@@ -396,7 +400,7 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
|
|
|
396
400
|
for (const viewContainer of this.viewContainers) {
|
|
397
401
|
const viewContainerModel = this.getViewContainerModel(viewContainer);
|
|
398
402
|
for (const viewDescriptor of viewContainerModel.allViewDescriptors) {
|
|
399
|
-
if (!(
|
|
403
|
+
if (!( newViewDescriptorCustomizations.has(viewDescriptor.id))) {
|
|
400
404
|
const currentContainer = this.getViewContainerByViewId(viewDescriptor.id);
|
|
401
405
|
const defaultContainer = this.getDefaultContainerById(viewDescriptor.id);
|
|
402
406
|
if (currentContainer && defaultContainer && currentContainer !== defaultContainer) {
|
|
@@ -460,10 +464,10 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
|
|
|
460
464
|
}
|
|
461
465
|
}
|
|
462
466
|
getStoredViewCustomizationsValue() {
|
|
463
|
-
return this.storageService.get(ViewDescriptorService_1.VIEWS_CUSTOMIZATIONS,
|
|
467
|
+
return this.storageService.get(ViewDescriptorService_1.VIEWS_CUSTOMIZATIONS, StorageScope.PROFILE, '{}');
|
|
464
468
|
}
|
|
465
469
|
setStoredViewCustomizationsValue(value) {
|
|
466
|
-
this.storageService.store(ViewDescriptorService_1.VIEWS_CUSTOMIZATIONS, value,
|
|
470
|
+
this.storageService.store(ViewDescriptorService_1.VIEWS_CUSTOMIZATIONS, value, StorageScope.PROFILE, StorageTarget.USER);
|
|
467
471
|
}
|
|
468
472
|
getViewsByContainer(viewContainer) {
|
|
469
473
|
const result = this.viewsRegistry.getViews(viewContainer).filter(viewDescriptor => {
|
|
@@ -492,13 +496,13 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
|
|
|
492
496
|
getOrRegisterViewContainerModel(viewContainer) {
|
|
493
497
|
let viewContainerModel = this.viewContainerModels.get(viewContainer)?.viewContainerModel;
|
|
494
498
|
if (!viewContainerModel) {
|
|
495
|
-
const disposables = (
|
|
499
|
+
const disposables = ( new DisposableStore());
|
|
496
500
|
viewContainerModel = disposables.add(this.instantiationService.createInstance(ViewContainerModel, viewContainer));
|
|
497
501
|
this.onDidChangeActiveViews({ added: viewContainerModel.activeViewDescriptors, removed: [] });
|
|
498
502
|
viewContainerModel.onDidChangeActiveViewDescriptors(changed => this.onDidChangeActiveViews(changed), this, disposables);
|
|
499
503
|
this.onDidChangeVisibleViews({ added: [...viewContainerModel.visibleViewDescriptors], removed: [] });
|
|
500
|
-
viewContainerModel.onDidAddVisibleViewDescriptors(added => this.onDidChangeVisibleViews({ added: (
|
|
501
|
-
viewContainerModel.onDidRemoveVisibleViewDescriptors(removed => this.onDidChangeVisibleViews({ added: [], removed: (
|
|
504
|
+
viewContainerModel.onDidAddVisibleViewDescriptors(added => this.onDidChangeVisibleViews({ added: ( added.map(({ viewDescriptor }) => viewDescriptor)), removed: [] }), this, disposables);
|
|
505
|
+
viewContainerModel.onDidRemoveVisibleViewDescriptors(removed => this.onDidChangeVisibleViews({ added: [], removed: ( removed.map(({ viewDescriptor }) => viewDescriptor)) }), this, disposables);
|
|
502
506
|
disposables.add(toDisposable(() => this.viewsVisibilityActionDisposables.deleteAndDispose(viewContainer)));
|
|
503
507
|
disposables.add(this.registerResetViewContainerAction(viewContainer));
|
|
504
508
|
const value = { viewContainerModel: viewContainerModel, disposables, dispose: () => disposables.dispose() };
|
|
@@ -542,7 +546,7 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
|
|
|
542
546
|
}));
|
|
543
547
|
}
|
|
544
548
|
registerViewsVisibilityActionsForContainer(viewContainerModel) {
|
|
545
|
-
const disposables = (
|
|
549
|
+
const disposables = ( new DisposableStore());
|
|
546
550
|
viewContainerModel.activeViewDescriptors.forEach((viewDescriptor, index) => {
|
|
547
551
|
if (!viewDescriptor.remoteAuthority) {
|
|
548
552
|
disposables.add(registerAction2(class extends ViewPaneContainerAction {
|
|
@@ -550,32 +554,28 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
|
|
|
550
554
|
super({
|
|
551
555
|
id: `${viewDescriptor.id}.toggleVisibility`,
|
|
552
556
|
viewPaneContainerId: viewContainerModel.viewContainer.id,
|
|
553
|
-
precondition: viewDescriptor.canToggleVisibility && (!viewContainerModel.isVisible(viewDescriptor.id) || viewContainerModel.visibleViewDescriptors.length > 1) ? ContextKeyExpr.true() : (
|
|
554
|
-
toggled: (
|
|
557
|
+
precondition: viewDescriptor.canToggleVisibility && (!viewContainerModel.isVisible(viewDescriptor.id) || viewContainerModel.visibleViewDescriptors.length > 1) ? ContextKeyExpr.true() : ( ContextKeyExpr.false()),
|
|
558
|
+
toggled: ( ContextKeyExpr.has(`${viewDescriptor.id}.visible`)),
|
|
555
559
|
title: viewDescriptor.name,
|
|
556
560
|
metadata: {
|
|
557
561
|
description: ( localize2(
|
|
558
|
-
|
|
562
|
+
12068,
|
|
559
563
|
'Toggles the visibility of the {0} view if the view container it is located in is visible',
|
|
560
564
|
viewDescriptor.name.value
|
|
561
565
|
))
|
|
562
566
|
},
|
|
563
567
|
menu: [{
|
|
564
568
|
id: ViewsSubMenu,
|
|
565
|
-
when: (
|
|
569
|
+
when: ( ContextKeyExpr.equals('viewContainer', viewContainerModel.viewContainer.id)),
|
|
566
570
|
order: index,
|
|
567
571
|
}, {
|
|
568
572
|
id: MenuId.ViewContainerTitleContext,
|
|
569
|
-
when: (
|
|
570
|
-
(ContextKeyExpr.equals('viewContainer', viewContainerModel.viewContainer.id))
|
|
571
|
-
))),
|
|
573
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('viewContainer', viewContainerModel.viewContainer.id)))),
|
|
572
574
|
order: index,
|
|
573
575
|
group: '1_toggleVisibility'
|
|
574
576
|
}, {
|
|
575
577
|
id: MenuId.ViewTitleContext,
|
|
576
|
-
when: (
|
|
577
|
-
...( (viewContainerModel.visibleViewDescriptors.map(v => ( (ContextKeyExpr.equals('view', v.id))))))
|
|
578
|
-
))))),
|
|
578
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.or(...( viewContainerModel.visibleViewDescriptors.map(v => ( ContextKeyExpr.equals('view', v.id)))))))),
|
|
579
579
|
order: index,
|
|
580
580
|
group: '2_toggleVisibility'
|
|
581
581
|
}]
|
|
@@ -590,21 +590,18 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
|
|
|
590
590
|
super({
|
|
591
591
|
id: `${viewDescriptor.id}.removeView`,
|
|
592
592
|
viewPaneContainerId: viewContainerModel.viewContainer.id,
|
|
593
|
-
title: ( localize(
|
|
593
|
+
title: ( localize(12069, "Hide '{0}'", viewDescriptor.name.value)),
|
|
594
594
|
metadata: {
|
|
595
595
|
description: ( localize2(
|
|
596
|
-
|
|
596
|
+
12070,
|
|
597
597
|
'Hides the {0} view if it is visible and the view container it is located in is visible',
|
|
598
598
|
viewDescriptor.name.value
|
|
599
599
|
))
|
|
600
600
|
},
|
|
601
|
-
precondition: viewDescriptor.canToggleVisibility && (!viewContainerModel.isVisible(viewDescriptor.id) || viewContainerModel.visibleViewDescriptors.length > 1) ? ContextKeyExpr.true() : (
|
|
601
|
+
precondition: viewDescriptor.canToggleVisibility && (!viewContainerModel.isVisible(viewDescriptor.id) || viewContainerModel.visibleViewDescriptors.length > 1) ? ContextKeyExpr.true() : ( ContextKeyExpr.false()),
|
|
602
602
|
menu: [{
|
|
603
603
|
id: MenuId.ViewTitleContext,
|
|
604
|
-
when: (
|
|
605
|
-
(ContextKeyExpr.equals('view', viewDescriptor.id)),
|
|
606
|
-
(ContextKeyExpr.has(`${viewDescriptor.id}.visible`))
|
|
607
|
-
))),
|
|
604
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('view', viewDescriptor.id)), ( ContextKeyExpr.has(`${viewDescriptor.id}.visible`)))),
|
|
608
605
|
group: '1_hide',
|
|
609
606
|
order: 1
|
|
610
607
|
}]
|
|
@@ -626,18 +623,17 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
|
|
|
626
623
|
constructor() {
|
|
627
624
|
super({
|
|
628
625
|
id: `${viewContainer.id}.resetViewContainerLocation`,
|
|
629
|
-
title: ( localize2(
|
|
626
|
+
title: ( localize2(12071, "Reset Location")),
|
|
630
627
|
menu: [{
|
|
631
628
|
id: MenuId.ViewContainerTitleContext,
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
(ContextKeyExpr.equals(`${viewContainer.id}.defaultViewContainerLocation`, false))
|
|
635
|
-
)))))
|
|
629
|
+
group: '1_viewActions',
|
|
630
|
+
when: ( ContextKeyExpr.or(( ContextKeyExpr.and(( ContextKeyExpr.equals('viewContainer', viewContainer.id)), ( ContextKeyExpr.equals(`${viewContainer.id}.defaultViewContainerLocation`, false))))))
|
|
636
631
|
}],
|
|
637
632
|
});
|
|
638
633
|
}
|
|
639
|
-
run() {
|
|
634
|
+
run(accessor) {
|
|
640
635
|
that.moveViewContainerToLocation(viewContainer, that.getDefaultViewContainerLocation(viewContainer), undefined, this.desc.id);
|
|
636
|
+
accessor.get(IViewsService).openViewContainer(viewContainer.id, true);
|
|
641
637
|
}
|
|
642
638
|
});
|
|
643
639
|
}
|
|
@@ -654,13 +650,13 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
|
|
|
654
650
|
}
|
|
655
651
|
});
|
|
656
652
|
});
|
|
657
|
-
this.getViewContainerModel(container).add((
|
|
653
|
+
this.getViewContainerModel(container).add(( views.map(view => {
|
|
658
654
|
return {
|
|
659
655
|
viewDescriptor: view,
|
|
660
656
|
collapsed: visibilityState === ViewVisibilityState.Default ? undefined : false,
|
|
661
657
|
visible: visibilityState === ViewVisibilityState.Default ? undefined : true
|
|
662
658
|
};
|
|
663
|
-
})))
|
|
659
|
+
})));
|
|
664
660
|
}
|
|
665
661
|
removeViews(container, views) {
|
|
666
662
|
this.contextKeyService.bufferChangeEvents(() => {
|
|
@@ -677,7 +673,7 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
|
|
|
677
673
|
const activeContextKeyId = `${viewDescriptor.id}.active`;
|
|
678
674
|
let contextKey = this.activeViewContextKeys.get(activeContextKeyId);
|
|
679
675
|
if (!contextKey) {
|
|
680
|
-
contextKey = (
|
|
676
|
+
contextKey = ( new RawContextKey(activeContextKeyId, false)).bindTo(this.contextKeyService);
|
|
681
677
|
this.activeViewContextKeys.set(activeContextKeyId, contextKey);
|
|
682
678
|
}
|
|
683
679
|
return contextKey;
|
|
@@ -686,7 +682,7 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
|
|
|
686
682
|
const activeContextKeyId = `${viewDescriptor.id}.visible`;
|
|
687
683
|
let contextKey = this.activeViewContextKeys.get(activeContextKeyId);
|
|
688
684
|
if (!contextKey) {
|
|
689
|
-
contextKey = (
|
|
685
|
+
contextKey = ( new RawContextKey(activeContextKeyId, false)).bindTo(this.contextKeyService);
|
|
690
686
|
this.activeViewContextKeys.set(activeContextKeyId, contextKey);
|
|
691
687
|
}
|
|
692
688
|
return contextKey;
|
|
@@ -695,7 +691,7 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
|
|
|
695
691
|
const movableViewContextKeyId = `${viewDescriptor.id}.canMove`;
|
|
696
692
|
let contextKey = this.movableViewContextKeys.get(movableViewContextKeyId);
|
|
697
693
|
if (!contextKey) {
|
|
698
|
-
contextKey = (
|
|
694
|
+
contextKey = ( new RawContextKey(movableViewContextKeyId, false)).bindTo(this.contextKeyService);
|
|
699
695
|
this.movableViewContextKeys.set(movableViewContextKeyId, contextKey);
|
|
700
696
|
}
|
|
701
697
|
return contextKey;
|
|
@@ -704,7 +700,7 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
|
|
|
704
700
|
const defaultViewLocationContextKeyId = `${viewDescriptor.id}.defaultViewLocation`;
|
|
705
701
|
let contextKey = this.defaultViewLocationContextKeys.get(defaultViewLocationContextKeyId);
|
|
706
702
|
if (!contextKey) {
|
|
707
|
-
contextKey = (
|
|
703
|
+
contextKey = ( new RawContextKey(defaultViewLocationContextKeyId, false)).bindTo(this.contextKeyService);
|
|
708
704
|
this.defaultViewLocationContextKeys.set(defaultViewLocationContextKeyId, contextKey);
|
|
709
705
|
}
|
|
710
706
|
return contextKey;
|
|
@@ -713,19 +709,19 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
|
|
|
713
709
|
const defaultViewContainerLocationContextKeyId = `${viewContainer.id}.defaultViewContainerLocation`;
|
|
714
710
|
let contextKey = this.defaultViewContainerLocationContextKeys.get(defaultViewContainerLocationContextKeyId);
|
|
715
711
|
if (!contextKey) {
|
|
716
|
-
contextKey = (
|
|
712
|
+
contextKey = ( new RawContextKey(defaultViewContainerLocationContextKeyId, false)).bindTo(this.contextKeyService);
|
|
717
713
|
this.defaultViewContainerLocationContextKeys.set(defaultViewContainerLocationContextKeyId, contextKey);
|
|
718
714
|
}
|
|
719
715
|
return contextKey;
|
|
720
716
|
}
|
|
721
717
|
};
|
|
722
|
-
ViewDescriptorService = ViewDescriptorService_1 = (
|
|
723
|
-
(
|
|
724
|
-
(
|
|
725
|
-
(
|
|
726
|
-
(
|
|
727
|
-
(
|
|
728
|
-
(
|
|
729
|
-
], ViewDescriptorService))
|
|
718
|
+
ViewDescriptorService = ViewDescriptorService_1 = ( __decorate([
|
|
719
|
+
( __param(0, IInstantiationService)),
|
|
720
|
+
( __param(1, IContextKeyService)),
|
|
721
|
+
( __param(2, IStorageService)),
|
|
722
|
+
( __param(3, IExtensionService)),
|
|
723
|
+
( __param(4, ITelemetryService)),
|
|
724
|
+
( __param(5, ILoggerService))
|
|
725
|
+
], ViewDescriptorService));
|
|
730
726
|
|
|
731
727
|
export { ViewDescriptorService };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { ViewContainer, IViewDescriptor, IViewContainerModel, IAddedViewDescriptorRef, IViewDescriptorRef, IAddedViewDescriptorState } from "vscode/vscode/vs/workbench/common/views";
|
|
2
|
+
import { IContextKeyService } from "vscode/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
3
|
+
import { Disposable } from "vscode/vscode/vs/base/common/lifecycle";
|
|
4
|
+
import { Event } from "vscode/vscode/vs/base/common/event";
|
|
5
|
+
import { IInstantiationService } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
|
|
6
|
+
import { URI } from "vscode/vscode/vs/base/common/uri";
|
|
7
|
+
import { ThemeIcon } from "vscode/vscode/vs/base/common/themables";
|
|
8
|
+
import { ILoggerService } from "vscode/vscode/vs/platform/log/common/log.service";
|
|
9
|
+
export declare function getViewsStateStorageId(viewContainerStorageId: string): string;
|
|
10
|
+
export declare class ViewContainerModel extends Disposable implements IViewContainerModel {
|
|
11
|
+
readonly viewContainer: ViewContainer;
|
|
12
|
+
private readonly contextKeyService;
|
|
13
|
+
private readonly contextKeys;
|
|
14
|
+
private viewDescriptorItems;
|
|
15
|
+
private viewDescriptorsState;
|
|
16
|
+
private _title;
|
|
17
|
+
get title(): string;
|
|
18
|
+
private _icon;
|
|
19
|
+
get icon(): URI | ThemeIcon | undefined;
|
|
20
|
+
private _keybindingId;
|
|
21
|
+
get keybindingId(): string | undefined;
|
|
22
|
+
private _onDidChangeContainerInfo;
|
|
23
|
+
readonly onDidChangeContainerInfo: Event<{
|
|
24
|
+
title?: boolean;
|
|
25
|
+
icon?: boolean;
|
|
26
|
+
keybindingId?: boolean;
|
|
27
|
+
}>;
|
|
28
|
+
get allViewDescriptors(): ReadonlyArray<IViewDescriptor>;
|
|
29
|
+
private _onDidChangeAllViewDescriptors;
|
|
30
|
+
readonly onDidChangeAllViewDescriptors: Event<{
|
|
31
|
+
added: ReadonlyArray<IViewDescriptor>;
|
|
32
|
+
removed: ReadonlyArray<IViewDescriptor>;
|
|
33
|
+
}>;
|
|
34
|
+
get activeViewDescriptors(): ReadonlyArray<IViewDescriptor>;
|
|
35
|
+
private _onDidChangeActiveViewDescriptors;
|
|
36
|
+
readonly onDidChangeActiveViewDescriptors: Event<{
|
|
37
|
+
added: ReadonlyArray<IViewDescriptor>;
|
|
38
|
+
removed: ReadonlyArray<IViewDescriptor>;
|
|
39
|
+
}>;
|
|
40
|
+
get visibleViewDescriptors(): ReadonlyArray<IViewDescriptor>;
|
|
41
|
+
private _onDidAddVisibleViewDescriptors;
|
|
42
|
+
readonly onDidAddVisibleViewDescriptors: Event<IAddedViewDescriptorRef[]>;
|
|
43
|
+
private _onDidRemoveVisibleViewDescriptors;
|
|
44
|
+
readonly onDidRemoveVisibleViewDescriptors: Event<IViewDescriptorRef[]>;
|
|
45
|
+
private _onDidMoveVisibleViewDescriptors;
|
|
46
|
+
readonly onDidMoveVisibleViewDescriptors: Event<{
|
|
47
|
+
from: IViewDescriptorRef;
|
|
48
|
+
to: IViewDescriptorRef;
|
|
49
|
+
}>;
|
|
50
|
+
private readonly logger;
|
|
51
|
+
constructor(viewContainer: ViewContainer, instantiationService: IInstantiationService, contextKeyService: IContextKeyService, loggerService: ILoggerService);
|
|
52
|
+
private updateContainerInfo;
|
|
53
|
+
private isEqualIcon;
|
|
54
|
+
isVisible(id: string): boolean;
|
|
55
|
+
setVisible(id: string, visible: boolean): void;
|
|
56
|
+
private updateVisibility;
|
|
57
|
+
private updateViewDescriptorItemVisibility;
|
|
58
|
+
isCollapsed(id: string): boolean;
|
|
59
|
+
setCollapsed(id: string, collapsed: boolean): void;
|
|
60
|
+
getSize(id: string): number | undefined;
|
|
61
|
+
setSizes(newSizes: readonly {
|
|
62
|
+
id: string;
|
|
63
|
+
size: number;
|
|
64
|
+
}[]): void;
|
|
65
|
+
move(from: string, to: string): void;
|
|
66
|
+
add(addedViewDescriptorStates: IAddedViewDescriptorState[]): void;
|
|
67
|
+
remove(viewDescriptors: IViewDescriptor[]): void;
|
|
68
|
+
private onDidChangeContext;
|
|
69
|
+
private broadCastAddedVisibleViewDescriptors;
|
|
70
|
+
private broadCastRemovedVisibleViewDescriptors;
|
|
71
|
+
private broadCastMovedViewDescriptors;
|
|
72
|
+
private updateState;
|
|
73
|
+
private isViewDescriptorVisible;
|
|
74
|
+
private isViewDescriptorVisibleWhenActive;
|
|
75
|
+
private find;
|
|
76
|
+
private findAndIgnoreIfNotFound;
|
|
77
|
+
private compareViewDescriptors;
|
|
78
|
+
private getViewOrder;
|
|
79
|
+
private getGroupOrderResult;
|
|
80
|
+
}
|