@codingame/monaco-vscode-view-common-service-override 5.3.0 → 6.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/package.json +3 -3
- package/viewCommon.js +1 -1
- package/vscode/src/vs/base/browser/ui/centered/centeredViewLayout.js +2 -1
- package/vscode/src/vs/base/browser/ui/grid/grid.js +34 -24
- package/vscode/src/vs/base/browser/ui/grid/gridview.js +35 -34
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +9 -60
- package/vscode/src/vs/workbench/browser/actions/listCommands.js +119 -79
- package/vscode/src/vs/workbench/browser/actions/navigationActions.js +76 -64
- package/vscode/src/vs/workbench/browser/media/style.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +51 -71
- 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 -18
- package/vscode/src/vs/workbench/browser/parts/compositeBar.js +6 -6
- package/vscode/src/vs/workbench/browser/parts/compositePart.js +11 -8
- package/vscode/src/vs/workbench/browser/parts/editor/auxiliaryEditorPart.js +8 -7
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +112 -107
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +36 -30
- package/vscode/src/vs/workbench/browser/parts/editor/editorPart.js +75 -69
- package/vscode/src/vs/workbench/browser/parts/editor/editorParts.js +143 -25
- package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.js +20 -16
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +13 -11
- package/vscode/src/vs/workbench/browser/parts/paneCompositePartService.js +5 -4
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +8 -5
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarActions.js +9 -6
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +51 -37
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +28 -25
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +23 -13
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +5 -5
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.js +3 -2
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +2 -1
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +34 -23
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +3 -2
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +7 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +3 -2
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution.js +1 -0
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +17 -15
- package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +2 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +2 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +4 -3
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/conflictActions.js +7 -7
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +2 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.js +2 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +9 -8
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +2 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +11 -6
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.js +24 -23
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +3 -2
- package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +5 -4
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js +2 -1
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +26 -23
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +23 -13
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +5 -5
- package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.js +2 -2
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +7 -6
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewService.js +8 -6
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +10 -8
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +3 -2
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +4 -3
- package/vscode/src/vs/workbench/services/activity/browser/activityService.js +1 -0
- package/vscode/src/vs/workbench/services/editor/browser/editorPaneService.js +1 -0
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +21 -19
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +73 -63
- package/vscode/src/vs/workbench/services/progress/browser/progressService.js +19 -15
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.js +1 -0
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +23 -18
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +20 -14
- package/vscode/src/vs/base/browser/deviceAccess.js +0 -61
- package/vscode/src/vs/platform/languagePacks/common/localizedStrings.js +0 -13
- package/vscode/src/vs/workbench/browser/window.js +0 -330
- package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +0 -371
- package/vscode/src/vs/workbench/services/driver/browser/driver.js +0 -188
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-view-common-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
30
|
-
"@codingame/monaco-vscode-bulk-edit-service-override": "
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@6.0.0",
|
|
30
|
+
"@codingame/monaco-vscode-bulk-edit-service-override": "6.0.0"
|
|
31
31
|
}
|
|
32
32
|
}
|
package/viewCommon.js
CHANGED
|
@@ -29,7 +29,7 @@ import { IWebviewViewService } from 'vscode/vscode/vs/workbench/contrib/webviewV
|
|
|
29
29
|
import { IProgressService } from 'vscode/vscode/vs/platform/progress/common/progress.service';
|
|
30
30
|
import { ProgressService } from './vscode/src/vs/workbench/services/progress/browser/progressService.js';
|
|
31
31
|
import { PaneCompositePartService } from './vscode/src/vs/workbench/browser/parts/paneCompositePartService.js';
|
|
32
|
-
import { BrowserAuxiliaryWindowService } from '
|
|
32
|
+
import { BrowserAuxiliaryWindowService } from 'vscode/vscode/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService';
|
|
33
33
|
import { IAuxiliaryWindowService } from 'vscode/vscode/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.service';
|
|
34
34
|
import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
35
35
|
import { ViewsService } from 'vscode/vscode/vs/workbench/services/views/browser/viewsService';
|
|
@@ -2,6 +2,7 @@ import { $ } from 'vscode/vscode/vs/base/browser/dom';
|
|
|
2
2
|
import { SplitView } from 'vscode/vscode/vs/base/browser/ui/splitview/splitview';
|
|
3
3
|
import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
4
4
|
import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
|
+
import { Orientation } from 'vscode/vscode/vs/base/browser/ui/sash/sash';
|
|
5
6
|
|
|
6
7
|
const defaultState = {
|
|
7
8
|
targetWidth: 900,
|
|
@@ -125,7 +126,7 @@ class CenteredViewLayout {
|
|
|
125
126
|
this.container.removeChild(this.view.element);
|
|
126
127
|
this.splitView = ( new SplitView(this.container, {
|
|
127
128
|
inverseAltBehavior: true,
|
|
128
|
-
orientation:
|
|
129
|
+
orientation: Orientation.HORIZONTAL,
|
|
129
130
|
styles: this.style
|
|
130
131
|
}));
|
|
131
132
|
this.splitView.orthogonalStartSash = this.boundarySashes.top;
|
|
@@ -1,15 +1,25 @@
|
|
|
1
|
+
import { Orientation } from 'vscode/vscode/vs/base/browser/ui/sash/sash';
|
|
2
|
+
export { Orientation } from 'vscode/vscode/vs/base/browser/ui/sash/sash';
|
|
1
3
|
import { tail2, equals } from 'vscode/vscode/vs/base/common/arrays';
|
|
2
4
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
5
|
import './gridview.css.js';
|
|
4
6
|
import { orthogonal, GridView } from './gridview.js';
|
|
5
7
|
import { Sizing as Sizing$1 } from 'vscode/vscode/vs/base/browser/ui/splitview/splitview';
|
|
8
|
+
export { LayoutPriority } from 'vscode/vscode/vs/base/browser/ui/splitview/splitview';
|
|
6
9
|
|
|
10
|
+
var Direction;
|
|
11
|
+
( (function(Direction) {
|
|
12
|
+
Direction[Direction["Up"] = 0] = "Up";
|
|
13
|
+
Direction[Direction["Down"] = 1] = "Down";
|
|
14
|
+
Direction[Direction["Left"] = 2] = "Left";
|
|
15
|
+
Direction[Direction["Right"] = 3] = "Right";
|
|
16
|
+
})(Direction || (Direction = {})));
|
|
7
17
|
function oppositeDirection(direction) {
|
|
8
18
|
switch (direction) {
|
|
9
|
-
case
|
|
10
|
-
case
|
|
11
|
-
case
|
|
12
|
-
case
|
|
19
|
+
case Direction.Up: return Direction.Down;
|
|
20
|
+
case Direction.Down: return Direction.Up;
|
|
21
|
+
case Direction.Left: return Direction.Right;
|
|
22
|
+
case Direction.Right: return Direction.Left;
|
|
13
23
|
}
|
|
14
24
|
}
|
|
15
25
|
function isGridBranchNode(node) {
|
|
@@ -30,13 +40,13 @@ function intersects(one, other) {
|
|
|
30
40
|
}
|
|
31
41
|
function getBoxBoundary(box, direction) {
|
|
32
42
|
const orientation = getDirectionOrientation(direction);
|
|
33
|
-
const offset = direction ===
|
|
34
|
-
direction ===
|
|
35
|
-
direction ===
|
|
43
|
+
const offset = direction === Direction.Up ? box.top :
|
|
44
|
+
direction === Direction.Right ? box.left + box.width :
|
|
45
|
+
direction === Direction.Down ? box.top + box.height :
|
|
36
46
|
box.left;
|
|
37
47
|
const range = {
|
|
38
|
-
start: orientation ===
|
|
39
|
-
end: orientation ===
|
|
48
|
+
start: orientation === Orientation.HORIZONTAL ? box.top : box.left,
|
|
49
|
+
end: orientation === Orientation.HORIZONTAL ? box.top + box.height : box.left + box.width
|
|
40
50
|
};
|
|
41
51
|
return { offset, range };
|
|
42
52
|
}
|
|
@@ -62,20 +72,20 @@ function getLocationOrientation(rootOrientation, location) {
|
|
|
62
72
|
return location.length % 2 === 0 ? orthogonal(rootOrientation) : rootOrientation;
|
|
63
73
|
}
|
|
64
74
|
function getDirectionOrientation(direction) {
|
|
65
|
-
return direction ===
|
|
75
|
+
return direction === Direction.Up || direction === Direction.Down ? Orientation.VERTICAL : Orientation.HORIZONTAL;
|
|
66
76
|
}
|
|
67
77
|
function getRelativeLocation(rootOrientation, location, direction) {
|
|
68
78
|
const orientation = getLocationOrientation(rootOrientation, location);
|
|
69
79
|
const directionOrientation = getDirectionOrientation(direction);
|
|
70
80
|
if (orientation === directionOrientation) {
|
|
71
81
|
let [rest, index] = tail2(location);
|
|
72
|
-
if (direction ===
|
|
82
|
+
if (direction === Direction.Right || direction === Direction.Down) {
|
|
73
83
|
index += 1;
|
|
74
84
|
}
|
|
75
85
|
return [...rest, index];
|
|
76
86
|
}
|
|
77
87
|
else {
|
|
78
|
-
const index = (
|
|
88
|
+
const index = (direction === Direction.Right || direction === Direction.Down) ? 1 : 0;
|
|
79
89
|
return [...location, index];
|
|
80
90
|
}
|
|
81
91
|
}
|
|
@@ -244,7 +254,7 @@ class Grid extends Disposable {
|
|
|
244
254
|
const orientation = getLocationOrientation(this.gridview.orientation, sourceLocation);
|
|
245
255
|
const cachedViewSize = this.getViewCachedVisibleSize(view);
|
|
246
256
|
const sizing = typeof cachedViewSize === 'undefined'
|
|
247
|
-
? (orientation ===
|
|
257
|
+
? (orientation === Orientation.HORIZONTAL ? size.width : size.height)
|
|
248
258
|
: Sizing.Invisible(cachedViewSize);
|
|
249
259
|
this.removeView(view);
|
|
250
260
|
this.addViewAt(view, sizing, location);
|
|
@@ -318,16 +328,16 @@ class Grid extends Disposable {
|
|
|
318
328
|
const node = getGridNode(root, location);
|
|
319
329
|
let boundary = getBoxBoundary(node.box, direction);
|
|
320
330
|
if (wrap) {
|
|
321
|
-
if (direction ===
|
|
331
|
+
if (direction === Direction.Up && node.box.top === 0) {
|
|
322
332
|
boundary = { offset: root.box.top + root.box.height, range: boundary.range };
|
|
323
333
|
}
|
|
324
|
-
else if (direction ===
|
|
334
|
+
else if (direction === Direction.Right && node.box.left + node.box.width === root.box.width) {
|
|
325
335
|
boundary = { offset: 0, range: boundary.range };
|
|
326
336
|
}
|
|
327
|
-
else if (direction ===
|
|
337
|
+
else if (direction === Direction.Down && node.box.top + node.box.height === root.box.height) {
|
|
328
338
|
boundary = { offset: 0, range: boundary.range };
|
|
329
339
|
}
|
|
330
|
-
else if (direction ===
|
|
340
|
+
else if (direction === Direction.Left && node.box.left === 0) {
|
|
331
341
|
boundary = { offset: root.box.left + root.box.width, range: boundary.range };
|
|
332
342
|
}
|
|
333
343
|
}
|
|
@@ -348,11 +358,11 @@ class Grid extends Disposable {
|
|
|
348
358
|
return false;
|
|
349
359
|
}
|
|
350
360
|
const direction = getLocationOrientation(this.orientation, location);
|
|
351
|
-
const size = direction ===
|
|
361
|
+
const size = direction === Orientation.HORIZONTAL ? node.view.preferredWidth : node.view.preferredHeight;
|
|
352
362
|
if (typeof size !== 'number') {
|
|
353
363
|
return false;
|
|
354
364
|
}
|
|
355
|
-
const viewSize = direction ===
|
|
365
|
+
const viewSize = direction === Orientation.HORIZONTAL ? { width: Math.round(size) } : { height: Math.round(size) };
|
|
356
366
|
this.gridview.resizeView(location, viewSize);
|
|
357
367
|
return true;
|
|
358
368
|
};
|
|
@@ -372,7 +382,7 @@ class SerializableGrid extends Grid {
|
|
|
372
382
|
this.initialLayoutContext = true;
|
|
373
383
|
}
|
|
374
384
|
static serializeNode(node, orientation) {
|
|
375
|
-
const size = orientation ===
|
|
385
|
+
const size = orientation === Orientation.VERTICAL ? node.box.width : node.box.height;
|
|
376
386
|
if (!isGridBranchNode(node)) {
|
|
377
387
|
const serializedLeafNode = { type: 'leaf', data: node.view.toJSON(), size };
|
|
378
388
|
if (typeof node.cachedVisibleSize === 'number') {
|
|
@@ -462,7 +472,7 @@ function createSerializedNode(nodeDescriptor) {
|
|
|
462
472
|
function getDimensions(node, orientation) {
|
|
463
473
|
if (node.type === 'branch') {
|
|
464
474
|
const childrenDimensions = ( node.data.map(c => getDimensions(c, orthogonal(orientation))));
|
|
465
|
-
if (orientation ===
|
|
475
|
+
if (orientation === Orientation.VERTICAL) {
|
|
466
476
|
const width = node.size || (childrenDimensions.length === 0 ? undefined : Math.max(...( childrenDimensions.map(d => d.width || 0))));
|
|
467
477
|
const height = childrenDimensions.length === 0 ? undefined : childrenDimensions.reduce((r, d) => r + (d.height || 0), 0);
|
|
468
478
|
return { width, height };
|
|
@@ -474,8 +484,8 @@ function getDimensions(node, orientation) {
|
|
|
474
484
|
}
|
|
475
485
|
}
|
|
476
486
|
else {
|
|
477
|
-
const width = orientation ===
|
|
478
|
-
const height = orientation ===
|
|
487
|
+
const width = orientation === Orientation.VERTICAL ? node.size : undefined;
|
|
488
|
+
const height = orientation === Orientation.VERTICAL ? undefined : node.size;
|
|
479
489
|
return { width, height };
|
|
480
490
|
}
|
|
481
491
|
}
|
|
@@ -491,4 +501,4 @@ function createSerializedGrid(gridDescriptor) {
|
|
|
491
501
|
};
|
|
492
502
|
}
|
|
493
503
|
|
|
494
|
-
export { Grid, SerializableGrid, Sizing, createSerializedGrid, getRelativeLocation, isGridBranchNode, orthogonal, sanitizeGridNodeDescriptor };
|
|
504
|
+
export { Direction, Grid, SerializableGrid, Sizing, createSerializedGrid, getRelativeLocation, isGridBranchNode, orthogonal, sanitizeGridNodeDescriptor };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { $ } from 'vscode/vscode/vs/base/browser/dom';
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
2
|
+
import { Orientation } from 'vscode/vscode/vs/base/browser/ui/sash/sash';
|
|
3
|
+
export { Orientation } from 'vscode/vscode/vs/base/browser/ui/sash/sash';
|
|
4
|
+
import { LayoutPriority, SplitView, Sizing } from 'vscode/vscode/vs/base/browser/ui/splitview/splitview';
|
|
5
|
+
export { LayoutPriority, Sizing } from 'vscode/vscode/vs/base/browser/ui/splitview/splitview';
|
|
4
6
|
import { equals, tail2 } from 'vscode/vscode/vs/base/common/arrays';
|
|
5
7
|
import { Color } from 'vscode/vscode/vs/base/common/color';
|
|
6
8
|
import { Emitter, Event, Relay } from 'vscode/vscode/vs/base/common/event';
|
|
@@ -8,13 +10,12 @@ import { DisposableStore, Disposable, toDisposable } from 'vscode/vscode/vs/base
|
|
|
8
10
|
import { rot } from 'vscode/vscode/vs/base/common/numbers';
|
|
9
11
|
import { isUndefined } from 'vscode/vscode/vs/base/common/types';
|
|
10
12
|
import './gridview.css.js';
|
|
11
|
-
import 'vscode/vscode/vs/base/browser/ui/sash/sash';
|
|
12
13
|
|
|
13
14
|
const defaultStyles = {
|
|
14
15
|
separatorBorder: Color.transparent
|
|
15
16
|
};
|
|
16
17
|
function orthogonal(orientation) {
|
|
17
|
-
return orientation ===
|
|
18
|
+
return orientation === Orientation.VERTICAL ? Orientation.HORIZONTAL : Orientation.VERTICAL;
|
|
18
19
|
}
|
|
19
20
|
class LayoutController {
|
|
20
21
|
constructor(isLayoutEnabled) {
|
|
@@ -22,7 +23,7 @@ class LayoutController {
|
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
25
|
function toAbsoluteBoundarySashes(sashes, orientation) {
|
|
25
|
-
if (orientation ===
|
|
26
|
+
if (orientation === Orientation.HORIZONTAL) {
|
|
26
27
|
return { left: sashes.start, right: sashes.end, top: sashes.orthogonalStart, bottom: sashes.orthogonalEnd };
|
|
27
28
|
}
|
|
28
29
|
else {
|
|
@@ -30,7 +31,7 @@ function toAbsoluteBoundarySashes(sashes, orientation) {
|
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
function fromAbsoluteBoundarySashes(sashes, orientation) {
|
|
33
|
-
if (orientation ===
|
|
34
|
+
if (orientation === Orientation.HORIZONTAL) {
|
|
34
35
|
return { start: sashes.left, end: sashes.right, orthogonalStart: sashes.top, orthogonalEnd: sashes.bottom };
|
|
35
36
|
}
|
|
36
37
|
else {
|
|
@@ -50,16 +51,16 @@ class BranchNode {
|
|
|
50
51
|
get absoluteOrthogonalOffset() { return this._absoluteOrthogonalOffset; }
|
|
51
52
|
get styles() { return this._styles; }
|
|
52
53
|
get width() {
|
|
53
|
-
return this.orientation ===
|
|
54
|
+
return this.orientation === Orientation.HORIZONTAL ? this.size : this.orthogonalSize;
|
|
54
55
|
}
|
|
55
56
|
get height() {
|
|
56
|
-
return this.orientation ===
|
|
57
|
+
return this.orientation === Orientation.HORIZONTAL ? this.orthogonalSize : this.size;
|
|
57
58
|
}
|
|
58
59
|
get top() {
|
|
59
|
-
return this.orientation ===
|
|
60
|
+
return this.orientation === Orientation.HORIZONTAL ? this._absoluteOffset : this._absoluteOrthogonalOffset;
|
|
60
61
|
}
|
|
61
62
|
get left() {
|
|
62
|
-
return this.orientation ===
|
|
63
|
+
return this.orientation === Orientation.HORIZONTAL ? this._absoluteOrthogonalOffset : this._absoluteOffset;
|
|
63
64
|
}
|
|
64
65
|
get minimumSize() {
|
|
65
66
|
return this.children.length === 0 ? 0 : Math.max(...( this.children.map(
|
|
@@ -73,18 +74,18 @@ class BranchNode {
|
|
|
73
74
|
}
|
|
74
75
|
get priority() {
|
|
75
76
|
if (this.children.length === 0) {
|
|
76
|
-
return
|
|
77
|
+
return LayoutPriority.Normal;
|
|
77
78
|
}
|
|
78
79
|
const priorities = ( this.children.map(
|
|
79
|
-
c => typeof c.priority === 'undefined' ?
|
|
80
|
+
c => typeof c.priority === 'undefined' ? LayoutPriority.Normal : c.priority
|
|
80
81
|
));
|
|
81
|
-
if (( priorities.some(p => p ===
|
|
82
|
-
return
|
|
82
|
+
if (( priorities.some(p => p === LayoutPriority.High))) {
|
|
83
|
+
return LayoutPriority.High;
|
|
83
84
|
}
|
|
84
|
-
else if (( priorities.some(p => p ===
|
|
85
|
-
return
|
|
85
|
+
else if (( priorities.some(p => p === LayoutPriority.Low))) {
|
|
86
|
+
return LayoutPriority.Low;
|
|
86
87
|
}
|
|
87
|
-
return
|
|
88
|
+
return LayoutPriority.Normal;
|
|
88
89
|
}
|
|
89
90
|
get proportionalLayout() {
|
|
90
91
|
if (this.children.length === 0) {
|
|
@@ -99,16 +100,16 @@ class BranchNode {
|
|
|
99
100
|
return this.splitview.maximumSize;
|
|
100
101
|
}
|
|
101
102
|
get minimumWidth() {
|
|
102
|
-
return this.orientation ===
|
|
103
|
+
return this.orientation === Orientation.HORIZONTAL ? this.minimumOrthogonalSize : this.minimumSize;
|
|
103
104
|
}
|
|
104
105
|
get minimumHeight() {
|
|
105
|
-
return this.orientation ===
|
|
106
|
+
return this.orientation === Orientation.HORIZONTAL ? this.minimumSize : this.minimumOrthogonalSize;
|
|
106
107
|
}
|
|
107
108
|
get maximumWidth() {
|
|
108
|
-
return this.orientation ===
|
|
109
|
+
return this.orientation === Orientation.HORIZONTAL ? this.maximumOrthogonalSize : this.maximumSize;
|
|
109
110
|
}
|
|
110
111
|
get maximumHeight() {
|
|
111
|
-
return this.orientation ===
|
|
112
|
+
return this.orientation === Orientation.HORIZONTAL ? this.maximumSize : this.maximumOrthogonalSize;
|
|
112
113
|
}
|
|
113
114
|
get boundarySashes() { return this._boundarySashes; }
|
|
114
115
|
set boundarySashes(boundarySashes) {
|
|
@@ -381,7 +382,7 @@ class BranchNode {
|
|
|
381
382
|
if (!(otherFirstChild instanceof LeafNode) || !(otherSecondChild instanceof LeafNode)) {
|
|
382
383
|
return Disposable.None;
|
|
383
384
|
}
|
|
384
|
-
if (this.orientation ===
|
|
385
|
+
if (this.orientation === Orientation.VERTICAL) {
|
|
385
386
|
secondChild.linkedWidthNode = otherFirstChild.linkedHeightNode = firstChild;
|
|
386
387
|
firstChild.linkedWidthNode = otherSecondChild.linkedHeightNode = secondChild;
|
|
387
388
|
otherSecondChild.linkedWidthNode = firstChild.linkedHeightNode = otherFirstChild;
|
|
@@ -473,22 +474,22 @@ class LeafNode {
|
|
|
473
474
|
const onDidChange = createLatchedOnDidChangeViewEvent(view);
|
|
474
475
|
this._onDidViewChange = ( Event.map(
|
|
475
476
|
onDidChange,
|
|
476
|
-
e => e && (this.orientation ===
|
|
477
|
+
e => e && (this.orientation === Orientation.VERTICAL ? e.width : e.height),
|
|
477
478
|
this.disposables
|
|
478
479
|
));
|
|
479
480
|
this.onDidChange = Event.any(this._onDidViewChange, this._onDidSetLinkedNode.event, this._onDidLinkedWidthNodeChange.event, this._onDidLinkedHeightNodeChange.event);
|
|
480
481
|
}
|
|
481
482
|
get width() {
|
|
482
|
-
return this.orientation ===
|
|
483
|
+
return this.orientation === Orientation.HORIZONTAL ? this.orthogonalSize : this.size;
|
|
483
484
|
}
|
|
484
485
|
get height() {
|
|
485
|
-
return this.orientation ===
|
|
486
|
+
return this.orientation === Orientation.HORIZONTAL ? this.size : this.orthogonalSize;
|
|
486
487
|
}
|
|
487
488
|
get top() {
|
|
488
|
-
return this.orientation ===
|
|
489
|
+
return this.orientation === Orientation.HORIZONTAL ? this.absoluteOffset : this.absoluteOrthogonalOffset;
|
|
489
490
|
}
|
|
490
491
|
get left() {
|
|
491
|
-
return this.orientation ===
|
|
492
|
+
return this.orientation === Orientation.HORIZONTAL ? this.absoluteOrthogonalOffset : this.absoluteOffset;
|
|
492
493
|
}
|
|
493
494
|
get element() {
|
|
494
495
|
return this.view.element;
|
|
@@ -506,10 +507,10 @@ class LeafNode {
|
|
|
506
507
|
return this.linkedHeightNode ? Math.min(this.linkedHeightNode.view.maximumHeight, this.view.maximumHeight) : this.view.maximumHeight;
|
|
507
508
|
}
|
|
508
509
|
get minimumSize() {
|
|
509
|
-
return this.orientation ===
|
|
510
|
+
return this.orientation === Orientation.HORIZONTAL ? this.minimumHeight : this.minimumWidth;
|
|
510
511
|
}
|
|
511
512
|
get maximumSize() {
|
|
512
|
-
return this.orientation ===
|
|
513
|
+
return this.orientation === Orientation.HORIZONTAL ? this.maximumHeight : this.maximumWidth;
|
|
513
514
|
}
|
|
514
515
|
get priority() {
|
|
515
516
|
return this.view.priority;
|
|
@@ -521,10 +522,10 @@ class LeafNode {
|
|
|
521
522
|
return this.view.snap;
|
|
522
523
|
}
|
|
523
524
|
get minimumOrthogonalSize() {
|
|
524
|
-
return this.orientation ===
|
|
525
|
+
return this.orientation === Orientation.HORIZONTAL ? this.minimumWidth : this.minimumHeight;
|
|
525
526
|
}
|
|
526
527
|
get maximumOrthogonalSize() {
|
|
527
|
-
return this.orientation ===
|
|
528
|
+
return this.orientation === Orientation.HORIZONTAL ? this.maximumWidth : this.maximumHeight;
|
|
528
529
|
}
|
|
529
530
|
get boundarySashes() { return this._boundarySashes; }
|
|
530
531
|
set boundarySashes(boundarySashes) {
|
|
@@ -652,7 +653,7 @@ class GridView {
|
|
|
652
653
|
this.proportionalLayout = typeof options.proportionalLayout !== 'undefined' ? !!options.proportionalLayout : true;
|
|
653
654
|
this.layoutController = ( new LayoutController(false));
|
|
654
655
|
this.root = ( new BranchNode(
|
|
655
|
-
|
|
656
|
+
Orientation.VERTICAL,
|
|
656
657
|
this.layoutController,
|
|
657
658
|
this.styles,
|
|
658
659
|
this.proportionalLayout
|
|
@@ -664,7 +665,7 @@ class GridView {
|
|
|
664
665
|
}
|
|
665
666
|
layout(width, height, top = 0, left = 0) {
|
|
666
667
|
this.layoutController.isLayoutEnabled = true;
|
|
667
|
-
const [size, orthogonalSize, offset, orthogonalOffset] = this.root.orientation ===
|
|
668
|
+
const [size, orthogonalSize, offset, orthogonalOffset] = this.root.orientation === Orientation.HORIZONTAL ? [height, width, top, left] : [width, height, left, top];
|
|
668
669
|
this.root.layout(size, 0, { orthogonalSize, absoluteOffset: offset, absoluteOrthogonalOffset: orthogonalOffset, absoluteSize: size, absoluteOrthogonalSize: orthogonalSize });
|
|
669
670
|
}
|
|
670
671
|
addView(view, size, location) {
|
|
@@ -845,7 +846,7 @@ class GridView {
|
|
|
845
846
|
if (!size.width && !size.height) {
|
|
846
847
|
return;
|
|
847
848
|
}
|
|
848
|
-
const [parentSize, grandParentSize] = parent.orientation ===
|
|
849
|
+
const [parentSize, grandParentSize] = parent.orientation === Orientation.HORIZONTAL ? [size.width, size.height] : [size.height, size.width];
|
|
849
850
|
if (typeof grandParentSize === 'number' && pathToParent.length > 0) {
|
|
850
851
|
const [, grandParent] = tail2(pathToParent);
|
|
851
852
|
const [, parentIndex] = tail2(rest);
|
|
@@ -9,10 +9,10 @@ import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/c
|
|
|
9
9
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
10
10
|
import { ThemeIcon } from 'vscode/vscode/vs/base/common/themables';
|
|
11
11
|
import { Extensions as Extensions$1 } from 'vscode/vscode/vs/workbench/browser/panecomposite';
|
|
12
|
-
import {
|
|
12
|
+
import { TreeViewPane, CustomTreeView } from 'vscode/vscode/vs/workbench/browser/parts/views/treeView';
|
|
13
13
|
import { ViewPaneContainer } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPaneContainer';
|
|
14
|
-
import { registerWorkbenchContribution2 } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
15
|
-
import { Extensions,
|
|
14
|
+
import { registerWorkbenchContribution2, WorkbenchPhase } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
15
|
+
import { Extensions, ViewContainerLocation } from 'vscode/vscode/vs/workbench/common/views';
|
|
16
16
|
import { VIEWLET_ID as VIEWLET_ID$3 } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
17
17
|
import { VIEWLET_ID as VIEWLET_ID$1 } from 'vscode/vscode/vs/workbench/contrib/files/common/files';
|
|
18
18
|
import { VIEWLET_ID } from 'vscode/vscode/vs/workbench/contrib/remote/browser/remoteExplorer';
|
|
@@ -20,14 +20,6 @@ import { VIEWLET_ID as VIEWLET_ID$2 } from 'vscode/vscode/vs/workbench/contrib/s
|
|
|
20
20
|
import { WebviewViewPane } from '../../contrib/webviewView/browser/webviewViewPane.js';
|
|
21
21
|
import { isProposedApiEnabled } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
|
|
22
22
|
import { ExtensionsRegistry } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionsRegistry';
|
|
23
|
-
import { KeybindingsRegistry } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
24
|
-
import { KeyChord } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
25
|
-
import { WorkbenchListFocusContextKey } from 'vscode/vscode/vs/platform/list/browser/listService';
|
|
26
|
-
import { IListService } from 'vscode/vscode/vs/platform/list/browser/listService.service';
|
|
27
|
-
import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover.service';
|
|
28
|
-
import { CancellationTokenSource } from 'vscode/vscode/vs/base/common/cancellation';
|
|
29
|
-
import { AsyncDataTree } from 'vscode/vscode/vs/base/browser/ui/tree/asyncDataTree';
|
|
30
|
-
import { ITreeViewsService } from 'vscode/vscode/vs/workbench/services/views/browser/treeViewsService.service';
|
|
31
23
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
32
24
|
import { Extensions as Extensions$2 } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionFeatures';
|
|
33
25
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
@@ -193,7 +185,7 @@ const viewDescriptor = {
|
|
|
193
185
|
markdownDescription: ( localizeWithPath(
|
|
194
186
|
_moduleId,
|
|
195
187
|
19,
|
|
196
|
-
"When the accessibility help dialog is invoked in this view, this content will be presented to the user as a markdown string. Keybindings will be resolved when provided in the format of <keybinding:commandId>. If there is no keybinding, that will be indicated
|
|
188
|
+
"When the accessibility help dialog is invoked in this view, this content will be presented to the user as a markdown string. Keybindings will be resolved when provided in the format of <keybinding:commandId>. If there is no keybinding, that will be indicated and this command will be included in a quickpick for easy configuration."
|
|
197
189
|
))
|
|
198
190
|
}
|
|
199
191
|
}
|
|
@@ -311,49 +303,6 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
311
303
|
this.viewsRegistry = ( (Registry.as(Extensions.ViewsRegistry)));
|
|
312
304
|
this.handleAndRegisterCustomViewContainers();
|
|
313
305
|
this.handleAndRegisterCustomViews();
|
|
314
|
-
let showTreeHoverCancellation = ( (new CancellationTokenSource()));
|
|
315
|
-
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
316
|
-
id: 'workbench.action.showTreeHover',
|
|
317
|
-
handler: async (accessor, ...args) => {
|
|
318
|
-
showTreeHoverCancellation.cancel();
|
|
319
|
-
showTreeHoverCancellation = ( (new CancellationTokenSource()));
|
|
320
|
-
const listService = accessor.get(IListService);
|
|
321
|
-
const treeViewsService = accessor.get(ITreeViewsService);
|
|
322
|
-
const hoverService = accessor.get(IHoverService);
|
|
323
|
-
const lastFocusedList = listService.lastFocusedList;
|
|
324
|
-
if (!(lastFocusedList instanceof AsyncDataTree)) {
|
|
325
|
-
return;
|
|
326
|
-
}
|
|
327
|
-
const focus = lastFocusedList.getFocus();
|
|
328
|
-
if (!focus || (focus.length === 0)) {
|
|
329
|
-
return;
|
|
330
|
-
}
|
|
331
|
-
const treeItem = focus[0];
|
|
332
|
-
if (treeItem instanceof ResolvableTreeItem) {
|
|
333
|
-
await treeItem.resolve(showTreeHoverCancellation.token);
|
|
334
|
-
}
|
|
335
|
-
if (!treeItem.tooltip) {
|
|
336
|
-
return;
|
|
337
|
-
}
|
|
338
|
-
const element = treeViewsService.getRenderedTreeElement(('handle' in treeItem) ? treeItem.handle : treeItem);
|
|
339
|
-
if (!element) {
|
|
340
|
-
return;
|
|
341
|
-
}
|
|
342
|
-
hoverService.showHover({
|
|
343
|
-
content: treeItem.tooltip,
|
|
344
|
-
target: element,
|
|
345
|
-
position: {
|
|
346
|
-
hoverPosition: 2 ,
|
|
347
|
-
},
|
|
348
|
-
persistence: {
|
|
349
|
-
hideOnHover: false
|
|
350
|
-
}
|
|
351
|
-
}, true);
|
|
352
|
-
},
|
|
353
|
-
weight: 200 ,
|
|
354
|
-
primary: KeyChord(2048 | 41 , 2048 | 39 ),
|
|
355
|
-
when: ( (ContextKeyExpr.and(RawCustomTreeViewContextKey, WorkbenchListFocusContextKey)))
|
|
356
|
-
});
|
|
357
306
|
}
|
|
358
307
|
handleAndRegisterCustomViewContainers() {
|
|
359
308
|
viewsContainersExtensionPoint.setHandler((extensions, { added, removed }) => {
|
|
@@ -367,8 +316,8 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
367
316
|
}
|
|
368
317
|
addCustomViewContainers(extensionPoints, existingViewContainers) {
|
|
369
318
|
const viewContainersRegistry = ( (Registry.as(Extensions.ViewContainersRegistry)));
|
|
370
|
-
let activityBarOrder = CUSTOM_VIEWS_START_ORDER + viewContainersRegistry.all.filter(v => !!v.extensionId && viewContainersRegistry.getViewContainerLocation(v) ===
|
|
371
|
-
let panelOrder = 5 + viewContainersRegistry.all.filter(v => !!v.extensionId && viewContainersRegistry.getViewContainerLocation(v) ===
|
|
319
|
+
let activityBarOrder = CUSTOM_VIEWS_START_ORDER + viewContainersRegistry.all.filter(v => !!v.extensionId && viewContainersRegistry.getViewContainerLocation(v) === ViewContainerLocation.Sidebar).length;
|
|
320
|
+
let panelOrder = 5 + viewContainersRegistry.all.filter(v => !!v.extensionId && viewContainersRegistry.getViewContainerLocation(v) === ViewContainerLocation.Panel).length + 1;
|
|
372
321
|
for (const { value, collector, description } of extensionPoints) {
|
|
373
322
|
Object.entries(value).forEach(([key, value]) => {
|
|
374
323
|
if (!this.isValidViewsContainer(value, collector)) {
|
|
@@ -376,10 +325,10 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
376
325
|
}
|
|
377
326
|
switch (key) {
|
|
378
327
|
case 'activitybar':
|
|
379
|
-
activityBarOrder = this.registerCustomViewContainers(value, description, activityBarOrder, existingViewContainers,
|
|
328
|
+
activityBarOrder = this.registerCustomViewContainers(value, description, activityBarOrder, existingViewContainers, ViewContainerLocation.Sidebar);
|
|
380
329
|
break;
|
|
381
330
|
case 'panel':
|
|
382
|
-
panelOrder = this.registerCustomViewContainers(value, description, panelOrder, existingViewContainers,
|
|
331
|
+
panelOrder = this.registerCustomViewContainers(value, description, panelOrder, existingViewContainers, ViewContainerLocation.Panel);
|
|
383
332
|
break;
|
|
384
333
|
}
|
|
385
334
|
});
|
|
@@ -823,6 +772,6 @@ class ViewsDataRenderer extends Disposable {
|
|
|
823
772
|
},
|
|
824
773
|
renderer: ( (new SyncDescriptor(ViewsDataRenderer))),
|
|
825
774
|
});
|
|
826
|
-
registerWorkbenchContribution2(ViewsExtensionHandler.ID, ViewsExtensionHandler,
|
|
775
|
+
registerWorkbenchContribution2(ViewsExtensionHandler.ID, ViewsExtensionHandler, WorkbenchPhase.BlockStartup);
|
|
827
776
|
|
|
828
777
|
export { viewsContainersContribution };
|