@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
|
@@ -3,10 +3,8 @@ import './media/paneCompositePart.css.js';
|
|
|
3
3
|
import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
4
4
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
5
5
|
import { Extensions } from 'vscode/vscode/vs/workbench/browser/panecomposite';
|
|
6
|
-
import { ViewContainerLocation } from 'vscode/vscode/vs/workbench/common/views';
|
|
7
6
|
import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views.service';
|
|
8
7
|
import { DisposableStore, MutableDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
9
|
-
import { Parts } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
10
8
|
import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService.service';
|
|
11
9
|
import { CompositePart } from './compositePart.js';
|
|
12
10
|
import { PaneCompositeBar } from './paneCompositeBar.js';
|
|
@@ -25,14 +23,14 @@ import { EDITOR_DRAG_AND_DROP_BACKGROUND } from 'vscode/vscode/vs/workbench/comm
|
|
|
25
23
|
import { CompositeMenuActions } from 'vscode/vscode/vs/workbench/browser/actions';
|
|
26
24
|
import { MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
27
25
|
import { IMenuService } from 'vscode/vscode/vs/platform/actions/common/actions.service';
|
|
28
|
-
import {
|
|
26
|
+
import { prepareActions } from 'vscode/vscode/vs/base/browser/ui/actionbar/actionbar';
|
|
29
27
|
import { Gesture, EventType as EventType$1 } from 'vscode/vscode/vs/base/browser/touch';
|
|
30
28
|
import { StandardMouseEvent } from 'vscode/vscode/vs/base/browser/mouseEvent';
|
|
31
29
|
import { SubmenuAction } from 'vscode/vscode/vs/base/common/actions';
|
|
32
30
|
import { ViewsSubMenu } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPaneContainer';
|
|
33
31
|
import { createAndFillInActionBarActions } from 'vscode/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
|
|
34
32
|
import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover.service';
|
|
35
|
-
import { WorkbenchToolBar
|
|
33
|
+
import { WorkbenchToolBar } from 'vscode/vscode/vs/platform/actions/browser/toolbar';
|
|
36
34
|
|
|
37
35
|
var AbstractPaneCompositePart_1;
|
|
38
36
|
var CompositeBarPosition;
|
|
@@ -51,16 +49,16 @@ let AbstractPaneCompositePart = class AbstractPaneCompositePart extends Composit
|
|
|
51
49
|
(Event.map(this.onDidCompositeOpen.event, compositeEvent => compositeEvent.composite))
|
|
52
50
|
); }
|
|
53
51
|
constructor(partId, partOptions, activePaneCompositeSettingsKey, activePaneContextKey, paneFocusContextKey, nameForTelemetry, compositeCSSClass, titleForegroundColor, notificationService, storageService, contextMenuService, layoutService, keybindingService, hoverService, instantiationService, themeService, viewDescriptorService, contextKeyService, extensionService, menuService) {
|
|
54
|
-
let location =
|
|
52
|
+
let location = 0 ;
|
|
55
53
|
let registryId = Extensions.Viewlets;
|
|
56
54
|
let globalActionsMenuId = MenuId.SidebarTitle;
|
|
57
|
-
if (partId ===
|
|
58
|
-
location =
|
|
55
|
+
if (partId === "workbench.parts.panel" ) {
|
|
56
|
+
location = 1 ;
|
|
59
57
|
registryId = Extensions.Panels;
|
|
60
58
|
globalActionsMenuId = MenuId.PanelTitle;
|
|
61
59
|
}
|
|
62
|
-
else if (partId ===
|
|
63
|
-
location =
|
|
60
|
+
else if (partId === "workbench.parts.auxiliarybar" ) {
|
|
61
|
+
location = 2 ;
|
|
64
62
|
registryId = Extensions.Auxiliary;
|
|
65
63
|
globalActionsMenuId = MenuId.AuxiliaryBarTitle;
|
|
66
64
|
}
|
|
@@ -142,10 +140,10 @@ let AbstractPaneCompositePart = class AbstractPaneCompositePart extends Composit
|
|
|
142
140
|
this.emptyPaneMessageElement.classList.add('empty-pane-message-area');
|
|
143
141
|
const messageElement = document.createElement('div');
|
|
144
142
|
messageElement.classList.add('empty-pane-message');
|
|
145
|
-
messageElement.innerText = ( localize(
|
|
143
|
+
messageElement.innerText = ( localize(9406, "Drag a view here to display."));
|
|
146
144
|
this.emptyPaneMessageElement.appendChild(messageElement);
|
|
147
145
|
parent.appendChild(this.emptyPaneMessageElement);
|
|
148
|
-
this._register(CompositeDragAndDropObserver.INSTANCE.registerTarget(this.
|
|
146
|
+
this._register(CompositeDragAndDropObserver.INSTANCE.registerTarget(this.element, {
|
|
149
147
|
onDragOver: (e) => {
|
|
150
148
|
EventHelper.stop(e.eventData, true);
|
|
151
149
|
if (this.paneCompositeBar.value) {
|
|
@@ -174,6 +172,24 @@ let AbstractPaneCompositePart = class AbstractPaneCompositePart extends Composit
|
|
|
174
172
|
if (this.paneCompositeBar.value) {
|
|
175
173
|
this.paneCompositeBar.value.dndHandler.drop(e.dragAndDropData, undefined, e.eventData);
|
|
176
174
|
}
|
|
175
|
+
else {
|
|
176
|
+
const dragData = e.dragAndDropData.getData();
|
|
177
|
+
if (dragData.type === 'composite') {
|
|
178
|
+
const currentContainer = this.viewDescriptorService.getViewContainerById(dragData.id);
|
|
179
|
+
this.viewDescriptorService.moveViewContainerToLocation(currentContainer, this.location, undefined, 'dnd');
|
|
180
|
+
this.openPaneComposite(currentContainer.id, true);
|
|
181
|
+
}
|
|
182
|
+
else if (dragData.type === 'view') {
|
|
183
|
+
const viewToMove = this.viewDescriptorService.getViewDescriptorById(dragData.id);
|
|
184
|
+
if (viewToMove && viewToMove.canMoveView) {
|
|
185
|
+
this.viewDescriptorService.moveViewToLocation(viewToMove, this.location, 'dnd');
|
|
186
|
+
const newContainer = this.viewDescriptorService.getViewContainerByViewId(viewToMove.id);
|
|
187
|
+
this.openPaneComposite(newContainer.id, true).then(composite => {
|
|
188
|
+
composite?.openView(viewToMove.id, true);
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
177
193
|
},
|
|
178
194
|
}));
|
|
179
195
|
}
|
|
@@ -189,12 +205,12 @@ let AbstractPaneCompositePart = class AbstractPaneCompositePart extends Composit
|
|
|
189
205
|
const globalTitleActionsContainer = titleArea.appendChild($('.global-actions'));
|
|
190
206
|
this.globalToolBar = this._register(this.instantiationService.createInstance(WorkbenchToolBar, globalTitleActionsContainer, {
|
|
191
207
|
actionViewItemProvider: (action, options) => this.actionViewItemProvider(action, options),
|
|
192
|
-
orientation:
|
|
208
|
+
orientation: 0 ,
|
|
193
209
|
getKeyBinding: action => this.keybindingService.lookupKeybinding(action.id),
|
|
194
210
|
anchorAlignmentProvider: () => this.getTitleAreaDropDownAnchorAlignment(),
|
|
195
|
-
toggleMenuTitle: ( localize(
|
|
211
|
+
toggleMenuTitle: ( localize(9407, "More Actions...")),
|
|
196
212
|
hoverDelegate: this.toolbarHoverDelegate,
|
|
197
|
-
hiddenItemStrategy:
|
|
213
|
+
hiddenItemStrategy: -1
|
|
198
214
|
}));
|
|
199
215
|
this.updateGlobalToolbarActions();
|
|
200
216
|
return titleArea;
|
|
@@ -210,12 +226,12 @@ let AbstractPaneCompositePart = class AbstractPaneCompositePart extends Composit
|
|
|
210
226
|
this._register(CompositeDragAndDropObserver.INSTANCE.registerDraggable(this.titleLabelElement, draggedItemProvider, {}));
|
|
211
227
|
return titleLabel;
|
|
212
228
|
}
|
|
213
|
-
updateCompositeBar() {
|
|
229
|
+
updateCompositeBar(updateCompositeBarOption = false) {
|
|
214
230
|
const wasCompositeBarVisible = this.compositeBarPosition !== undefined;
|
|
215
231
|
const isCompositeBarVisible = this.shouldShowCompositeBar();
|
|
216
232
|
const previousPosition = this.compositeBarPosition;
|
|
217
233
|
const newPosition = isCompositeBarVisible ? this.getCompositeBarPosition() : undefined;
|
|
218
|
-
if (previousPosition === newPosition) {
|
|
234
|
+
if (!updateCompositeBarOption && previousPosition === newPosition) {
|
|
219
235
|
return;
|
|
220
236
|
}
|
|
221
237
|
if (wasCompositeBarVisible) {
|
|
@@ -264,6 +280,9 @@ let AbstractPaneCompositePart = class AbstractPaneCompositePart extends Composit
|
|
|
264
280
|
}
|
|
265
281
|
}
|
|
266
282
|
this.compositeBarPosition = newPosition;
|
|
283
|
+
if (updateCompositeBarOption) {
|
|
284
|
+
this.layoutCompositeBar();
|
|
285
|
+
}
|
|
267
286
|
}
|
|
268
287
|
createHeaderArea() {
|
|
269
288
|
const headerArea = super.createHeaderArea();
|
|
@@ -377,7 +396,7 @@ let AbstractPaneCompositePart = class AbstractPaneCompositePart extends Composit
|
|
|
377
396
|
layoutCompositeBar() {
|
|
378
397
|
if (this.contentDimension && this.dimension && this.paneCompositeBar.value) {
|
|
379
398
|
const padding = this.compositeBarPosition === CompositeBarPosition.TITLE ? 16 : 8;
|
|
380
|
-
const borderWidth = this.partId ===
|
|
399
|
+
const borderWidth = this.partId === "workbench.parts.panel" ? 0 : 1;
|
|
381
400
|
let availableWidth = this.contentDimension.width - padding - borderWidth;
|
|
382
401
|
availableWidth = Math.max(AbstractPaneCompositePart_1.MIN_COMPOSITE_BAR_WIDTH, availableWidth - this.getToolbarWidth());
|
|
383
402
|
this.paneCompositeBar.value.layout(availableWidth, this.dimension.height);
|
|
@@ -450,7 +469,7 @@ let AbstractPaneCompositePart = class AbstractPaneCompositePart extends Composit
|
|
|
450
469
|
const menu = this.menuService.getMenuActions(ViewsSubMenu, scopedContextKeyService, { shouldForwardArgs: true, renderShortTitle: true });
|
|
451
470
|
createAndFillInActionBarActions(menu, { primary: viewsActions, secondary: [] }, () => true);
|
|
452
471
|
disposables.dispose();
|
|
453
|
-
return viewsActions.length > 1 && ( (viewsActions.some(a => a.enabled))) ? ( (new SubmenuAction('views', ( localize(
|
|
472
|
+
return viewsActions.length > 1 && ( (viewsActions.some(a => a.enabled))) ? ( (new SubmenuAction('views', ( localize(9408, "Views")), viewsActions))) : undefined;
|
|
454
473
|
}
|
|
455
474
|
return undefined;
|
|
456
475
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
3
3
|
import { assertIsDefined } from 'vscode/vscode/vs/base/common/types';
|
|
4
|
-
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
5
4
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
6
5
|
import { AuxiliaryBarPart } from './auxiliarybar/auxiliaryBarPart.js';
|
|
7
6
|
import { PanelPart } from './panel/panelPart.js';
|
|
8
7
|
import { SidebarPart } from './sidebar/sidebarPart.js';
|
|
9
|
-
import {
|
|
8
|
+
import { ViewContainerLocations } from 'vscode/vscode/vs/workbench/common/views';
|
|
10
9
|
import { Disposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
11
10
|
|
|
12
11
|
let PaneCompositePartService = class PaneCompositePartService extends Disposable {
|
|
@@ -16,9 +15,9 @@ let PaneCompositePartService = class PaneCompositePartService extends Disposable
|
|
|
16
15
|
const panelPart = instantiationService.createInstance(PanelPart);
|
|
17
16
|
const sideBarPart = instantiationService.createInstance(SidebarPart);
|
|
18
17
|
const auxiliaryBarPart = instantiationService.createInstance(AuxiliaryBarPart);
|
|
19
|
-
this.paneCompositeParts.set(
|
|
20
|
-
this.paneCompositeParts.set(
|
|
21
|
-
this.paneCompositeParts.set(
|
|
18
|
+
this.paneCompositeParts.set(1 , panelPart);
|
|
19
|
+
this.paneCompositeParts.set(0 , sideBarPart);
|
|
20
|
+
this.paneCompositeParts.set(2 , auxiliaryBarPart);
|
|
22
21
|
const eventDisposables = this._register(( new DisposableStore()));
|
|
23
22
|
this.onDidPaneCompositeOpen = Event.any(...( ViewContainerLocations.map(loc => ( Event.map(
|
|
24
23
|
this.paneCompositeParts.get(loc).onDidPaneCompositeOpen,
|
|
@@ -2,9 +2,7 @@ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
|
2
2
|
import 'vscode/vscode/vs/workbench/browser/parts/panel/media/panelpart.css';
|
|
3
3
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
4
4
|
import { Separator, SubmenuAction, toAction } from 'vscode/vscode/vs/base/common/actions';
|
|
5
|
-
import { ActionsOrientation } from 'vscode/vscode/vs/base/browser/ui/actionbar/actionbar';
|
|
6
5
|
import { ActivePanelContext, PanelFocusContext } from 'vscode/vscode/vs/workbench/common/contextkeys';
|
|
7
|
-
import { Parts, Position } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
8
6
|
import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService.service';
|
|
9
7
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
10
8
|
import { IContextMenuService } from 'vscode/vscode/vs/platform/contextview/browser/contextView.service';
|
|
@@ -30,13 +28,13 @@ import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/
|
|
|
30
28
|
import { assertIsDefined } from 'vscode/vscode/vs/base/common/types';
|
|
31
29
|
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
32
30
|
import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views.service';
|
|
33
|
-
import { HoverPosition } from 'vscode/vscode/vs/base/browser/ui/hover/hoverWidget';
|
|
34
31
|
import { MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
35
32
|
import { IMenuService } from 'vscode/vscode/vs/platform/actions/common/actions.service';
|
|
36
33
|
import { AbstractPaneCompositePart, CompositeBarPosition } from '../paneCompositePart.js';
|
|
37
34
|
import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
|
|
38
35
|
import { createAndFillInContextMenuActions } from 'vscode/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
|
|
39
36
|
import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover.service';
|
|
37
|
+
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
40
38
|
|
|
41
39
|
var PanelPart_1;
|
|
42
40
|
let PanelPart = class PanelPart extends AbstractPaneCompositePart {
|
|
@@ -56,13 +54,19 @@ let PanelPart = class PanelPart extends AbstractPaneCompositePart {
|
|
|
56
54
|
return Math.max(width, 300);
|
|
57
55
|
}
|
|
58
56
|
static { this.activePanelSettingsKey = 'workbench.panelpart.activepanelid'; }
|
|
59
|
-
constructor(notificationService, storageService, contextMenuService, layoutService, keybindingService, hoverService, instantiationService, themeService, viewDescriptorService, contextKeyService, extensionService, commandService, menuService) {
|
|
60
|
-
super(
|
|
57
|
+
constructor(notificationService, storageService, contextMenuService, layoutService, keybindingService, hoverService, instantiationService, themeService, viewDescriptorService, contextKeyService, extensionService, commandService, menuService, configurationService) {
|
|
58
|
+
super("workbench.parts.panel" , { hasTitle: true }, PanelPart_1.activePanelSettingsKey, ActivePanelContext.bindTo(contextKeyService), PanelFocusContext.bindTo(contextKeyService), 'panel', 'panel', undefined, notificationService, storageService, contextMenuService, layoutService, keybindingService, hoverService, instantiationService, themeService, viewDescriptorService, contextKeyService, extensionService, menuService);
|
|
61
59
|
this.commandService = commandService;
|
|
60
|
+
this.configurationService = configurationService;
|
|
62
61
|
this.minimumWidth = 300;
|
|
63
62
|
this.maximumWidth = Number.POSITIVE_INFINITY;
|
|
64
63
|
this.minimumHeight = 77;
|
|
65
64
|
this.maximumHeight = Number.POSITIVE_INFINITY;
|
|
65
|
+
this._register(this.configurationService.onDidChangeConfiguration(e => {
|
|
66
|
+
if (e.affectsConfiguration('workbench.panel.showLabel')) {
|
|
67
|
+
this.updateCompositeBar(true);
|
|
68
|
+
}
|
|
69
|
+
}));
|
|
66
70
|
}
|
|
67
71
|
updateStyles() {
|
|
68
72
|
super.updateStyles();
|
|
@@ -83,11 +87,11 @@ let PanelPart = class PanelPart extends AbstractPaneCompositePart {
|
|
|
83
87
|
pinnedViewContainersKey: 'workbench.panel.pinnedPanels',
|
|
84
88
|
placeholderViewContainersKey: 'workbench.panel.placeholderPanels',
|
|
85
89
|
viewContainersWorkspaceStateKey: 'workbench.panel.viewContainersWorkspaceState',
|
|
86
|
-
icon: false,
|
|
87
|
-
orientation:
|
|
90
|
+
icon: this.configurationService.getValue('workbench.panel.showLabel') === false,
|
|
91
|
+
orientation: 0 ,
|
|
88
92
|
recomputeSizes: true,
|
|
89
93
|
activityHoverOptions: {
|
|
90
|
-
position: () => this.layoutService.getPanelPosition() ===
|
|
94
|
+
position: () => this.layoutService.getPanelPosition() === 2 && !this.layoutService.isPanelMaximized() ? 3 : 2 ,
|
|
91
95
|
},
|
|
92
96
|
fillExtraContextMenuActions: actions => this.fillExtraContextMenuActions(actions),
|
|
93
97
|
compositeSize: 0,
|
|
@@ -114,18 +118,18 @@ let PanelPart = class PanelPart extends AbstractPaneCompositePart {
|
|
|
114
118
|
createAndFillInContextMenuActions(panelAlignMenu, { primary: [], secondary: alignActions });
|
|
115
119
|
actions.push(...[
|
|
116
120
|
( (new Separator())),
|
|
117
|
-
( (new SubmenuAction('workbench.action.panel.position', ( localize(
|
|
118
|
-
( (new SubmenuAction('workbench.action.panel.align', ( localize(
|
|
119
|
-
toAction({ id: TogglePanelAction.ID, label: ( localize(
|
|
121
|
+
( (new SubmenuAction('workbench.action.panel.position', ( localize(3774, "Panel Position")), positionActions))),
|
|
122
|
+
( (new SubmenuAction('workbench.action.panel.align', ( localize(3775, "Align Panel")), alignActions))),
|
|
123
|
+
toAction({ id: TogglePanelAction.ID, label: ( localize(3776, "Hide Panel")), run: () => this.commandService.executeCommand(TogglePanelAction.ID) })
|
|
120
124
|
]);
|
|
121
125
|
}
|
|
122
126
|
layout(width, height, top, left) {
|
|
123
127
|
let dimensions;
|
|
124
128
|
switch (this.layoutService.getPanelPosition()) {
|
|
125
|
-
case
|
|
129
|
+
case 1 :
|
|
126
130
|
dimensions = ( (new Dimension(width - 1, height)));
|
|
127
131
|
break;
|
|
128
|
-
case
|
|
132
|
+
case 3 :
|
|
129
133
|
dimensions = ( (new Dimension(width, height - 1)));
|
|
130
134
|
break;
|
|
131
135
|
default:
|
|
@@ -142,7 +146,7 @@ let PanelPart = class PanelPart extends AbstractPaneCompositePart {
|
|
|
142
146
|
}
|
|
143
147
|
toJSON() {
|
|
144
148
|
return {
|
|
145
|
-
type:
|
|
149
|
+
type: "workbench.parts.panel"
|
|
146
150
|
};
|
|
147
151
|
}
|
|
148
152
|
};
|
|
@@ -159,7 +163,8 @@ PanelPart = PanelPart_1 = ( (__decorate([
|
|
|
159
163
|
( (__param(9, IContextKeyService))),
|
|
160
164
|
( (__param(10, IExtensionService))),
|
|
161
165
|
( (__param(11, ICommandService))),
|
|
162
|
-
( (__param(12, IMenuService)))
|
|
166
|
+
( (__param(12, IMenuService))),
|
|
167
|
+
( (__param(13, IConfigurationService)))
|
|
163
168
|
], PanelPart)));
|
|
164
169
|
|
|
165
170
|
export { PanelPart };
|
|
@@ -1,35 +1,31 @@
|
|
|
1
1
|
import './media/sidebarpart.css.js';
|
|
2
2
|
import { localize2 } from 'vscode/vscode/vs/nls';
|
|
3
3
|
import { Action2, registerAction2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
4
|
-
import { Parts } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
5
4
|
import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService.service';
|
|
6
|
-
import { KeyMod, KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
7
|
-
import { KeybindingWeight } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
8
5
|
import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
|
|
9
6
|
import { IPaneCompositePartService } from 'vscode/vscode/vs/workbench/services/panecomposite/browser/panecomposite.service';
|
|
10
|
-
import { ViewContainerLocation } from 'vscode/vscode/vs/workbench/common/views';
|
|
11
7
|
|
|
12
8
|
class FocusSideBarAction extends Action2 {
|
|
13
9
|
constructor() {
|
|
14
10
|
super({
|
|
15
11
|
id: 'workbench.action.focusSideBar',
|
|
16
|
-
title: ( localize2(
|
|
12
|
+
title: ( localize2(9405, 'Focus into Primary Side Bar')),
|
|
17
13
|
category: Categories.View,
|
|
18
14
|
f1: true,
|
|
19
15
|
keybinding: {
|
|
20
|
-
weight:
|
|
16
|
+
weight: 200 ,
|
|
21
17
|
when: null,
|
|
22
|
-
primary:
|
|
18
|
+
primary: 2048 | 21
|
|
23
19
|
}
|
|
24
20
|
});
|
|
25
21
|
}
|
|
26
22
|
async run(accessor) {
|
|
27
23
|
const layoutService = accessor.get(IWorkbenchLayoutService);
|
|
28
24
|
const paneCompositeService = accessor.get(IPaneCompositePartService);
|
|
29
|
-
if (!layoutService.isVisible(
|
|
30
|
-
layoutService.setPartHidden(false,
|
|
25
|
+
if (!layoutService.isVisible("workbench.parts.sidebar" )) {
|
|
26
|
+
layoutService.setPartHidden(false, "workbench.parts.sidebar" );
|
|
31
27
|
}
|
|
32
|
-
const viewlet = paneCompositeService.getActivePaneComposite(
|
|
28
|
+
const viewlet = paneCompositeService.getActivePaneComposite(0 );
|
|
33
29
|
viewlet?.focus();
|
|
34
30
|
}
|
|
35
31
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import './media/sidebarpart.css.js';
|
|
3
3
|
import './sidebarActions.js';
|
|
4
|
-
import { Parts, LayoutSettings, Position, ActivityBarPosition } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
5
4
|
import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService.service';
|
|
6
5
|
import { ActiveViewletContext, SidebarFocusContext } from 'vscode/vscode/vs/workbench/common/contextkeys';
|
|
7
|
-
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
8
6
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
9
7
|
import { IContextMenuService } from 'vscode/vscode/vs/platform/contextview/browser/contextView.service';
|
|
10
8
|
import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
@@ -24,15 +22,11 @@ import 'vscode/vscode/vs/platform/theme/common/colors/searchColors';
|
|
|
24
22
|
import { SIDE_BAR_BORDER, SIDE_BAR_TITLE_FOREGROUND, SIDE_BAR_BACKGROUND, SIDE_BAR_FOREGROUND, SIDE_BAR_DRAG_AND_DROP_BACKGROUND, ACTIVITY_BAR_TOP_ACTIVE_BORDER, ACTIVITY_BAR_TOP_FOREGROUND, ACTIVITY_BAR_TOP_INACTIVE_FOREGROUND, ACTIVITY_BAR_BADGE_BACKGROUND, ACTIVITY_BAR_BADGE_FOREGROUND, ACTIVITY_BAR_TOP_DRAG_AND_DROP_BORDER } from 'vscode/vscode/vs/workbench/common/theme';
|
|
25
23
|
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
|
|
26
24
|
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
27
|
-
import { AnchorAlignment } from 'vscode/vscode/vs/base/browser/ui/contextview/contextview';
|
|
28
25
|
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
29
|
-
import '../../../../base/browser/ui/grid/grid.js';
|
|
30
26
|
import { assertIsDefined } from 'vscode/vscode/vs/base/common/types';
|
|
31
27
|
import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views.service';
|
|
32
28
|
import { AbstractPaneCompositePart, CompositeBarPosition } from '../paneCompositePart.js';
|
|
33
29
|
import { ActivitybarPart, ActivityBarCompositeBar } from '../activitybar/activitybarPart.js';
|
|
34
|
-
import { ActionsOrientation } from 'vscode/vscode/vs/base/browser/ui/actionbar/actionbar';
|
|
35
|
-
import { HoverPosition } from 'vscode/vscode/vs/base/browser/ui/hover/hoverWidget';
|
|
36
30
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
37
31
|
import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
38
32
|
import { IMenuService } from 'vscode/vscode/vs/platform/actions/common/actions.service';
|
|
@@ -40,14 +34,6 @@ import { Separator } from 'vscode/vscode/vs/base/common/actions';
|
|
|
40
34
|
import { ToggleActivityBarVisibilityActionId } from 'vscode/vscode/vs/workbench/browser/actions/layoutActions';
|
|
41
35
|
import { localize2 } from 'vscode/vscode/vs/nls';
|
|
42
36
|
import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover.service';
|
|
43
|
-
import { LayoutPriority } from 'vscode/vscode/vs/base/browser/ui/splitview/splitview';
|
|
44
|
-
import 'vscode/vscode/vs/base/browser/dom';
|
|
45
|
-
import 'vscode/vscode/vs/base/browser/ui/sash/sash';
|
|
46
|
-
import 'vscode/vscode/vs/base/common/arrays';
|
|
47
|
-
import 'vscode/vscode/vs/base/common/color';
|
|
48
|
-
import 'vscode/vscode/vs/base/common/event';
|
|
49
|
-
import 'vscode/vscode/vs/base/common/lifecycle';
|
|
50
|
-
import '../../../../base/browser/ui/grid/gridview.css.js';
|
|
51
37
|
|
|
52
38
|
var SidebarPart_1;
|
|
53
39
|
let SidebarPart = class SidebarPart extends AbstractPaneCompositePart {
|
|
@@ -66,17 +52,17 @@ let SidebarPart = class SidebarPart extends AbstractPaneCompositePart {
|
|
|
66
52
|
return Math.max(width, 300);
|
|
67
53
|
}
|
|
68
54
|
constructor(notificationService, storageService, contextMenuService, layoutService, keybindingService, hoverService, instantiationService, themeService, viewDescriptorService, contextKeyService, extensionService, configurationService, menuService) {
|
|
69
|
-
super(
|
|
55
|
+
super("workbench.parts.sidebar" , { hasTitle: true, borderWidth: () => (this.getColor(SIDE_BAR_BORDER) || this.getColor(contrastBorder)) ? 1 : 0 }, SidebarPart_1.activeViewletSettingsKey, ActiveViewletContext.bindTo(contextKeyService), SidebarFocusContext.bindTo(contextKeyService), 'sideBar', 'viewlet', SIDE_BAR_TITLE_FOREGROUND, notificationService, storageService, contextMenuService, layoutService, keybindingService, hoverService, instantiationService, themeService, viewDescriptorService, contextKeyService, extensionService, menuService);
|
|
70
56
|
this.configurationService = configurationService;
|
|
71
57
|
this.minimumWidth = 170;
|
|
72
58
|
this.maximumWidth = Number.POSITIVE_INFINITY;
|
|
73
59
|
this.minimumHeight = 0;
|
|
74
60
|
this.maximumHeight = Number.POSITIVE_INFINITY;
|
|
75
|
-
this.priority =
|
|
61
|
+
this.priority = 1 ;
|
|
76
62
|
this.activityBarPart = this._register(this.instantiationService.createInstance(ActivitybarPart, this));
|
|
77
63
|
this.rememberActivityBarVisiblePosition();
|
|
78
64
|
this._register(configurationService.onDidChangeConfiguration(e => {
|
|
79
|
-
if (e.affectsConfiguration(
|
|
65
|
+
if (e.affectsConfiguration("workbench.activityBar.location" )) {
|
|
80
66
|
this.onDidChangeActivityBarLocation();
|
|
81
67
|
}
|
|
82
68
|
}));
|
|
@@ -100,7 +86,7 @@ let SidebarPart = class SidebarPart extends AbstractPaneCompositePart {
|
|
|
100
86
|
container.style.backgroundColor = this.getColor(SIDE_BAR_BACKGROUND) || '';
|
|
101
87
|
container.style.color = this.getColor(SIDE_BAR_FOREGROUND) || '';
|
|
102
88
|
const borderColor = this.getColor(SIDE_BAR_BORDER) || this.getColor(contrastBorder);
|
|
103
|
-
const isPositionLeft = this.layoutService.getSideBarPosition() ===
|
|
89
|
+
const isPositionLeft = this.layoutService.getSideBarPosition() === 0 ;
|
|
104
90
|
container.style.borderRightWidth = borderColor && isPositionLeft ? '1px' : '';
|
|
105
91
|
container.style.borderRightStyle = borderColor && isPositionLeft ? 'solid' : '';
|
|
106
92
|
container.style.borderRightColor = isPositionLeft ? borderColor || '' : '';
|
|
@@ -110,13 +96,13 @@ let SidebarPart = class SidebarPart extends AbstractPaneCompositePart {
|
|
|
110
96
|
container.style.outlineColor = this.getColor(SIDE_BAR_DRAG_AND_DROP_BACKGROUND) ?? '';
|
|
111
97
|
}
|
|
112
98
|
layout(width, height, top, left) {
|
|
113
|
-
if (!this.layoutService.isVisible(
|
|
99
|
+
if (!this.layoutService.isVisible("workbench.parts.sidebar" )) {
|
|
114
100
|
return;
|
|
115
101
|
}
|
|
116
102
|
super.layout(width, height, top, left);
|
|
117
103
|
}
|
|
118
104
|
getTitleAreaDropDownAnchorAlignment() {
|
|
119
|
-
return this.layoutService.getSideBarPosition() ===
|
|
105
|
+
return this.layoutService.getSideBarPosition() === 0 ? 0 : 1 ;
|
|
120
106
|
}
|
|
121
107
|
createCompositeBar() {
|
|
122
108
|
return this.instantiationService.createInstance(ActivityBarCompositeBar, this.getCompositeBarOptions(), this.partId, this, false);
|
|
@@ -128,10 +114,10 @@ let SidebarPart = class SidebarPart extends AbstractPaneCompositePart {
|
|
|
128
114
|
placeholderViewContainersKey: ActivitybarPart.placeholderViewContainersKey,
|
|
129
115
|
viewContainersWorkspaceStateKey: ActivitybarPart.viewContainersWorkspaceStateKey,
|
|
130
116
|
icon: true,
|
|
131
|
-
orientation:
|
|
117
|
+
orientation: 0 ,
|
|
132
118
|
recomputeSizes: true,
|
|
133
119
|
activityHoverOptions: {
|
|
134
|
-
position: () => this.getCompositeBarPosition() === CompositeBarPosition.BOTTOM ?
|
|
120
|
+
position: () => this.getCompositeBarPosition() === CompositeBarPosition.BOTTOM ? 3 : 2 ,
|
|
135
121
|
},
|
|
136
122
|
fillExtraContextMenuActions: actions => {
|
|
137
123
|
const viewsSubmenuAction = this.getViewsSubmenuAction();
|
|
@@ -157,37 +143,37 @@ let SidebarPart = class SidebarPart extends AbstractPaneCompositePart {
|
|
|
157
143
|
};
|
|
158
144
|
}
|
|
159
145
|
shouldShowCompositeBar() {
|
|
160
|
-
const activityBarPosition = this.configurationService.getValue(
|
|
161
|
-
return activityBarPosition ===
|
|
146
|
+
const activityBarPosition = this.configurationService.getValue("workbench.activityBar.location" );
|
|
147
|
+
return activityBarPosition === "top" || activityBarPosition === "bottom" ;
|
|
162
148
|
}
|
|
163
149
|
shouldShowActivityBar() {
|
|
164
150
|
if (this.shouldShowCompositeBar()) {
|
|
165
151
|
return false;
|
|
166
152
|
}
|
|
167
|
-
return this.configurationService.getValue(
|
|
153
|
+
return this.configurationService.getValue("workbench.activityBar.location" ) !== "hidden" ;
|
|
168
154
|
}
|
|
169
155
|
getCompositeBarPosition() {
|
|
170
|
-
const activityBarPosition = this.configurationService.getValue(
|
|
156
|
+
const activityBarPosition = this.configurationService.getValue("workbench.activityBar.location" );
|
|
171
157
|
switch (activityBarPosition) {
|
|
172
|
-
case
|
|
173
|
-
case
|
|
174
|
-
case
|
|
175
|
-
case
|
|
158
|
+
case "top" : return CompositeBarPosition.TOP;
|
|
159
|
+
case "bottom" : return CompositeBarPosition.BOTTOM;
|
|
160
|
+
case "hidden" :
|
|
161
|
+
case "default" :
|
|
176
162
|
default: return CompositeBarPosition.TITLE;
|
|
177
163
|
}
|
|
178
164
|
}
|
|
179
165
|
rememberActivityBarVisiblePosition() {
|
|
180
|
-
const activityBarPosition = this.configurationService.getValue(
|
|
181
|
-
if (activityBarPosition !==
|
|
182
|
-
this.storageService.store(
|
|
166
|
+
const activityBarPosition = this.configurationService.getValue("workbench.activityBar.location" );
|
|
167
|
+
if (activityBarPosition !== "hidden" ) {
|
|
168
|
+
this.storageService.store("workbench.activityBar.location" , activityBarPosition, 0 , 0 );
|
|
183
169
|
}
|
|
184
170
|
}
|
|
185
171
|
getRememberedActivityBarVisiblePosition() {
|
|
186
|
-
const activityBarPosition = this.storageService.get(
|
|
172
|
+
const activityBarPosition = this.storageService.get("workbench.activityBar.location" , 0 );
|
|
187
173
|
switch (activityBarPosition) {
|
|
188
|
-
case
|
|
189
|
-
case
|
|
190
|
-
default: return
|
|
174
|
+
case "top" : return "top" ;
|
|
175
|
+
case "bottom" : return "bottom" ;
|
|
176
|
+
default: return "default" ;
|
|
191
177
|
}
|
|
192
178
|
}
|
|
193
179
|
getPinnedPaneCompositeIds() {
|
|
@@ -197,16 +183,16 @@ let SidebarPart = class SidebarPart extends AbstractPaneCompositePart {
|
|
|
197
183
|
return this.shouldShowCompositeBar() ? super.getVisiblePaneCompositeIds() : this.activityBarPart.getVisiblePaneCompositeIds();
|
|
198
184
|
}
|
|
199
185
|
async focusActivityBar() {
|
|
200
|
-
if (this.configurationService.getValue(
|
|
201
|
-
await this.configurationService.updateValue(
|
|
186
|
+
if (this.configurationService.getValue("workbench.activityBar.location" ) === "hidden" ) {
|
|
187
|
+
await this.configurationService.updateValue("workbench.activityBar.location" , this.getRememberedActivityBarVisiblePosition());
|
|
202
188
|
this.onDidChangeActivityBarLocation();
|
|
203
189
|
}
|
|
204
190
|
if (this.shouldShowCompositeBar()) {
|
|
205
191
|
this.focusCompositeBar();
|
|
206
192
|
}
|
|
207
193
|
else {
|
|
208
|
-
if (!this.layoutService.isVisible(
|
|
209
|
-
this.layoutService.setPartHidden(false,
|
|
194
|
+
if (!this.layoutService.isVisible("workbench.parts.activitybar" )) {
|
|
195
|
+
this.layoutService.setPartHidden(false, "workbench.parts.activitybar" );
|
|
210
196
|
}
|
|
211
197
|
this.activityBarPart.show(true);
|
|
212
198
|
}
|
|
@@ -217,18 +203,18 @@ let SidebarPart = class SidebarPart extends AbstractPaneCompositePart {
|
|
|
217
203
|
constructor() {
|
|
218
204
|
super({
|
|
219
205
|
id: ToggleActivityBarVisibilityActionId,
|
|
220
|
-
title: ( localize2(
|
|
206
|
+
title: ( localize2(3754, "Toggle Activity Bar Visibility")),
|
|
221
207
|
});
|
|
222
208
|
}
|
|
223
209
|
run() {
|
|
224
|
-
const value = that.configurationService.getValue(
|
|
225
|
-
return that.configurationService.updateValue(
|
|
210
|
+
const value = that.configurationService.getValue("workbench.activityBar.location" ) === "hidden" ? that.getRememberedActivityBarVisiblePosition() : "hidden" ;
|
|
211
|
+
return that.configurationService.updateValue("workbench.activityBar.location" , value);
|
|
226
212
|
}
|
|
227
213
|
}));
|
|
228
214
|
}
|
|
229
215
|
toJSON() {
|
|
230
216
|
return {
|
|
231
|
-
type:
|
|
217
|
+
type: "workbench.parts.sidebar"
|
|
232
218
|
};
|
|
233
219
|
}
|
|
234
220
|
};
|