@codingame/monaco-vscode-view-common-service-override 9.0.2 → 10.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/override/vs/workbench/browser/parts/editor/textEditor.weak.js +1 -1
- package/package.json +3 -3
- package/viewCommon.js +4 -1
- package/vscode/src/vs/base/browser/ui/centered/centeredViewLayout.js +1 -2
- package/vscode/src/vs/base/browser/ui/grid/grid.js +24 -34
- package/vscode/src/vs/base/browser/ui/grid/gridview.js +34 -35
- package/vscode/src/vs/platform/actions/browser/actionViewItemService.js +38 -0
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +65 -65
- package/vscode/src/vs/workbench/browser/actions/listCommands.js +85 -85
- package/vscode/src/vs/workbench/browser/actions/navigationActions.js +74 -80
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +73 -69
- package/vscode/src/vs/workbench/browser/parts/activitybar/media/activityaction.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +21 -24
- package/vscode/src/vs/workbench/browser/parts/compositeBar.js +77 -59
- package/vscode/src/vs/workbench/browser/parts/compositePart.js +9 -11
- package/vscode/src/vs/workbench/browser/parts/editor/auxiliaryEditorPart.js +3 -4
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +172 -173
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +10 -10
- package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +16 -18
- package/vscode/src/vs/workbench/browser/parts/editor/editorPart.js +55 -61
- package/vscode/src/vs/workbench/browser/parts/editor/editorParts.js +19 -22
- package/vscode/src/vs/workbench/browser/parts/media/paneCompositePart.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.js +76 -65
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +37 -18
- package/vscode/src/vs/workbench/browser/parts/paneCompositePartService.js +4 -5
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +20 -15
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarActions.js +6 -10
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +31 -45
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +37 -40
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +18 -28
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +8 -8
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.js +2 -3
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +1 -2
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +1 -2
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +3 -4
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +2 -8
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +14 -15
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution.js +0 -1
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +21 -21
- package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +9 -10
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +28 -29
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.js +14 -14
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +6 -7
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.js +13 -13
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editorGutter.js +4 -3
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +9 -7
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.js +2 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +19 -19
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +10 -9
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +9 -13
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.js +26 -26
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +6 -6
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewZones.js +2 -2
- package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +16 -17
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js +3 -4
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +33 -36
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +18 -28
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +8 -8
- package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.js +2 -2
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +7 -8
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +13 -15
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +3 -4
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +3 -4
- package/vscode/src/vs/workbench/services/activity/browser/activityService.js +0 -1
- package/vscode/src/vs/workbench/services/editor/browser/editorPaneService.js +0 -1
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +28 -30
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +71 -74
- package/vscode/src/vs/workbench/services/progress/browser/progressService.js +22 -26
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.js +0 -1
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +16 -18
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +9 -10
|
@@ -2,9 +2,8 @@ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
|
2
2
|
import './media/progressService.css.js';
|
|
3
3
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
4
4
|
import { Disposable, toDisposable, DisposableStore, dispose } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
|
-
import {
|
|
5
|
+
import { Progress } from 'vscode/vscode/vs/platform/progress/common/progress';
|
|
6
6
|
import 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
7
|
-
import { StatusbarAlignment } from 'vscode/vscode/vs/workbench/services/statusbar/browser/statusbar';
|
|
8
7
|
import { IStatusbarService } from 'vscode/vscode/vs/workbench/services/statusbar/browser/statusbar.service';
|
|
9
8
|
import { timeout, DeferredPromise, RunOnceScheduler } from 'vscode/vscode/vs/base/common/async';
|
|
10
9
|
import { ProgressBadge } from 'vscode/vscode/vs/workbench/services/activity/common/activity';
|
|
@@ -13,19 +12,16 @@ import { NotificationPriority, NotificationsFilter, isNotificationSource } from
|
|
|
13
12
|
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
|
|
14
13
|
import { Action } from 'vscode/vscode/vs/base/common/actions';
|
|
15
14
|
import { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
|
|
16
|
-
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
17
15
|
import { ILayoutService } from 'vscode/vscode/vs/platform/layout/browser/layoutService.service';
|
|
18
16
|
import { Dialog } from 'vscode/vscode/vs/base/browser/ui/dialog/dialog';
|
|
19
17
|
import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
20
18
|
import { EventHelper } from 'vscode/vscode/vs/base/browser/dom';
|
|
21
19
|
import { parseLinkedText } from 'vscode/vscode/vs/base/common/linkedText';
|
|
22
|
-
import { ViewContainerLocation } from 'vscode/vscode/vs/workbench/common/views';
|
|
23
20
|
import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views.service';
|
|
24
21
|
import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
25
22
|
import { IPaneCompositePartService } from 'vscode/vscode/vs/workbench/services/panecomposite/browser/panecomposite.service';
|
|
26
23
|
import { stripIcons } from 'vscode/vscode/vs/base/common/iconLabels';
|
|
27
24
|
import { defaultButtonStyles, defaultCheckboxStyles, defaultInputBoxStyles, defaultDialogStyles } from 'vscode/vscode/vs/platform/theme/browser/defaultStyles';
|
|
28
|
-
import { ResultKind } from 'vscode/vscode/vs/platform/keybinding/common/keybindingResolver';
|
|
29
25
|
import { IUserActivityService } from 'vscode/vscode/vs/workbench/services/userActivity/common/userActivityService.service';
|
|
30
26
|
import Severity$1 from 'vscode/vscode/vs/base/common/severity';
|
|
31
27
|
|
|
@@ -72,7 +68,7 @@ let ProgressService = class ProgressService extends Disposable {
|
|
|
72
68
|
return handleStringLocation(location);
|
|
73
69
|
}
|
|
74
70
|
switch (location) {
|
|
75
|
-
case
|
|
71
|
+
case 15 : {
|
|
76
72
|
let priority = options.priority;
|
|
77
73
|
if (priority !== NotificationPriority.URGENT) {
|
|
78
74
|
if (this.notificationService.getFilter() === NotificationsFilter.ERROR) {
|
|
@@ -84,20 +80,20 @@ let ProgressService = class ProgressService extends Disposable {
|
|
|
84
80
|
}
|
|
85
81
|
return this.withNotificationProgress({ ...options, location, priority }, task, onDidCancel);
|
|
86
82
|
}
|
|
87
|
-
case
|
|
83
|
+
case 10 : {
|
|
88
84
|
const type = options.type;
|
|
89
85
|
if (options.command) {
|
|
90
86
|
return this.withWindowProgress({ ...options, location, type }, task);
|
|
91
87
|
}
|
|
92
|
-
return this.withNotificationProgress({ delay: 150 , ...options, priority: NotificationPriority.SILENT, location:
|
|
88
|
+
return this.withNotificationProgress({ delay: 150 , ...options, priority: NotificationPriority.SILENT, location: 15 , type }, task, onDidCancel);
|
|
93
89
|
}
|
|
94
|
-
case
|
|
95
|
-
return this.withPaneCompositeProgress('workbench.view.explorer',
|
|
96
|
-
case
|
|
90
|
+
case 1 :
|
|
91
|
+
return this.withPaneCompositeProgress('workbench.view.explorer', 0 , task, { ...options, location });
|
|
92
|
+
case 3 :
|
|
97
93
|
return handleStringLocation('workbench.scm');
|
|
98
|
-
case
|
|
99
|
-
return this.withPaneCompositeProgress('workbench.view.extensions',
|
|
100
|
-
case
|
|
94
|
+
case 5 :
|
|
95
|
+
return this.withPaneCompositeProgress('workbench.view.extensions', 0 , task, { ...options, location });
|
|
96
|
+
case 20 :
|
|
101
97
|
return this.withDialogProgress(options, task, onDidCancel);
|
|
102
98
|
default:
|
|
103
99
|
throw ( (new Error(`Bad progress location: ${location}`)));
|
|
@@ -131,23 +127,23 @@ let ProgressService = class ProgressService extends Disposable {
|
|
|
131
127
|
let title;
|
|
132
128
|
const source = options.source && typeof options.source !== 'string' ? options.source.label : options.source;
|
|
133
129
|
if (progressTitle && progressMessage) {
|
|
134
|
-
text = ( localize(
|
|
135
|
-
title = source ? ( localize(
|
|
130
|
+
text = ( localize(4210, "{0}: {1}", progressTitle, progressMessage));
|
|
131
|
+
title = source ? ( localize(4211, "[{0}] {1}: {2}", source, progressTitle, progressMessage)) : text;
|
|
136
132
|
}
|
|
137
133
|
else if (progressTitle) {
|
|
138
134
|
text = progressTitle;
|
|
139
|
-
title = source ? ( localize(
|
|
135
|
+
title = source ? ( localize(4212, "[{0}]: {1}", source, progressTitle)) : text;
|
|
140
136
|
}
|
|
141
137
|
else if (progressMessage) {
|
|
142
138
|
text = progressMessage;
|
|
143
|
-
title = source ? ( localize(
|
|
139
|
+
title = source ? ( localize(4212, "[{0}]: {1}", source, progressMessage)) : text;
|
|
144
140
|
}
|
|
145
141
|
else {
|
|
146
142
|
this.updateWindowProgress(idx + 1);
|
|
147
143
|
return;
|
|
148
144
|
}
|
|
149
145
|
const statusEntryProperties = {
|
|
150
|
-
name: ( localize(
|
|
146
|
+
name: ( localize(4213, "Progress Message")),
|
|
151
147
|
text,
|
|
152
148
|
showProgress: options.type || true,
|
|
153
149
|
ariaLabel: text,
|
|
@@ -158,7 +154,7 @@ let ProgressService = class ProgressService extends Disposable {
|
|
|
158
154
|
this.windowProgressStatusEntry.update(statusEntryProperties);
|
|
159
155
|
}
|
|
160
156
|
else {
|
|
161
|
-
this.windowProgressStatusEntry = this.statusbarService.addEntry(statusEntryProperties, 'status.progress',
|
|
157
|
+
this.windowProgressStatusEntry = this.statusbarService.addEntry(statusEntryProperties, 'status.progress', 0 );
|
|
162
158
|
}
|
|
163
159
|
}
|
|
164
160
|
else {
|
|
@@ -200,7 +196,7 @@ let ProgressService = class ProgressService extends Disposable {
|
|
|
200
196
|
const createWindowProgress = () => {
|
|
201
197
|
const promise = ( (new DeferredPromise()));
|
|
202
198
|
this.withWindowProgress({
|
|
203
|
-
location:
|
|
199
|
+
location: 10 ,
|
|
204
200
|
title: options.title ? ( (parseLinkedText(options.title).toString())) : undefined,
|
|
205
201
|
command: 'notifications.showList',
|
|
206
202
|
type: options.type
|
|
@@ -243,7 +239,7 @@ let ProgressService = class ProgressService extends Disposable {
|
|
|
243
239
|
if (options.cancellable) {
|
|
244
240
|
const cancelAction = new (class extends Action {
|
|
245
241
|
constructor() {
|
|
246
|
-
super('progress.cancel', ( localize(
|
|
242
|
+
super('progress.cancel', ( localize(4214, "Cancel")), undefined, true);
|
|
247
243
|
}
|
|
248
244
|
async run() {
|
|
249
245
|
progressStateModel.cancel();
|
|
@@ -334,7 +330,7 @@ let ProgressService = class ProgressService extends Disposable {
|
|
|
334
330
|
withPaneCompositeProgress(paneCompositeId, viewContainerLocation, task, options) {
|
|
335
331
|
const progressIndicator = this.paneCompositeService.getProgressIndicator(paneCompositeId, viewContainerLocation);
|
|
336
332
|
const promise = progressIndicator ? this.withCompositeProgress(progressIndicator, task, options) : task({ report: () => { } });
|
|
337
|
-
if (viewContainerLocation ===
|
|
333
|
+
if (viewContainerLocation === 0 ) {
|
|
338
334
|
this.showOnActivityBar(paneCompositeId, options, promise);
|
|
339
335
|
}
|
|
340
336
|
return promise;
|
|
@@ -343,7 +339,7 @@ let ProgressService = class ProgressService extends Disposable {
|
|
|
343
339
|
const progressIndicator = this.viewsService.getViewProgressIndicator(viewId);
|
|
344
340
|
const promise = progressIndicator ? this.withCompositeProgress(progressIndicator, task, options) : task({ report: () => { } });
|
|
345
341
|
const location = this.viewDescriptorService.getViewLocationById(viewId);
|
|
346
|
-
if (location !==
|
|
342
|
+
if (location !== 0 ) {
|
|
347
343
|
return promise;
|
|
348
344
|
}
|
|
349
345
|
const viewletId = this.viewDescriptorService.getViewContainerByViewId(viewId)?.id;
|
|
@@ -428,7 +424,7 @@ let ProgressService = class ProgressService extends Disposable {
|
|
|
428
424
|
const createDialog = (message) => {
|
|
429
425
|
const buttons = options.buttons || [];
|
|
430
426
|
if (!options.sticky) {
|
|
431
|
-
buttons.push(options.cancellable ? ( localize(
|
|
427
|
+
buttons.push(options.cancellable ? ( localize(4214, "Cancel")) : ( localize(4215, "Dismiss")));
|
|
432
428
|
}
|
|
433
429
|
dialog = ( (new Dialog(this.layoutService.activeContainer, message, buttons, {
|
|
434
430
|
type: 'pending',
|
|
@@ -438,7 +434,7 @@ let ProgressService = class ProgressService extends Disposable {
|
|
|
438
434
|
disableDefaultAction: options.sticky,
|
|
439
435
|
keyEventProcessor: (event) => {
|
|
440
436
|
const resolved = this.keybindingService.softDispatch(event, this.layoutService.activeContainer);
|
|
441
|
-
if (resolved.kind ===
|
|
437
|
+
if (resolved.kind === 2 && resolved.commandId) {
|
|
442
438
|
if (!allowableCommands.includes(resolved.commandId)) {
|
|
443
439
|
EventHelper.stop(event, true);
|
|
444
440
|
}
|
|
@@ -7,7 +7,6 @@ import { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
|
|
|
7
7
|
import { ResourceMap } from 'vscode/vscode/vs/base/common/map';
|
|
8
8
|
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
9
9
|
import { Disposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
10
|
-
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
11
10
|
|
|
12
11
|
var UntitledTextEditorService_1;
|
|
13
12
|
let UntitledTextEditorService = class UntitledTextEditorService extends Disposable {
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
|
-
import { VIEWS_LOG_ID, VIEWS_LOG_NAME, Extensions,
|
|
2
|
+
import { VIEWS_LOG_ID, VIEWS_LOG_NAME, Extensions, ViewVisibilityState, defaultViewIcon, ViewContainerLocationToString } from 'vscode/vscode/vs/workbench/common/views';
|
|
3
3
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
4
4
|
import { ContextKeyExpr, RawContextKey } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
5
5
|
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
6
|
-
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
7
6
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
8
7
|
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
9
8
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
10
9
|
import { Disposable, DisposableMap, DisposableStore, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
11
10
|
import { ViewPaneContainer, ViewPaneContainerAction, ViewsSubMenu } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPaneContainer';
|
|
12
11
|
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
13
|
-
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
14
12
|
import { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
|
|
15
13
|
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
16
14
|
import { generateUuid } from 'vscode/vscode/vs/base/common/uuid';
|
|
@@ -70,15 +68,15 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
|
|
|
70
68
|
this.onDidDeregisterViewContainer(viewContainer);
|
|
71
69
|
this._onDidChangeViewContainers.fire({ removed: [{ container: viewContainer, location: viewContainerLocation }], added: [] });
|
|
72
70
|
}));
|
|
73
|
-
this._register(this.storageService.onDidChangeValue(
|
|
71
|
+
this._register(this.storageService.onDidChangeValue(0 , ViewDescriptorService_1.VIEWS_CUSTOMIZATIONS, this._register(( (new DisposableStore()))))(() => this.onDidStorageChange()));
|
|
74
72
|
this.extensionService.whenInstalledExtensionsRegistered().then(() => this.whenExtensionsRegistered());
|
|
75
73
|
}
|
|
76
74
|
migrateToViewsCustomizationsStorage() {
|
|
77
|
-
if (this.storageService.get(ViewDescriptorService_1.VIEWS_CUSTOMIZATIONS,
|
|
75
|
+
if (this.storageService.get(ViewDescriptorService_1.VIEWS_CUSTOMIZATIONS, 0 )) {
|
|
78
76
|
return;
|
|
79
77
|
}
|
|
80
|
-
const viewContainerLocationsValue = this.storageService.get('views.cachedViewContainerLocations',
|
|
81
|
-
const viewDescriptorLocationsValue = this.storageService.get('views.cachedViewPositions',
|
|
78
|
+
const viewContainerLocationsValue = this.storageService.get('views.cachedViewContainerLocations', 0 );
|
|
79
|
+
const viewDescriptorLocationsValue = this.storageService.get('views.cachedViewPositions', 0 );
|
|
82
80
|
if (!viewContainerLocationsValue && !viewDescriptorLocationsValue) {
|
|
83
81
|
return;
|
|
84
82
|
}
|
|
@@ -89,9 +87,9 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
|
|
|
89
87
|
viewLocations: viewDescriptorLocations.reduce((result, [id, { containerId }]) => { result[id] = containerId; return result; }, {}),
|
|
90
88
|
viewContainerBadgeEnablementStates: {}
|
|
91
89
|
};
|
|
92
|
-
this.storageService.store(ViewDescriptorService_1.VIEWS_CUSTOMIZATIONS, JSON.stringify(viewsCustomizations),
|
|
93
|
-
this.storageService.remove('views.cachedViewContainerLocations',
|
|
94
|
-
this.storageService.remove('views.cachedViewPositions',
|
|
90
|
+
this.storageService.store(ViewDescriptorService_1.VIEWS_CUSTOMIZATIONS, JSON.stringify(viewsCustomizations), 0 , 0 );
|
|
91
|
+
this.storageService.remove('views.cachedViewContainerLocations', 0 );
|
|
92
|
+
this.storageService.remove('views.cachedViewPositions', 0 );
|
|
95
93
|
}
|
|
96
94
|
registerGroupedViews(groupedViews) {
|
|
97
95
|
for (const [containerId, views] of groupedViews.entries()) {
|
|
@@ -287,8 +285,8 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
|
|
|
287
285
|
const viewCount = views.length;
|
|
288
286
|
const fromContainer = containerToString(from);
|
|
289
287
|
const toContainer = containerToString(to);
|
|
290
|
-
const fromLocation = oldLocation ===
|
|
291
|
-
const toLocation = newLocation ===
|
|
288
|
+
const fromLocation = oldLocation === 1 ? 'panel' : 'sidebar';
|
|
289
|
+
const toLocation = newLocation === 1 ? 'panel' : 'sidebar';
|
|
292
290
|
this.telemetryService.publicLog2('viewDescriptorService.moveViews', { viewCount, fromContainer, toContainer, fromLocation, toLocation });
|
|
293
291
|
}
|
|
294
292
|
moveViewsWithoutSaving(views, from, to, visibilityState = ViewVisibilityState.Expand) {
|
|
@@ -336,7 +334,7 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
|
|
|
336
334
|
}
|
|
337
335
|
this.viewContainersCustomLocations.delete(viewContainerId);
|
|
338
336
|
this.viewContainerBadgeEnablementStates.delete(viewContainerId);
|
|
339
|
-
this.storageService.remove(getViewsStateStorageId(viewContainer?.storageId || getViewContainerStorageId(viewContainerId)),
|
|
337
|
+
this.storageService.remove(getViewsStateStorageId(viewContainer?.storageId || getViewContainerStorageId(viewContainerId)), 0 );
|
|
340
338
|
}
|
|
341
339
|
registerGeneratedViewContainer(location, existingId) {
|
|
342
340
|
const id = existingId || this.generateContainerId(location);
|
|
@@ -344,7 +342,7 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
|
|
|
344
342
|
id,
|
|
345
343
|
ctorDescriptor: ( (new SyncDescriptor(ViewPaneContainer, [id, { mergeViewWithContainerWhenSingleView: true }]))),
|
|
346
344
|
title: { value: id, original: id },
|
|
347
|
-
icon: location ===
|
|
345
|
+
icon: location === 0 ? defaultViewIcon : undefined,
|
|
348
346
|
storageId: getViewContainerStorageId(id),
|
|
349
347
|
hideIfEmpty: true
|
|
350
348
|
}, location, { doNotRegisterOpenCommand: true });
|
|
@@ -462,10 +460,10 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
|
|
|
462
460
|
}
|
|
463
461
|
}
|
|
464
462
|
getStoredViewCustomizationsValue() {
|
|
465
|
-
return this.storageService.get(ViewDescriptorService_1.VIEWS_CUSTOMIZATIONS,
|
|
463
|
+
return this.storageService.get(ViewDescriptorService_1.VIEWS_CUSTOMIZATIONS, 0 , '{}');
|
|
466
464
|
}
|
|
467
465
|
setStoredViewCustomizationsValue(value) {
|
|
468
|
-
this.storageService.store(ViewDescriptorService_1.VIEWS_CUSTOMIZATIONS, value,
|
|
466
|
+
this.storageService.store(ViewDescriptorService_1.VIEWS_CUSTOMIZATIONS, value, 0 , 0 );
|
|
469
467
|
}
|
|
470
468
|
getViewsByContainer(viewContainer) {
|
|
471
469
|
const result = this.viewsRegistry.getViews(viewContainer).filter(viewDescriptor => {
|
|
@@ -585,7 +583,7 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
|
|
|
585
583
|
super({
|
|
586
584
|
id: `${viewDescriptor.id}.removeView`,
|
|
587
585
|
viewPaneContainerId: viewContainerModel.viewContainer.id,
|
|
588
|
-
title: ( localize(
|
|
586
|
+
title: ( localize(4149, "Hide '{0}'", viewDescriptor.name.value)),
|
|
589
587
|
precondition: viewDescriptor.canToggleVisibility && (!viewContainerModel.isVisible(viewDescriptor.id) || viewContainerModel.visibleViewDescriptors.length > 1) ? ContextKeyExpr.true() : ( (ContextKeyExpr.false())),
|
|
590
588
|
menu: [{
|
|
591
589
|
id: MenuId.ViewTitleContext,
|
|
@@ -612,7 +610,7 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
|
|
|
612
610
|
constructor() {
|
|
613
611
|
super({
|
|
614
612
|
id: `${viewContainer.id}.resetViewContainerLocation`,
|
|
615
|
-
title: ( localize2(
|
|
613
|
+
title: ( localize2(4150, "Reset Location")),
|
|
616
614
|
menu: [{
|
|
617
615
|
id: MenuId.ViewContainerTitleContext,
|
|
618
616
|
when: ( (ContextKeyExpr.or( (ContextKeyExpr.and(
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { VIEWS_LOG_ID, VIEWS_LOG_NAME, Extensions, defaultViewIcon } from 'vscode/vscode/vs/workbench/common/views';
|
|
3
3
|
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
4
|
-
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
5
4
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
6
5
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
7
6
|
import { Disposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
@@ -24,7 +23,7 @@ registerAction2(class extends Action2 {
|
|
|
24
23
|
constructor() {
|
|
25
24
|
super({
|
|
26
25
|
id: '_workbench.output.showViewsLog',
|
|
27
|
-
title: ( localize2(
|
|
26
|
+
title: ( localize2(9613, "Show Views Log")),
|
|
28
27
|
category: Categories.Developer,
|
|
29
28
|
f1: true
|
|
30
29
|
});
|
|
@@ -49,7 +48,7 @@ let ViewDescriptorsState = class ViewDescriptorsState extends Disposable {
|
|
|
49
48
|
)));
|
|
50
49
|
this.globalViewsStateStorageId = getViewsStateStorageId(viewContainerStorageId);
|
|
51
50
|
this.workspaceViewsStateStorageId = viewContainerStorageId;
|
|
52
|
-
this._register(this.storageService.onDidChangeValue(
|
|
51
|
+
this._register(this.storageService.onDidChangeValue(0 , this.globalViewsStateStorageId, this._register(( (new DisposableStore()))))(() => this.onDidStorageChange()));
|
|
53
52
|
this.state = this.initialize();
|
|
54
53
|
}
|
|
55
54
|
set(id, state) {
|
|
@@ -76,10 +75,10 @@ let ViewDescriptorsState = class ViewDescriptorsState extends Disposable {
|
|
|
76
75
|
}
|
|
77
76
|
}
|
|
78
77
|
if (( (Object.keys(storedViewsStates))).length > 0) {
|
|
79
|
-
this.storageService.store(this.workspaceViewsStateStorageId, JSON.stringify(storedViewsStates),
|
|
78
|
+
this.storageService.store(this.workspaceViewsStateStorageId, JSON.stringify(storedViewsStates), 1 , 1 );
|
|
80
79
|
}
|
|
81
80
|
else {
|
|
82
|
-
this.storageService.remove(this.workspaceViewsStateStorageId,
|
|
81
|
+
this.storageService.remove(this.workspaceViewsStateStorageId, 1 );
|
|
83
82
|
}
|
|
84
83
|
}
|
|
85
84
|
updateGlobalState(viewDescriptors) {
|
|
@@ -147,7 +146,7 @@ let ViewDescriptorsState = class ViewDescriptorsState extends Disposable {
|
|
|
147
146
|
size: workspaceViewState.size,
|
|
148
147
|
});
|
|
149
148
|
}
|
|
150
|
-
const value = this.storageService.get(this.globalViewsStateStorageId,
|
|
149
|
+
const value = this.storageService.get(this.globalViewsStateStorageId, 1 , '[]');
|
|
151
150
|
const { state: workspaceVisibilityStates } = this.parseStoredGlobalState(value);
|
|
152
151
|
if (workspaceVisibilityStates.size > 0) {
|
|
153
152
|
for (const { id, isHidden } of ( (workspaceVisibilityStates.values()))) {
|
|
@@ -166,7 +165,7 @@ let ViewDescriptorsState = class ViewDescriptorsState extends Disposable {
|
|
|
166
165
|
});
|
|
167
166
|
}
|
|
168
167
|
}
|
|
169
|
-
this.storageService.remove(this.globalViewsStateStorageId,
|
|
168
|
+
this.storageService.remove(this.globalViewsStateStorageId, 1 );
|
|
170
169
|
}
|
|
171
170
|
const { state, hasDuplicates } = this.parseStoredGlobalState(this.globalViewsStatesValue);
|
|
172
171
|
if (hasDuplicates) {
|
|
@@ -193,7 +192,7 @@ let ViewDescriptorsState = class ViewDescriptorsState extends Disposable {
|
|
|
193
192
|
return viewStates;
|
|
194
193
|
}
|
|
195
194
|
getStoredWorkspaceState() {
|
|
196
|
-
return JSON.parse(this.storageService.get(this.workspaceViewsStateStorageId,
|
|
195
|
+
return JSON.parse(this.storageService.get(this.workspaceViewsStateStorageId, 1 , '{}'));
|
|
197
196
|
}
|
|
198
197
|
getStoredGlobalState() {
|
|
199
198
|
return this.parseStoredGlobalState(this.globalViewsStatesValue).state;
|
|
@@ -230,10 +229,10 @@ let ViewDescriptorsState = class ViewDescriptorsState extends Disposable {
|
|
|
230
229
|
}
|
|
231
230
|
}
|
|
232
231
|
getStoredGlobalViewsStatesValue() {
|
|
233
|
-
return this.storageService.get(this.globalViewsStateStorageId,
|
|
232
|
+
return this.storageService.get(this.globalViewsStateStorageId, 0 , '[]');
|
|
234
233
|
}
|
|
235
234
|
setStoredGlobalViewsStatesValue(value) {
|
|
236
|
-
this.storageService.store(this.globalViewsStateStorageId, value,
|
|
235
|
+
this.storageService.store(this.globalViewsStateStorageId, value, 0 , 0 );
|
|
237
236
|
}
|
|
238
237
|
};
|
|
239
238
|
ViewDescriptorsState = ( (__decorate([
|