@codingame/monaco-vscode-views-service-override 2.1.4 → 2.2.0-next.2
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 +11 -9
- package/index.js +8 -6
- package/package.json +11 -11
- package/tools/views.d.ts +102 -0
- package/tools/views.js +253 -0
- package/views.d.ts +4 -99
- package/views.js +52 -280
- package/external/rollup-plugin-styles/dist/runtime/inject-css.js +0 -3
- package/vscode/src/vs/base/browser/ui/centered/centeredViewLayout.js +0 -180
- package/vscode/src/vs/base/browser/ui/grid/grid.js +0 -494
- package/vscode/src/vs/base/browser/ui/grid/gridview.css.js +0 -6
- package/vscode/src/vs/base/browser/ui/grid/gridview.js +0 -1112
- package/vscode/src/vs/base/common/codicons.d.ts +0 -579
- package/vscode/src/vs/platform/webview/common/mimeTypes.js +0 -24
- package/vscode/src/vs/platform/webview/common/webviewPortMapping.js +0 -64
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +0 -790
- package/vscode/src/vs/workbench/browser/actions/listCommands.js +0 -764
- package/vscode/src/vs/workbench/browser/layout.d.ts +0 -26
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +0 -612
- package/vscode/src/vs/workbench/browser/parts/activitybar/media/activityaction.css.js +0 -6
- package/vscode/src/vs/workbench/browser/parts/activitybar/media/activitybarpart.css.js +0 -6
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +0 -150
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/media/auxiliaryBarPart.css.js +0 -6
- package/vscode/src/vs/workbench/browser/parts/compositeBar.js +0 -605
- package/vscode/src/vs/workbench/browser/parts/compositePart.js +0 -335
- package/vscode/src/vs/workbench/browser/parts/editor/auxiliaryEditorPart.js +0 -223
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +0 -1407
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +0 -186
- package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +0 -511
- package/vscode/src/vs/workbench/browser/parts/editor/editorPane.d.ts +0 -112
- package/vscode/src/vs/workbench/browser/parts/editor/editorPart.js +0 -1020
- package/vscode/src/vs/workbench/browser/parts/editor/editorParts.js +0 -391
- package/vscode/src/vs/workbench/browser/parts/editor/media/editordroptarget.css.js +0 -6
- package/vscode/src/vs/workbench/browser/parts/media/compositepart.css.js +0 -6
- package/vscode/src/vs/workbench/browser/parts/media/paneCompositePart.css.js +0 -6
- package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.js +0 -645
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +0 -379
- package/vscode/src/vs/workbench/browser/parts/paneCompositePartService.js +0 -68
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +0 -146
- package/vscode/src/vs/workbench/browser/parts/sidebar/media/sidebarpart.css.js +0 -6
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +0 -222
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +0 -299
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +0 -365
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +0 -135
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/media/callHierarchy.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.js +0 -17
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +0 -145
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +0 -214
- package/vscode/src/vs/workbench/contrib/customEditor/browser/media/customEditor.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +0 -78
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.js +0 -63
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +0 -119
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution.js +0 -6
- package/vscode/src/vs/workbench/contrib/files/browser/editors/binaryFileEditor.js +0 -79
- package/vscode/src/vs/workbench/contrib/files/browser/editors/fileEditorHandler.js +0 -74
- package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileEditor.js +0 -256
- package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileEditorTracker.js +0 -99
- package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.js +0 -444
- package/vscode/src/vs/workbench/contrib/files/browser/explorerService.js +0 -432
- package/vscode/src/vs/workbench/contrib/files/browser/fileActions.contribution.js +0 -786
- package/vscode/src/vs/workbench/contrib/files/browser/fileCommands.js +0 -488
- package/vscode/src/vs/workbench/contrib/files/browser/files.contribution.js +0 -522
- package/vscode/src/vs/workbench/contrib/files/browser/workspaceWatcher.js +0 -152
- package/vscode/src/vs/workbench/contrib/files/common/dirtyFilesIndicator.js +0 -63
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +0 -409
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/media/languageStatus.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +0 -693
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.js +0 -240
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +0 -77
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorSerializer.js +0 -42
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.js +0 -71
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/conflictActions.js +0 -348
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editorGutter.js +0 -98
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +0 -146
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.js +0 -105
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +0 -401
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +0 -197
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/fixedZoneWidget.js +0 -41
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/lineAlignment.js +0 -128
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/media/mergeEditor.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +0 -612
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.js +0 -158
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +0 -264
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewZones.js +0 -173
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/media/typeHierarchy.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +0 -282
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +0 -360
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +0 -133
- package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.js +0 -290
- package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.js +0 -96
- package/vscode/src/vs/workbench/contrib/webview/browser/themeing.js +0 -88
- package/vscode/src/vs/workbench/contrib/webview/browser/webview.contribution.js +0 -79
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +0 -648
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindWidget.js +0 -65
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewService.js +0 -59
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +0 -142
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInputSerializer.js +0 -121
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +0 -68
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +0 -235
- package/vscode/src/vs/workbench/services/activity/browser/activityService.js +0 -145
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +0 -670
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +0 -1484
- package/vscode/src/vs/workbench/services/progress/browser/media/progressService.css.js +0 -6
- package/vscode/src/vs/workbench/services/progress/browser/progressService.js +0 -523
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorHandler.js +0 -101
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +0 -713
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +0 -598
|
@@ -1,379 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import './media/paneCompositePart.css.js';
|
|
3
|
-
import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
4
|
-
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
5
|
-
import { Extensions } from 'vscode/vscode/vs/workbench/browser/panecomposite';
|
|
6
|
-
import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views';
|
|
7
|
-
import { MutableDisposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
8
|
-
import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
9
|
-
import { CompositePart } from './compositePart.js';
|
|
10
|
-
import { PaneCompositeBar } from './paneCompositeBar.js';
|
|
11
|
-
import { trackFocus, EventHelper, addDisposableListener, EventType, getWindow, $, prepend, Dimension } from 'vscode/vscode/vs/base/browser/dom';
|
|
12
|
-
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
13
|
-
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification';
|
|
14
|
-
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
15
|
-
import { IContextMenuService } from 'vscode/vscode/vs/platform/contextview/browser/contextView';
|
|
16
|
-
import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/keybinding';
|
|
17
|
-
import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService';
|
|
18
|
-
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
19
|
-
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
|
|
20
|
-
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
21
|
-
import { CompositeDragAndDropObserver, toggleDropEffect } from 'vscode/vscode/vs/workbench/browser/dnd';
|
|
22
|
-
import { EDITOR_DRAG_AND_DROP_BACKGROUND } from 'vscode/vscode/vs/workbench/common/theme';
|
|
23
|
-
import { ToolBar } from 'vscode/vscode/vs/base/browser/ui/toolbar/toolbar';
|
|
24
|
-
import { CompositeMenuActions } from 'vscode/vscode/vs/workbench/browser/actions';
|
|
25
|
-
import { MenuId, IMenuService } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
26
|
-
import { prepareActions } from 'vscode/vscode/vs/base/browser/ui/actionbar/actionbar';
|
|
27
|
-
import { Gesture, EventType as EventType$1 } from 'vscode/vscode/vs/base/browser/touch';
|
|
28
|
-
import { StandardMouseEvent } from 'vscode/vscode/vs/base/browser/mouseEvent';
|
|
29
|
-
import { SubmenuAction } from 'vscode/vscode/vs/base/common/actions';
|
|
30
|
-
import { ViewsSubMenu } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPaneContainer';
|
|
31
|
-
import { createAndFillInActionBarActions } from 'vscode/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
|
|
32
|
-
|
|
33
|
-
var AbstractPaneCompositePart_1;
|
|
34
|
-
let AbstractPaneCompositePart = class AbstractPaneCompositePart extends CompositePart {
|
|
35
|
-
static { AbstractPaneCompositePart_1 = this; }
|
|
36
|
-
static { this.MIN_COMPOSITE_BAR_WIDTH = 50; }
|
|
37
|
-
get snap() {
|
|
38
|
-
return this.layoutService.isVisible(this.partId) || !!this.paneCompositeBar.value?.getVisiblePaneCompositeIds().length;
|
|
39
|
-
}
|
|
40
|
-
get onDidPaneCompositeOpen() { return ( Event.map(this.onDidCompositeOpen.event, compositeEvent => compositeEvent.composite)); }
|
|
41
|
-
constructor(partId, partOptions, activePaneCompositeSettingsKey, activePaneContextKey, paneFocusContextKey, nameForTelemetry, compositeCSSClass, titleForegroundColor, notificationService, storageService, contextMenuService, layoutService, keybindingService, instantiationService, themeService, viewDescriptorService, contextKeyService, extensionService, menuService) {
|
|
42
|
-
let location = 0 ;
|
|
43
|
-
let registryId = Extensions.Viewlets;
|
|
44
|
-
let globalActionsMenuId = MenuId.SidebarTitle;
|
|
45
|
-
if (partId === "workbench.parts.panel" ) {
|
|
46
|
-
location = 1 ;
|
|
47
|
-
registryId = Extensions.Panels;
|
|
48
|
-
globalActionsMenuId = MenuId.PanelTitle;
|
|
49
|
-
}
|
|
50
|
-
else if (partId === "workbench.parts.auxiliarybar" ) {
|
|
51
|
-
location = 2 ;
|
|
52
|
-
registryId = Extensions.Auxiliary;
|
|
53
|
-
globalActionsMenuId = MenuId.AuxiliaryBarTitle;
|
|
54
|
-
}
|
|
55
|
-
super(notificationService, storageService, contextMenuService, layoutService, keybindingService, instantiationService, themeService, ( Registry.as(registryId)), activePaneCompositeSettingsKey, viewDescriptorService.getDefaultViewContainer(location)?.id || '', nameForTelemetry, compositeCSSClass, titleForegroundColor, partId, partOptions);
|
|
56
|
-
this.partId = partId;
|
|
57
|
-
this.activePaneContextKey = activePaneContextKey;
|
|
58
|
-
this.paneFocusContextKey = paneFocusContextKey;
|
|
59
|
-
this.viewDescriptorService = viewDescriptorService;
|
|
60
|
-
this.contextKeyService = contextKeyService;
|
|
61
|
-
this.extensionService = extensionService;
|
|
62
|
-
this.menuService = menuService;
|
|
63
|
-
this.onDidPaneCompositeClose = this.onDidCompositeClose.event;
|
|
64
|
-
this.paneCompositeBar = this._register(( new MutableDisposable()));
|
|
65
|
-
this.blockOpening = false;
|
|
66
|
-
this.location = location;
|
|
67
|
-
this.globalActions = this._register(this.instantiationService.createInstance(CompositeMenuActions, globalActionsMenuId, undefined, undefined));
|
|
68
|
-
this.registerListeners();
|
|
69
|
-
}
|
|
70
|
-
registerListeners() {
|
|
71
|
-
this._register(this.onDidPaneCompositeOpen(composite => this.onDidOpen(composite)));
|
|
72
|
-
this._register(this.onDidPaneCompositeClose(this.onDidClose, this));
|
|
73
|
-
this._register(this.globalActions.onDidChange(() => this.updateGlobalToolbarActions()));
|
|
74
|
-
this._register(this.registry.onDidDeregister(async (viewletDescriptor) => {
|
|
75
|
-
const activeContainers = this.viewDescriptorService.getViewContainersByLocation(this.location)
|
|
76
|
-
.filter(container => this.viewDescriptorService.getViewContainerModel(container).activeViewDescriptors.length > 0);
|
|
77
|
-
if (activeContainers.length) {
|
|
78
|
-
if (this.getActiveComposite()?.getId() === viewletDescriptor.id) {
|
|
79
|
-
const defaultViewletId = this.viewDescriptorService.getDefaultViewContainer(this.location)?.id;
|
|
80
|
-
const containerToOpen = activeContainers.filter(c => c.id === defaultViewletId)[0] || activeContainers[0];
|
|
81
|
-
await this.openPaneComposite(containerToOpen.id);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
this.layoutService.setPartHidden(true, this.partId);
|
|
86
|
-
}
|
|
87
|
-
this.removeComposite(viewletDescriptor.id);
|
|
88
|
-
}));
|
|
89
|
-
this._register(this.extensionService.onDidRegisterExtensions(() => {
|
|
90
|
-
this.layoutCompositeBar();
|
|
91
|
-
}));
|
|
92
|
-
}
|
|
93
|
-
onDidOpen(composite) {
|
|
94
|
-
this.activePaneContextKey.set(composite.getId());
|
|
95
|
-
}
|
|
96
|
-
onDidClose(composite) {
|
|
97
|
-
const id = composite.getId();
|
|
98
|
-
if (this.activePaneContextKey.get() === id) {
|
|
99
|
-
this.activePaneContextKey.reset();
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
showComposite(composite) {
|
|
103
|
-
super.showComposite(composite);
|
|
104
|
-
this.layoutCompositeBar();
|
|
105
|
-
this.layoutEmptyMessage();
|
|
106
|
-
}
|
|
107
|
-
hideActiveComposite() {
|
|
108
|
-
const composite = super.hideActiveComposite();
|
|
109
|
-
this.layoutCompositeBar();
|
|
110
|
-
this.layoutEmptyMessage();
|
|
111
|
-
return composite;
|
|
112
|
-
}
|
|
113
|
-
create(parent) {
|
|
114
|
-
this.element = parent;
|
|
115
|
-
this.element.classList.add('pane-composite-part');
|
|
116
|
-
super.create(parent);
|
|
117
|
-
const contentArea = this.getContentArea();
|
|
118
|
-
if (contentArea) {
|
|
119
|
-
this.createEmptyPaneMessage(contentArea);
|
|
120
|
-
}
|
|
121
|
-
const focusTracker = this._register(trackFocus(parent));
|
|
122
|
-
this._register(focusTracker.onDidFocus(() => this.paneFocusContextKey.set(true)));
|
|
123
|
-
this._register(focusTracker.onDidBlur(() => this.paneFocusContextKey.set(false)));
|
|
124
|
-
}
|
|
125
|
-
createEmptyPaneMessage(parent) {
|
|
126
|
-
this.emptyPaneMessageElement = document.createElement('div');
|
|
127
|
-
this.emptyPaneMessageElement.classList.add('empty-pane-message-area');
|
|
128
|
-
const messageElement = document.createElement('div');
|
|
129
|
-
messageElement.classList.add('empty-pane-message');
|
|
130
|
-
messageElement.innerText = ( localizeWithPath(
|
|
131
|
-
'vs/workbench/browser/parts/paneCompositePart',
|
|
132
|
-
'pane.emptyMessage',
|
|
133
|
-
"Drag a view here to display."
|
|
134
|
-
));
|
|
135
|
-
this.emptyPaneMessageElement.appendChild(messageElement);
|
|
136
|
-
parent.appendChild(this.emptyPaneMessageElement);
|
|
137
|
-
this._register(CompositeDragAndDropObserver.INSTANCE.registerTarget(this.emptyPaneMessageElement, {
|
|
138
|
-
onDragOver: (e) => {
|
|
139
|
-
EventHelper.stop(e.eventData, true);
|
|
140
|
-
if (this.paneCompositeBar.value) {
|
|
141
|
-
const validDropTarget = this.paneCompositeBar.value.dndHandler.onDragEnter(e.dragAndDropData, undefined, e.eventData);
|
|
142
|
-
toggleDropEffect(e.eventData.dataTransfer, 'move', validDropTarget);
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
onDragEnter: (e) => {
|
|
146
|
-
EventHelper.stop(e.eventData, true);
|
|
147
|
-
if (this.paneCompositeBar.value) {
|
|
148
|
-
const validDropTarget = this.paneCompositeBar.value.dndHandler.onDragEnter(e.dragAndDropData, undefined, e.eventData);
|
|
149
|
-
this.emptyPaneMessageElement.style.backgroundColor = validDropTarget ? this.theme.getColor(EDITOR_DRAG_AND_DROP_BACKGROUND)?.toString() || '' : '';
|
|
150
|
-
}
|
|
151
|
-
},
|
|
152
|
-
onDragLeave: (e) => {
|
|
153
|
-
EventHelper.stop(e.eventData, true);
|
|
154
|
-
this.emptyPaneMessageElement.style.backgroundColor = '';
|
|
155
|
-
},
|
|
156
|
-
onDragEnd: (e) => {
|
|
157
|
-
EventHelper.stop(e.eventData, true);
|
|
158
|
-
this.emptyPaneMessageElement.style.backgroundColor = '';
|
|
159
|
-
},
|
|
160
|
-
onDrop: (e) => {
|
|
161
|
-
EventHelper.stop(e.eventData, true);
|
|
162
|
-
this.emptyPaneMessageElement.style.backgroundColor = '';
|
|
163
|
-
if (this.paneCompositeBar.value) {
|
|
164
|
-
this.paneCompositeBar.value.dndHandler.drop(e.dragAndDropData, undefined, e.eventData);
|
|
165
|
-
}
|
|
166
|
-
},
|
|
167
|
-
}));
|
|
168
|
-
}
|
|
169
|
-
createTitleArea(parent) {
|
|
170
|
-
const titleArea = super.createTitleArea(parent);
|
|
171
|
-
this._register(addDisposableListener(titleArea, EventType.CONTEXT_MENU, e => {
|
|
172
|
-
this.onTitleAreaContextMenu(( new StandardMouseEvent(getWindow(titleArea), e)));
|
|
173
|
-
}));
|
|
174
|
-
this._register(Gesture.addTarget(titleArea));
|
|
175
|
-
this._register(addDisposableListener(titleArea, EventType$1.Contextmenu, e => {
|
|
176
|
-
this.onTitleAreaContextMenu(( new StandardMouseEvent(getWindow(titleArea), e)));
|
|
177
|
-
}));
|
|
178
|
-
const globalTitleActionsContainer = titleArea.appendChild($('.global-actions'));
|
|
179
|
-
this.globalToolBar = this._register(( new ToolBar(globalTitleActionsContainer, this.contextMenuService, {
|
|
180
|
-
actionViewItemProvider: action => this.actionViewItemProvider(action),
|
|
181
|
-
orientation: 0 ,
|
|
182
|
-
getKeyBinding: action => this.keybindingService.lookupKeybinding(action.id),
|
|
183
|
-
anchorAlignmentProvider: () => this.getTitleAreaDropDownAnchorAlignment(),
|
|
184
|
-
toggleMenuTitle: ( localizeWithPath(
|
|
185
|
-
'vs/workbench/browser/parts/paneCompositePart',
|
|
186
|
-
'moreActions',
|
|
187
|
-
"More Actions..."
|
|
188
|
-
))
|
|
189
|
-
})));
|
|
190
|
-
this.updateGlobalToolbarActions();
|
|
191
|
-
return titleArea;
|
|
192
|
-
}
|
|
193
|
-
createTitleLabel(parent) {
|
|
194
|
-
this.titleContainer = parent;
|
|
195
|
-
const titleLabel = super.createTitleLabel(parent);
|
|
196
|
-
this.titleLabelElement.draggable = true;
|
|
197
|
-
const draggedItemProvider = () => {
|
|
198
|
-
const activeViewlet = this.getActivePaneComposite();
|
|
199
|
-
return { type: 'composite', id: activeViewlet.getId() };
|
|
200
|
-
};
|
|
201
|
-
this._register(CompositeDragAndDropObserver.INSTANCE.registerDraggable(this.titleLabelElement, draggedItemProvider, {}));
|
|
202
|
-
this.updateTitleArea();
|
|
203
|
-
return titleLabel;
|
|
204
|
-
}
|
|
205
|
-
updateTitleArea() {
|
|
206
|
-
if (!this.titleContainer) {
|
|
207
|
-
return;
|
|
208
|
-
}
|
|
209
|
-
if (this.shouldShowCompositeBar()) {
|
|
210
|
-
if (!this.paneCompositeBar.value) {
|
|
211
|
-
this.titleContainer.classList.add('has-composite-bar');
|
|
212
|
-
this.paneCompositeBarContainer = prepend(this.titleContainer, $('.composite-bar-container'));
|
|
213
|
-
this.paneCompositeBar.value = this.createCompisteBar();
|
|
214
|
-
this.paneCompositeBar.value.create(this.paneCompositeBarContainer);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
else {
|
|
218
|
-
this.titleContainer.classList.remove('has-composite-bar');
|
|
219
|
-
this.paneCompositeBarContainer?.remove();
|
|
220
|
-
this.paneCompositeBarContainer = undefined;
|
|
221
|
-
this.paneCompositeBar.clear();
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
createCompisteBar() {
|
|
225
|
-
return this.instantiationService.createInstance(PaneCompositeBar, this.getCompositeBarOptions(), this.partId, this);
|
|
226
|
-
}
|
|
227
|
-
onTitleAreaUpdate(compositeId) {
|
|
228
|
-
super.onTitleAreaUpdate(compositeId);
|
|
229
|
-
this.layoutCompositeBar();
|
|
230
|
-
}
|
|
231
|
-
async openPaneComposite(id, focus) {
|
|
232
|
-
if (typeof id === 'string' && this.getPaneComposite(id)) {
|
|
233
|
-
return this.doOpenPaneComposite(id, focus);
|
|
234
|
-
}
|
|
235
|
-
await this.extensionService.whenInstalledExtensionsRegistered();
|
|
236
|
-
if (typeof id === 'string' && this.getPaneComposite(id)) {
|
|
237
|
-
return this.doOpenPaneComposite(id, focus);
|
|
238
|
-
}
|
|
239
|
-
return undefined;
|
|
240
|
-
}
|
|
241
|
-
doOpenPaneComposite(id, focus) {
|
|
242
|
-
if (this.blockOpening) {
|
|
243
|
-
return undefined;
|
|
244
|
-
}
|
|
245
|
-
if (!this.layoutService.isVisible(this.partId)) {
|
|
246
|
-
try {
|
|
247
|
-
this.blockOpening = true;
|
|
248
|
-
this.layoutService.setPartHidden(false, this.partId);
|
|
249
|
-
}
|
|
250
|
-
finally {
|
|
251
|
-
this.blockOpening = false;
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
return this.openComposite(id, focus);
|
|
255
|
-
}
|
|
256
|
-
getPaneComposite(id) {
|
|
257
|
-
return this.registry.getPaneComposite(id);
|
|
258
|
-
}
|
|
259
|
-
getPaneComposites() {
|
|
260
|
-
return this.registry.getPaneComposites()
|
|
261
|
-
.sort((v1, v2) => {
|
|
262
|
-
if (typeof v1.order !== 'number') {
|
|
263
|
-
return 1;
|
|
264
|
-
}
|
|
265
|
-
if (typeof v2.order !== 'number') {
|
|
266
|
-
return -1;
|
|
267
|
-
}
|
|
268
|
-
return v1.order - v2.order;
|
|
269
|
-
});
|
|
270
|
-
}
|
|
271
|
-
getPinnedPaneCompositeIds() {
|
|
272
|
-
return this.paneCompositeBar.value?.getPinnedPaneCompositeIds() ?? [];
|
|
273
|
-
}
|
|
274
|
-
getVisiblePaneCompositeIds() {
|
|
275
|
-
return this.paneCompositeBar.value?.getVisiblePaneCompositeIds() ?? [];
|
|
276
|
-
}
|
|
277
|
-
getActivePaneComposite() {
|
|
278
|
-
return this.getActiveComposite();
|
|
279
|
-
}
|
|
280
|
-
getLastActivePaneCompositeId() {
|
|
281
|
-
return this.getLastActiveCompositeId();
|
|
282
|
-
}
|
|
283
|
-
hideActivePaneComposite() {
|
|
284
|
-
if (this.layoutService.isVisible(this.partId)) {
|
|
285
|
-
this.layoutService.setPartHidden(true, this.partId);
|
|
286
|
-
}
|
|
287
|
-
this.hideActiveComposite();
|
|
288
|
-
}
|
|
289
|
-
focusComositeBar() {
|
|
290
|
-
this.paneCompositeBar.value?.focus();
|
|
291
|
-
}
|
|
292
|
-
layout(width, height, top, left) {
|
|
293
|
-
if (!this.layoutService.isVisible(this.partId)) {
|
|
294
|
-
return;
|
|
295
|
-
}
|
|
296
|
-
this.contentDimension = ( new Dimension(width, height));
|
|
297
|
-
super.layout(this.contentDimension.width, this.contentDimension.height, top, left);
|
|
298
|
-
this.layoutCompositeBar();
|
|
299
|
-
this.layoutEmptyMessage();
|
|
300
|
-
}
|
|
301
|
-
layoutCompositeBar() {
|
|
302
|
-
if (this.contentDimension && this.dimension && this.paneCompositeBar.value) {
|
|
303
|
-
let availableWidth = this.contentDimension.width - 16;
|
|
304
|
-
if (this.toolBar) {
|
|
305
|
-
availableWidth = Math.max(AbstractPaneCompositePart_1.MIN_COMPOSITE_BAR_WIDTH, availableWidth - this.getToolbarWidth());
|
|
306
|
-
}
|
|
307
|
-
this.paneCompositeBar.value.layout(availableWidth, this.dimension.height);
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
layoutEmptyMessage() {
|
|
311
|
-
this.emptyPaneMessageElement?.classList.toggle('visible', !this.getActiveComposite());
|
|
312
|
-
}
|
|
313
|
-
updateGlobalToolbarActions() {
|
|
314
|
-
const primaryActions = this.globalActions.getPrimaryActions();
|
|
315
|
-
const secondaryActions = this.globalActions.getSecondaryActions();
|
|
316
|
-
this.globalToolBar?.setActions(prepareActions(primaryActions), prepareActions(secondaryActions));
|
|
317
|
-
}
|
|
318
|
-
getToolbarWidth() {
|
|
319
|
-
const activePane = this.getActivePaneComposite();
|
|
320
|
-
if (!activePane || !this.toolBar) {
|
|
321
|
-
return 0;
|
|
322
|
-
}
|
|
323
|
-
return this.toolBar.getItemsWidth() + 5 + (this.globalToolBar?.getItemsWidth() ?? 0);
|
|
324
|
-
}
|
|
325
|
-
onTitleAreaContextMenu(event) {
|
|
326
|
-
if (this.shouldShowCompositeBar() && this.paneCompositeBar.value) {
|
|
327
|
-
const actions = [...this.paneCompositeBar.value.getContextMenuActions()];
|
|
328
|
-
if (actions.length) {
|
|
329
|
-
this.contextMenuService.showContextMenu({
|
|
330
|
-
getAnchor: () => event,
|
|
331
|
-
getActions: () => actions,
|
|
332
|
-
skipTelemetry: true
|
|
333
|
-
});
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
else {
|
|
337
|
-
const activePaneComposite = this.getActivePaneComposite();
|
|
338
|
-
const activePaneCompositeActions = activePaneComposite ? activePaneComposite.getContextMenuActions() : [];
|
|
339
|
-
if (activePaneCompositeActions.length) {
|
|
340
|
-
this.contextMenuService.showContextMenu({
|
|
341
|
-
getAnchor: () => event,
|
|
342
|
-
getActions: () => activePaneCompositeActions,
|
|
343
|
-
getActionViewItem: action => this.actionViewItemProvider(action),
|
|
344
|
-
actionRunner: activePaneComposite.getActionRunner(),
|
|
345
|
-
skipTelemetry: true
|
|
346
|
-
});
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
getViewsSubmenuAction() {
|
|
351
|
-
const viewPaneContainer = this.getActivePaneComposite()?.getViewPaneContainer();
|
|
352
|
-
if (viewPaneContainer) {
|
|
353
|
-
const disposables = ( new DisposableStore());
|
|
354
|
-
const viewsActions = [];
|
|
355
|
-
const scopedContextKeyService = disposables.add(this.contextKeyService.createScoped(this.element));
|
|
356
|
-
scopedContextKeyService.createKey('viewContainer', viewPaneContainer.viewContainer.id);
|
|
357
|
-
const menu = disposables.add(this.menuService.createMenu(ViewsSubMenu, scopedContextKeyService));
|
|
358
|
-
createAndFillInActionBarActions(menu, { shouldForwardArgs: true, renderShortTitle: true }, { primary: viewsActions, secondary: [] }, () => true);
|
|
359
|
-
disposables.dispose();
|
|
360
|
-
return viewsActions.length > 1 && ( viewsActions.some(a => a.enabled)) ? ( new SubmenuAction('views', ( localizeWithPath('vs/workbench/browser/parts/paneCompositePart', 'views', "Views")), viewsActions)) : undefined;
|
|
361
|
-
}
|
|
362
|
-
return undefined;
|
|
363
|
-
}
|
|
364
|
-
};
|
|
365
|
-
AbstractPaneCompositePart = AbstractPaneCompositePart_1 = ( __decorate([
|
|
366
|
-
( __param(8, INotificationService)),
|
|
367
|
-
( __param(9, IStorageService)),
|
|
368
|
-
( __param(10, IContextMenuService)),
|
|
369
|
-
( __param(11, IWorkbenchLayoutService)),
|
|
370
|
-
( __param(12, IKeybindingService)),
|
|
371
|
-
( __param(13, IInstantiationService)),
|
|
372
|
-
( __param(14, IThemeService)),
|
|
373
|
-
( __param(15, IViewDescriptorService)),
|
|
374
|
-
( __param(16, IContextKeyService)),
|
|
375
|
-
( __param(17, IExtensionService)),
|
|
376
|
-
( __param(18, IMenuService))
|
|
377
|
-
], AbstractPaneCompositePart));
|
|
378
|
-
|
|
379
|
-
export { AbstractPaneCompositePart };
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
3
|
-
import { assertIsDefined } from 'vscode/vscode/vs/base/common/types';
|
|
4
|
-
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
5
|
-
import { AuxiliaryBarPart } from './auxiliarybar/auxiliaryBarPart.js';
|
|
6
|
-
import { PanelPart } from './panel/panelPart.js';
|
|
7
|
-
import { SidebarPart } from './sidebar/sidebarPart.js';
|
|
8
|
-
import { ViewContainerLocations } from 'vscode/vscode/vs/workbench/common/views';
|
|
9
|
-
import { Disposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
10
|
-
|
|
11
|
-
let PaneCompositePartService = class PaneCompositePartService extends Disposable {
|
|
12
|
-
constructor(instantiationService) {
|
|
13
|
-
super();
|
|
14
|
-
this.paneCompositeParts = ( new Map());
|
|
15
|
-
const panelPart = instantiationService.createInstance(PanelPart);
|
|
16
|
-
const sideBarPart = instantiationService.createInstance(SidebarPart);
|
|
17
|
-
const auxiliaryBarPart = instantiationService.createInstance(AuxiliaryBarPart);
|
|
18
|
-
this.paneCompositeParts.set(1 , panelPart);
|
|
19
|
-
this.paneCompositeParts.set(0 , sideBarPart);
|
|
20
|
-
this.paneCompositeParts.set(2 , auxiliaryBarPart);
|
|
21
|
-
const eventDisposables = this._register(( new DisposableStore()));
|
|
22
|
-
this.onDidPaneCompositeOpen = Event.any(...( ViewContainerLocations.map(loc => ( Event.map(
|
|
23
|
-
this.paneCompositeParts.get(loc).onDidPaneCompositeOpen,
|
|
24
|
-
composite => { return { composite, viewContainerLocation: loc }; },
|
|
25
|
-
eventDisposables
|
|
26
|
-
)))));
|
|
27
|
-
this.onDidPaneCompositeClose = Event.any(...( ViewContainerLocations.map(loc => ( Event.map(
|
|
28
|
-
this.paneCompositeParts.get(loc).onDidPaneCompositeClose,
|
|
29
|
-
composite => { return { composite, viewContainerLocation: loc }; },
|
|
30
|
-
eventDisposables
|
|
31
|
-
)))));
|
|
32
|
-
}
|
|
33
|
-
openPaneComposite(id, viewContainerLocation, focus) {
|
|
34
|
-
return this.getPartByLocation(viewContainerLocation).openPaneComposite(id, focus);
|
|
35
|
-
}
|
|
36
|
-
getActivePaneComposite(viewContainerLocation) {
|
|
37
|
-
return this.getPartByLocation(viewContainerLocation).getActivePaneComposite();
|
|
38
|
-
}
|
|
39
|
-
getPaneComposite(id, viewContainerLocation) {
|
|
40
|
-
return this.getPartByLocation(viewContainerLocation).getPaneComposite(id);
|
|
41
|
-
}
|
|
42
|
-
getPaneComposites(viewContainerLocation) {
|
|
43
|
-
return this.getPartByLocation(viewContainerLocation).getPaneComposites();
|
|
44
|
-
}
|
|
45
|
-
getPinnedPaneCompositeIds(viewContainerLocation) {
|
|
46
|
-
return this.getPartByLocation(viewContainerLocation).getPinnedPaneCompositeIds();
|
|
47
|
-
}
|
|
48
|
-
getVisiblePaneCompositeIds(viewContainerLocation) {
|
|
49
|
-
return this.getPartByLocation(viewContainerLocation).getVisiblePaneCompositeIds();
|
|
50
|
-
}
|
|
51
|
-
getProgressIndicator(id, viewContainerLocation) {
|
|
52
|
-
return this.getPartByLocation(viewContainerLocation).getProgressIndicator(id);
|
|
53
|
-
}
|
|
54
|
-
hideActivePaneComposite(viewContainerLocation) {
|
|
55
|
-
this.getPartByLocation(viewContainerLocation).hideActivePaneComposite();
|
|
56
|
-
}
|
|
57
|
-
getLastActivePaneCompositeId(viewContainerLocation) {
|
|
58
|
-
return this.getPartByLocation(viewContainerLocation).getLastActivePaneCompositeId();
|
|
59
|
-
}
|
|
60
|
-
getPartByLocation(viewContainerLocation) {
|
|
61
|
-
return assertIsDefined(this.paneCompositeParts.get(viewContainerLocation));
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
PaneCompositePartService = ( __decorate([
|
|
65
|
-
( __param(0, IInstantiationService))
|
|
66
|
-
], PaneCompositePartService));
|
|
67
|
-
|
|
68
|
-
export { PaneCompositePartService };
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import 'vscode/vscode/vs/workbench/browser/parts/panel/media/panelpart.css';
|
|
3
|
-
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
4
|
-
import { Separator, SubmenuAction, toAction } from 'vscode/vscode/vs/base/common/actions';
|
|
5
|
-
import { ActivePanelContext, PanelFocusContext } from 'vscode/vscode/vs/workbench/common/contextkeys';
|
|
6
|
-
import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
7
|
-
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
8
|
-
import { IContextMenuService } from 'vscode/vscode/vs/platform/contextview/browser/contextView';
|
|
9
|
-
import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/keybinding';
|
|
10
|
-
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
11
|
-
import { TogglePanelAction } from 'vscode/vscode/vs/workbench/browser/parts/panel/panelActions';
|
|
12
|
-
import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService';
|
|
13
|
-
import { PANEL_BACKGROUND, PANEL_BORDER, PANEL_ACTIVE_TITLE_BORDER, PANEL_ACTIVE_TITLE_FOREGROUND, PANEL_INACTIVE_TITLE_FOREGROUND, PANEL_DRAG_AND_DROP_BORDER } from 'vscode/vscode/vs/workbench/common/theme';
|
|
14
|
-
import { contrastBorder, badgeBackground, badgeForeground } from 'vscode/vscode/vs/platform/theme/common/colorRegistry';
|
|
15
|
-
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification';
|
|
16
|
-
import { Dimension } from 'vscode/vscode/vs/base/browser/dom';
|
|
17
|
-
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
18
|
-
import { assertIsDefined } from 'vscode/vscode/vs/base/common/types';
|
|
19
|
-
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
|
|
20
|
-
import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views';
|
|
21
|
-
import { MenuId, IMenuService } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
22
|
-
import { AbstractPaneCompositePart } from '../paneCompositePart.js';
|
|
23
|
-
import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands';
|
|
24
|
-
import { createAndFillInContextMenuActions } from 'vscode/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
|
|
25
|
-
|
|
26
|
-
var PanelPart_1;
|
|
27
|
-
let PanelPart = class PanelPart extends AbstractPaneCompositePart {
|
|
28
|
-
static { PanelPart_1 = this; }
|
|
29
|
-
get preferredHeight() {
|
|
30
|
-
return this.layoutService.mainContainerDimension.height * 0.4;
|
|
31
|
-
}
|
|
32
|
-
get preferredWidth() {
|
|
33
|
-
const activeComposite = this.getActivePaneComposite();
|
|
34
|
-
if (!activeComposite) {
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
const width = activeComposite.getOptimalWidth();
|
|
38
|
-
if (typeof width !== 'number') {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
return Math.max(width, 300);
|
|
42
|
-
}
|
|
43
|
-
static { this.activePanelSettingsKey = 'workbench.panelpart.activepanelid'; }
|
|
44
|
-
constructor(notificationService, storageService, contextMenuService, layoutService, keybindingService, instantiationService, themeService, viewDescriptorService, contextKeyService, extensionService, commandService, menuService) {
|
|
45
|
-
super("workbench.parts.panel" , { hasTitle: true }, PanelPart_1.activePanelSettingsKey, ActivePanelContext.bindTo(contextKeyService), PanelFocusContext.bindTo(contextKeyService), 'panel', 'panel', undefined, notificationService, storageService, contextMenuService, layoutService, keybindingService, instantiationService, themeService, viewDescriptorService, contextKeyService, extensionService, menuService);
|
|
46
|
-
this.commandService = commandService;
|
|
47
|
-
this.minimumWidth = 300;
|
|
48
|
-
this.maximumWidth = Number.POSITIVE_INFINITY;
|
|
49
|
-
this.minimumHeight = 77;
|
|
50
|
-
this.maximumHeight = Number.POSITIVE_INFINITY;
|
|
51
|
-
}
|
|
52
|
-
updateStyles() {
|
|
53
|
-
super.updateStyles();
|
|
54
|
-
const container = assertIsDefined(this.getContainer());
|
|
55
|
-
container.style.backgroundColor = this.getColor(PANEL_BACKGROUND) || '';
|
|
56
|
-
const borderColor = this.getColor(PANEL_BORDER) || this.getColor(contrastBorder) || '';
|
|
57
|
-
container.style.borderLeftColor = borderColor;
|
|
58
|
-
container.style.borderRightColor = borderColor;
|
|
59
|
-
const title = this.getTitleArea();
|
|
60
|
-
if (title) {
|
|
61
|
-
title.style.borderTopColor = this.getColor(PANEL_BORDER) || this.getColor(contrastBorder) || '';
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
getCompositeBarOptions() {
|
|
65
|
-
return {
|
|
66
|
-
partContainerClass: 'panel',
|
|
67
|
-
pinnedViewContainersKey: 'workbench.panel.pinnedPanels',
|
|
68
|
-
placeholderViewContainersKey: 'workbench.panel.placeholderPanels',
|
|
69
|
-
viewContainersWorkspaceStateKey: 'workbench.panel.viewContainersWorkspaceState',
|
|
70
|
-
icon: false,
|
|
71
|
-
orientation: 0 ,
|
|
72
|
-
recomputeSizes: true,
|
|
73
|
-
activityHoverOptions: {
|
|
74
|
-
position: () => this.layoutService.getPanelPosition() === 2 && !this.layoutService.isPanelMaximized() ? 3 : 2 ,
|
|
75
|
-
},
|
|
76
|
-
fillExtraContextMenuActions: actions => ( this.fillExtraContextMenuActions(actions)),
|
|
77
|
-
compositeSize: 0,
|
|
78
|
-
iconSize: 16,
|
|
79
|
-
overflowActionSize: 44,
|
|
80
|
-
colors: theme => ({
|
|
81
|
-
activeBackgroundColor: theme.getColor(PANEL_BACKGROUND),
|
|
82
|
-
inactiveBackgroundColor: theme.getColor(PANEL_BACKGROUND),
|
|
83
|
-
activeBorderBottomColor: theme.getColor(PANEL_ACTIVE_TITLE_BORDER),
|
|
84
|
-
activeForegroundColor: theme.getColor(PANEL_ACTIVE_TITLE_FOREGROUND),
|
|
85
|
-
inactiveForegroundColor: theme.getColor(PANEL_INACTIVE_TITLE_FOREGROUND),
|
|
86
|
-
badgeBackground: theme.getColor(badgeBackground),
|
|
87
|
-
badgeForeground: theme.getColor(badgeForeground),
|
|
88
|
-
dragAndDropBorder: theme.getColor(PANEL_DRAG_AND_DROP_BORDER)
|
|
89
|
-
})
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
fillExtraContextMenuActions(actions) {
|
|
93
|
-
const panelPositionMenu = this.menuService.createMenu(MenuId.PanelPositionMenu, this.contextKeyService);
|
|
94
|
-
const panelAlignMenu = this.menuService.createMenu(MenuId.PanelAlignmentMenu, this.contextKeyService);
|
|
95
|
-
const positionActions = [];
|
|
96
|
-
const alignActions = [];
|
|
97
|
-
createAndFillInContextMenuActions(panelPositionMenu, { shouldForwardArgs: true }, { primary: [], secondary: positionActions });
|
|
98
|
-
createAndFillInContextMenuActions(panelAlignMenu, { shouldForwardArgs: true }, { primary: [], secondary: alignActions });
|
|
99
|
-
panelAlignMenu.dispose();
|
|
100
|
-
panelPositionMenu.dispose();
|
|
101
|
-
actions.push(...[
|
|
102
|
-
( new Separator()),
|
|
103
|
-
( new SubmenuAction('workbench.action.panel.position', ( localizeWithPath(
|
|
104
|
-
'vs/workbench/browser/parts/panel/panelPart',
|
|
105
|
-
'panel position',
|
|
106
|
-
"Panel Position"
|
|
107
|
-
)), positionActions)),
|
|
108
|
-
( new SubmenuAction('workbench.action.panel.align', ( localizeWithPath('vs/workbench/browser/parts/panel/panelPart', 'align panel', "Align Panel")), alignActions)),
|
|
109
|
-
toAction({ id: TogglePanelAction.ID, label: ( localizeWithPath('vs/workbench/browser/parts/panel/panelPart', 'hidePanel', "Hide Panel")), run: () => this.commandService.executeCommand(TogglePanelAction.ID) })
|
|
110
|
-
]);
|
|
111
|
-
}
|
|
112
|
-
layout(width, height, top, left) {
|
|
113
|
-
let dimensions;
|
|
114
|
-
if (this.layoutService.getPanelPosition() === 1 ) {
|
|
115
|
-
dimensions = ( new Dimension(width - 1, height));
|
|
116
|
-
}
|
|
117
|
-
else {
|
|
118
|
-
dimensions = ( new Dimension(width, height));
|
|
119
|
-
}
|
|
120
|
-
super.layout(dimensions.width, dimensions.height, top, left);
|
|
121
|
-
}
|
|
122
|
-
shouldShowCompositeBar() {
|
|
123
|
-
return true;
|
|
124
|
-
}
|
|
125
|
-
toJSON() {
|
|
126
|
-
return {
|
|
127
|
-
type: "workbench.parts.panel"
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
PanelPart = PanelPart_1 = ( __decorate([
|
|
132
|
-
( __param(0, INotificationService)),
|
|
133
|
-
( __param(1, IStorageService)),
|
|
134
|
-
( __param(2, IContextMenuService)),
|
|
135
|
-
( __param(3, IWorkbenchLayoutService)),
|
|
136
|
-
( __param(4, IKeybindingService)),
|
|
137
|
-
( __param(5, IInstantiationService)),
|
|
138
|
-
( __param(6, IThemeService)),
|
|
139
|
-
( __param(7, IViewDescriptorService)),
|
|
140
|
-
( __param(8, IContextKeyService)),
|
|
141
|
-
( __param(9, IExtensionService)),
|
|
142
|
-
( __param(10, ICommandService)),
|
|
143
|
-
( __param(11, IMenuService))
|
|
144
|
-
], PanelPart));
|
|
145
|
-
|
|
146
|
-
export { PanelPart };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import n from '../../../../../../../../external/rollup-plugin-styles/dist/runtime/inject-css.js';
|
|
2
|
-
|
|
3
|
-
var css = ".monaco-workbench.nosidebar>.part.sidebar{display:none!important;visibility:hidden!important}.monaco-workbench .part.sidebar .title-actions .actions-container{justify-content:flex-end}.monaco-workbench .part.sidebar .title-actions .action-item{margin-right:4px}.monaco-workbench .part.sidebar>.title>.title-label h2{text-transform:uppercase}.monaco-workbench .viewlet .collapsible.header .title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-workbench .viewlet .collapsible.header .actions{width:0}.monaco-workbench .viewlet .collapsible.header.focused .actions,.monaco-workbench .viewlet .split-view-view:hover>.header .actions{flex:1;width:auto}.monaco-workbench .viewlet .collapsible.header .actions .action-label{background-position:50%;background-repeat:no-repeat;background-size:16px;height:22px;margin-right:0;width:28px}.monaco-workbench .viewlet .collapsible.header .actions .action-label .label,.monaco-workbench .viewlet .collapsible.header.collapsed .actions{display:none}.monaco-workbench .viewlet .collapsible.header .action-label{background-repeat:no-repeat;height:16px;margin-right:.2em;width:16px}.monaco-workbench .part.sidebar>.title>.composite-bar-container>.composite-bar>.monaco-action-bar .action-item.checked.clicked:focus .active-item-indicator:before,.monaco-workbench .part.sidebar>.title>.composite-bar-container>.composite-bar>.monaco-action-bar .action-item.checked:not(:focus) .active-item-indicator:before{border-top-color:var(--vscode-activityBarTop-activeBorder)!important}.monaco-workbench .part.sidebar>.title>.composite-bar-container>.composite-bar>.monaco-action-bar .action-item:focus .action-label,.monaco-workbench .part.sidebar>.title>.composite-bar-container>.composite-bar>.monaco-action-bar .action-item:hover .action-label{color:var(--vscode-activityBarTop-foreground)!important}.monaco-workbench .sidebar.pane-composite-part>.title>.composite-bar-container{flex:1}.monaco-workbench .sidebar.part.pane-composite-part>.composite.title.has-composite-bar>.title-actions{flex:inherit}.monaco-workbench .sidebar.pane-composite-part>.title.has-composite-bar>.title-actions .monaco-action-bar .action-item{max-width:150px}";
|
|
4
|
-
n(css,{});
|
|
5
|
-
|
|
6
|
-
export { css, css as default };
|