@codingame/monaco-vscode-view-common-service-override 4.5.1 → 5.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 +3 -6
- package/vscode/src/vs/base/browser/ui/grid/grid.js +12 -12
- package/vscode/src/vs/base/browser/ui/grid/gridview.js +26 -26
- package/vscode/src/vs/platform/languagePacks/common/localizedStrings.js +4 -3
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +142 -221
- package/vscode/src/vs/workbench/browser/actions/listCommands.js +49 -45
- package/vscode/src/vs/workbench/browser/actions/navigationActions.js +7 -30
- package/vscode/src/vs/workbench/browser/media/style.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +67 -138
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +25 -38
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/media/auxiliaryBarPart.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/compositeBar.js +26 -27
- package/vscode/src/vs/workbench/browser/parts/compositePart.js +20 -34
- package/vscode/src/vs/workbench/browser/parts/editor/auxiliaryEditorPart.js +7 -4
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +216 -765
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +27 -42
- package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +24 -23
- package/vscode/src/vs/workbench/browser/parts/editor/editorPart.js +54 -19
- package/vscode/src/vs/workbench/browser/parts/editor/editorParts.js +122 -72
- package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.js +51 -54
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +44 -44
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +25 -26
- package/vscode/src/vs/workbench/browser/parts/sidebar/media/sidebarpart.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarActions.js +2 -5
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +22 -22
- package/vscode/src/vs/workbench/browser/window.js +41 -92
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +41 -78
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +23 -46
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +36 -27
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +14 -15
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +10 -11
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +25 -52
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +59 -88
- package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +18 -48
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +61 -150
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.js +15 -70
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +9 -20
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.js +14 -65
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/conflictActions.js +39 -113
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editorGutter.js +1 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +13 -19
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.js +1 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +35 -75
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +16 -37
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +41 -43
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.js +6 -5
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +13 -11
- package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +24 -61
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js +7 -6
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +37 -70
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +23 -46
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +26 -27
- package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.js +2 -2
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +50 -52
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindWidget.js +5 -3
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +18 -34
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +7 -10
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +13 -11
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewService.js +2 -2
- package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +79 -49
- package/vscode/src/vs/workbench/services/driver/browser/driver.js +9 -7
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +45 -68
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +95 -98
- package/vscode/src/vs/workbench/services/progress/browser/progressService.js +34 -74
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +69 -67
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +52 -47
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-view-common-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.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@5.0.0",
|
|
30
|
+
"@codingame/monaco-vscode-bulk-edit-service-override": "5.0.0"
|
|
31
31
|
}
|
|
32
32
|
}
|
package/viewCommon.js
CHANGED
|
@@ -33,10 +33,8 @@ import { BrowserAuxiliaryWindowService } from './vscode/src/vs/workbench/service
|
|
|
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';
|
|
36
|
-
import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover.service';
|
|
37
36
|
import { IEditorPaneService } from 'vscode/vscode/vs/workbench/services/editor/common/editorPaneService.service';
|
|
38
37
|
import { EditorPaneService } from './vscode/src/vs/workbench/services/editor/browser/editorPaneService.js';
|
|
39
|
-
import { HoverService } from 'vscode/vscode/vs/editor/browser/services/hoverService/hoverService';
|
|
40
38
|
import { CustomEditorLabelService } from 'vscode/vscode/vs/workbench/services/editor/common/customEditorLabelService';
|
|
41
39
|
import { ICustomEditorLabelService } from 'vscode/vscode/vs/workbench/services/editor/common/customEditorLabelService.service';
|
|
42
40
|
import getServiceOverride$1 from '@codingame/monaco-vscode-bulk-edit-service-override';
|
|
@@ -58,9 +56,9 @@ import 'vscode/vscode/vs/workbench/contrib/webview/browser/webview.contribution'
|
|
|
58
56
|
import './vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js';
|
|
59
57
|
import './vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js';
|
|
60
58
|
import './vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js';
|
|
61
|
-
import 'vscode/vscode/vs/workbench/browser/parts/editor/editor.
|
|
62
|
-
import 'vscode/vscode/vs/workbench/contrib/files/browser/files.
|
|
63
|
-
import 'vscode/vscode/vs/workbench/contrib/files/browser/fileCommands.
|
|
59
|
+
import 'vscode/vscode/vs/workbench/browser/parts/editor/editor.contribution._autosave';
|
|
60
|
+
import 'vscode/vscode/vs/workbench/contrib/files/browser/files.contribution._editorPane';
|
|
61
|
+
import 'vscode/vscode/vs/workbench/contrib/files/browser/fileCommands._save';
|
|
64
62
|
import './vscode/src/vs/workbench/browser/actions/navigationActions.js';
|
|
65
63
|
import './vscode/src/vs/workbench/browser/style.js';
|
|
66
64
|
import './tools/editorAssets.js';
|
|
@@ -83,7 +81,6 @@ function getServiceOverride(_webviewIframeAlternateDomains) {
|
|
|
83
81
|
[( IViewDescriptorService.toString())]: new SyncDescriptor(ViewDescriptorService, [], true),
|
|
84
82
|
[( IActivityService.toString())]: new SyncDescriptor(ActivityService, [], true),
|
|
85
83
|
[( IPaneCompositePartService.toString())]: new SyncDescriptor(PaneCompositePartService, [], true),
|
|
86
|
-
[( IHoverService.toString())]: new SyncDescriptor(HoverService, [], true),
|
|
87
84
|
[( ICodeEditorService.toString())]: new SyncDescriptor(CodeEditorService, [], true),
|
|
88
85
|
[( ITextEditorService.toString())]: new SyncDescriptor(TextEditorService, [], false),
|
|
89
86
|
[( IEditorResolverService.toString())]: new SyncDescriptor(EditorResolverService, [], false),
|
|
@@ -20,7 +20,7 @@ function getGridNode(node, location) {
|
|
|
20
20
|
return node;
|
|
21
21
|
}
|
|
22
22
|
if (!isGridBranchNode(node)) {
|
|
23
|
-
throw new Error('Invalid location');
|
|
23
|
+
throw ( new Error('Invalid location'));
|
|
24
24
|
}
|
|
25
25
|
const [index, ...rest] = location;
|
|
26
26
|
return getGridNode(node.children[index], rest);
|
|
@@ -82,7 +82,7 @@ function getRelativeLocation(rootOrientation, location, direction) {
|
|
|
82
82
|
function indexInParent(element) {
|
|
83
83
|
const parentElement = element.parentElement;
|
|
84
84
|
if (!parentElement) {
|
|
85
|
-
throw new Error('Invalid grid element');
|
|
85
|
+
throw ( new Error('Invalid grid element'));
|
|
86
86
|
}
|
|
87
87
|
let el = parentElement.firstElementChild;
|
|
88
88
|
let index = 0;
|
|
@@ -95,7 +95,7 @@ function indexInParent(element) {
|
|
|
95
95
|
function getGridLocation(element) {
|
|
96
96
|
const parentElement = element.parentElement;
|
|
97
97
|
if (!parentElement) {
|
|
98
|
-
throw new Error('Invalid grid element');
|
|
98
|
+
throw ( new Error('Invalid grid element'));
|
|
99
99
|
}
|
|
100
100
|
if (/\bmonaco-grid-view\b/.test(parentElement.className)) {
|
|
101
101
|
return [];
|
|
@@ -154,7 +154,7 @@ class Grid extends Disposable {
|
|
|
154
154
|
}
|
|
155
155
|
addView(newView, size, referenceView, direction) {
|
|
156
156
|
if (( this.views.has(newView))) {
|
|
157
|
-
throw new Error('Can\'t add same view twice');
|
|
157
|
+
throw ( new Error('Can\'t add same view twice'));
|
|
158
158
|
}
|
|
159
159
|
const orientation = getDirectionOrientation(direction);
|
|
160
160
|
if (this.views.size === 1 && this.orientation !== orientation) {
|
|
@@ -184,7 +184,7 @@ class Grid extends Disposable {
|
|
|
184
184
|
}
|
|
185
185
|
addViewAt(newView, size, location) {
|
|
186
186
|
if (( this.views.has(newView))) {
|
|
187
|
-
throw new Error('Can\'t add same view twice');
|
|
187
|
+
throw ( new Error('Can\'t add same view twice'));
|
|
188
188
|
}
|
|
189
189
|
let viewSize;
|
|
190
190
|
if (typeof size === 'number') {
|
|
@@ -204,7 +204,7 @@ class Grid extends Disposable {
|
|
|
204
204
|
}
|
|
205
205
|
removeView(view, sizing) {
|
|
206
206
|
if (this.views.size === 1) {
|
|
207
|
-
throw new Error('Can\'t remove last view');
|
|
207
|
+
throw ( new Error('Can\'t remove last view'));
|
|
208
208
|
}
|
|
209
209
|
const location = this.getViewLocation(view);
|
|
210
210
|
let gridViewSizing;
|
|
@@ -283,7 +283,7 @@ class Grid extends Disposable {
|
|
|
283
283
|
}
|
|
284
284
|
maximizeView(view) {
|
|
285
285
|
if (this.views.size < 2) {
|
|
286
|
-
throw new Error('At least two views are required to maximize a view');
|
|
286
|
+
throw ( new Error('At least two views are required to maximize a view'));
|
|
287
287
|
}
|
|
288
288
|
const location = this.getViewLocation(view);
|
|
289
289
|
this.gridview.maximizeView(location);
|
|
@@ -311,7 +311,7 @@ class Grid extends Disposable {
|
|
|
311
311
|
}
|
|
312
312
|
getNeighborViews(view, direction, wrap = false) {
|
|
313
313
|
if (!this.didLayout) {
|
|
314
|
-
throw new Error('Can\'t call getNeighborViews before first layout');
|
|
314
|
+
throw ( new Error('Can\'t call getNeighborViews before first layout'));
|
|
315
315
|
}
|
|
316
316
|
const location = this.getViewLocation(view);
|
|
317
317
|
const root = this.getViews();
|
|
@@ -337,7 +337,7 @@ class Grid extends Disposable {
|
|
|
337
337
|
getViewLocation(view) {
|
|
338
338
|
const element = this.views.get(view);
|
|
339
339
|
if (!element) {
|
|
340
|
-
throw new Error('View not found');
|
|
340
|
+
throw ( new Error('View not found'));
|
|
341
341
|
}
|
|
342
342
|
return getGridLocation(element);
|
|
343
343
|
}
|
|
@@ -392,13 +392,13 @@ class SerializableGrid extends Grid {
|
|
|
392
392
|
}
|
|
393
393
|
static deserialize(json, deserializer, options = {}) {
|
|
394
394
|
if (typeof json.orientation !== 'number') {
|
|
395
|
-
throw new Error('Invalid JSON: \'orientation\' property must be a number.');
|
|
395
|
+
throw ( new Error('Invalid JSON: \'orientation\' property must be a number.'));
|
|
396
396
|
}
|
|
397
397
|
else if (typeof json.width !== 'number') {
|
|
398
|
-
throw new Error('Invalid JSON: \'width\' property must be a number.');
|
|
398
|
+
throw ( new Error('Invalid JSON: \'width\' property must be a number.'));
|
|
399
399
|
}
|
|
400
400
|
else if (typeof json.height !== 'number') {
|
|
401
|
-
throw new Error('Invalid JSON: \'height\' property must be a number.');
|
|
401
|
+
throw ( new Error('Invalid JSON: \'height\' property must be a number.'));
|
|
402
402
|
}
|
|
403
403
|
const gridview = GridView.deserialize(json, deserializer, options);
|
|
404
404
|
const result = ( new SerializableGrid(gridview, options));
|
|
@@ -39,7 +39,7 @@ function fromAbsoluteBoundarySashes(sashes, orientation) {
|
|
|
39
39
|
}
|
|
40
40
|
function validateIndex(index, numChildren) {
|
|
41
41
|
if (Math.abs(index) > numChildren) {
|
|
42
|
-
throw new Error('Invalid index');
|
|
42
|
+
throw ( new Error('Invalid index'));
|
|
43
43
|
}
|
|
44
44
|
return rot(index, numChildren + 1);
|
|
45
45
|
}
|
|
@@ -223,7 +223,7 @@ class BranchNode {
|
|
|
223
223
|
return;
|
|
224
224
|
}
|
|
225
225
|
if (typeof ctx === 'undefined') {
|
|
226
|
-
throw new Error('Invalid state');
|
|
226
|
+
throw ( new Error('Invalid state'));
|
|
227
227
|
}
|
|
228
228
|
this._size = ctx.orthogonalSize;
|
|
229
229
|
this._orthogonalSize = size;
|
|
@@ -536,7 +536,7 @@ class LeafNode {
|
|
|
536
536
|
return;
|
|
537
537
|
}
|
|
538
538
|
if (typeof ctx === 'undefined') {
|
|
539
|
-
throw new Error('Invalid state');
|
|
539
|
+
throw ( new Error('Invalid state'));
|
|
540
540
|
}
|
|
541
541
|
this._size = size;
|
|
542
542
|
this._orthogonalSize = ctx.orthogonalSize;
|
|
@@ -729,16 +729,16 @@ class GridView {
|
|
|
729
729
|
const [rest, index] = tail2(location);
|
|
730
730
|
const [pathToParent, parent] = this.getNode(rest);
|
|
731
731
|
if (!(parent instanceof BranchNode)) {
|
|
732
|
-
throw new Error('Invalid location');
|
|
732
|
+
throw ( new Error('Invalid location'));
|
|
733
733
|
}
|
|
734
734
|
const node = parent.children[index];
|
|
735
735
|
if (!(node instanceof LeafNode)) {
|
|
736
|
-
throw new Error('Invalid location');
|
|
736
|
+
throw ( new Error('Invalid location'));
|
|
737
737
|
}
|
|
738
738
|
parent.removeChild(index, sizing);
|
|
739
739
|
node.dispose();
|
|
740
740
|
if (parent.children.length === 0) {
|
|
741
|
-
throw new Error('Invalid grid state');
|
|
741
|
+
throw ( new Error('Invalid grid state'));
|
|
742
742
|
}
|
|
743
743
|
if (parent.children.length > 1) {
|
|
744
744
|
this.trySet2x2();
|
|
@@ -793,7 +793,7 @@ class GridView {
|
|
|
793
793
|
}
|
|
794
794
|
const [, parent] = this.getNode(parentLocation);
|
|
795
795
|
if (!(parent instanceof BranchNode)) {
|
|
796
|
-
throw new Error('Invalid location');
|
|
796
|
+
throw ( new Error('Invalid location'));
|
|
797
797
|
}
|
|
798
798
|
parent.moveChild(from, to);
|
|
799
799
|
this.trySet2x2();
|
|
@@ -805,22 +805,22 @@ class GridView {
|
|
|
805
805
|
const [fromRest, fromIndex] = tail2(from);
|
|
806
806
|
const [, fromParent] = this.getNode(fromRest);
|
|
807
807
|
if (!(fromParent instanceof BranchNode)) {
|
|
808
|
-
throw new Error('Invalid from location');
|
|
808
|
+
throw ( new Error('Invalid from location'));
|
|
809
809
|
}
|
|
810
810
|
const fromSize = fromParent.getChildSize(fromIndex);
|
|
811
811
|
const fromNode = fromParent.children[fromIndex];
|
|
812
812
|
if (!(fromNode instanceof LeafNode)) {
|
|
813
|
-
throw new Error('Invalid from location');
|
|
813
|
+
throw ( new Error('Invalid from location'));
|
|
814
814
|
}
|
|
815
815
|
const [toRest, toIndex] = tail2(to);
|
|
816
816
|
const [, toParent] = this.getNode(toRest);
|
|
817
817
|
if (!(toParent instanceof BranchNode)) {
|
|
818
|
-
throw new Error('Invalid to location');
|
|
818
|
+
throw ( new Error('Invalid to location'));
|
|
819
819
|
}
|
|
820
820
|
const toSize = toParent.getChildSize(toIndex);
|
|
821
821
|
const toNode = toParent.children[toIndex];
|
|
822
822
|
if (!(toNode instanceof LeafNode)) {
|
|
823
|
-
throw new Error('Invalid to location');
|
|
823
|
+
throw ( new Error('Invalid to location'));
|
|
824
824
|
}
|
|
825
825
|
if (fromParent === toParent) {
|
|
826
826
|
fromParent.swapChildren(fromIndex, toIndex);
|
|
@@ -840,7 +840,7 @@ class GridView {
|
|
|
840
840
|
const [rest, index] = tail2(location);
|
|
841
841
|
const [pathToParent, parent] = this.getNode(rest);
|
|
842
842
|
if (!(parent instanceof BranchNode)) {
|
|
843
|
-
throw new Error('Invalid location');
|
|
843
|
+
throw ( new Error('Invalid location'));
|
|
844
844
|
}
|
|
845
845
|
if (!size.width && !size.height) {
|
|
846
846
|
return;
|
|
@@ -867,7 +867,7 @@ class GridView {
|
|
|
867
867
|
const [rest, index] = tail2(location);
|
|
868
868
|
const [, parent] = this.getNode(rest);
|
|
869
869
|
if (!(parent instanceof BranchNode)) {
|
|
870
|
-
throw new Error('Invalid location');
|
|
870
|
+
throw ( new Error('Invalid location'));
|
|
871
871
|
}
|
|
872
872
|
return parent.getChildCachedVisibleSize(index);
|
|
873
873
|
}
|
|
@@ -877,7 +877,7 @@ class GridView {
|
|
|
877
877
|
}
|
|
878
878
|
const [ancestors, node] = this.getNode(location);
|
|
879
879
|
if (!(node instanceof LeafNode)) {
|
|
880
|
-
throw new Error('Invalid location');
|
|
880
|
+
throw ( new Error('Invalid location'));
|
|
881
881
|
}
|
|
882
882
|
for (let i = 0; i < ancestors.length; i++) {
|
|
883
883
|
ancestors[i].resizeChild(location[i], Number.POSITIVE_INFINITY);
|
|
@@ -889,7 +889,7 @@ class GridView {
|
|
|
889
889
|
}
|
|
890
890
|
const [ancestors, node] = this.getNode(location);
|
|
891
891
|
if (!(node instanceof LeafNode)) {
|
|
892
|
-
throw new Error('Invalid location');
|
|
892
|
+
throw ( new Error('Invalid location'));
|
|
893
893
|
}
|
|
894
894
|
for (let i = 0; i < ancestors.length; i++) {
|
|
895
895
|
if (!ancestors[i].isChildExpanded(location[i])) {
|
|
@@ -901,7 +901,7 @@ class GridView {
|
|
|
901
901
|
maximizeView(location) {
|
|
902
902
|
const [, nodeToMaximize] = this.getNode(location);
|
|
903
903
|
if (!(nodeToMaximize instanceof LeafNode)) {
|
|
904
|
-
throw new Error('Location is not a LeafNode');
|
|
904
|
+
throw ( new Error('Location is not a LeafNode'));
|
|
905
905
|
}
|
|
906
906
|
if (this.maximizedNode === nodeToMaximize) {
|
|
907
907
|
return;
|
|
@@ -951,7 +951,7 @@ class GridView {
|
|
|
951
951
|
isViewMaximized(location) {
|
|
952
952
|
const [, node] = this.getNode(location);
|
|
953
953
|
if (!(node instanceof LeafNode)) {
|
|
954
|
-
throw new Error('Location is not a LeafNode');
|
|
954
|
+
throw ( new Error('Location is not a LeafNode'));
|
|
955
955
|
}
|
|
956
956
|
return node === this.maximizedNode;
|
|
957
957
|
}
|
|
@@ -965,7 +965,7 @@ class GridView {
|
|
|
965
965
|
}
|
|
966
966
|
const [, node] = this.getNode(location);
|
|
967
967
|
if (!(node instanceof BranchNode)) {
|
|
968
|
-
throw new Error('Invalid location');
|
|
968
|
+
throw ( new Error('Invalid location'));
|
|
969
969
|
}
|
|
970
970
|
node.distributeViewSizes();
|
|
971
971
|
this.trySet2x2();
|
|
@@ -974,7 +974,7 @@ class GridView {
|
|
|
974
974
|
const [rest, index] = tail2(location);
|
|
975
975
|
const [, parent] = this.getNode(rest);
|
|
976
976
|
if (!(parent instanceof BranchNode)) {
|
|
977
|
-
throw new Error('Invalid from location');
|
|
977
|
+
throw ( new Error('Invalid from location'));
|
|
978
978
|
}
|
|
979
979
|
return parent.isChildVisible(index);
|
|
980
980
|
}
|
|
@@ -986,7 +986,7 @@ class GridView {
|
|
|
986
986
|
const [rest, index] = tail2(location);
|
|
987
987
|
const [, parent] = this.getNode(rest);
|
|
988
988
|
if (!(parent instanceof BranchNode)) {
|
|
989
|
-
throw new Error('Invalid from location');
|
|
989
|
+
throw ( new Error('Invalid from location'));
|
|
990
990
|
}
|
|
991
991
|
parent.setChildVisible(index, visible);
|
|
992
992
|
}
|
|
@@ -996,16 +996,16 @@ class GridView {
|
|
|
996
996
|
}
|
|
997
997
|
static deserialize(json, deserializer, options = {}) {
|
|
998
998
|
if (typeof json.orientation !== 'number') {
|
|
999
|
-
throw new Error('Invalid JSON: \'orientation\' property must be a number.');
|
|
999
|
+
throw ( new Error('Invalid JSON: \'orientation\' property must be a number.'));
|
|
1000
1000
|
}
|
|
1001
1001
|
else if (typeof json.width !== 'number') {
|
|
1002
|
-
throw new Error('Invalid JSON: \'width\' property must be a number.');
|
|
1002
|
+
throw ( new Error('Invalid JSON: \'width\' property must be a number.'));
|
|
1003
1003
|
}
|
|
1004
1004
|
else if (typeof json.height !== 'number') {
|
|
1005
|
-
throw new Error('Invalid JSON: \'height\' property must be a number.');
|
|
1005
|
+
throw ( new Error('Invalid JSON: \'height\' property must be a number.'));
|
|
1006
1006
|
}
|
|
1007
1007
|
else if (json.root?.type !== 'branch') {
|
|
1008
|
-
throw new Error('Invalid JSON: \'root\' property must have \'type\' value of branch.');
|
|
1008
|
+
throw ( new Error('Invalid JSON: \'root\' property must have \'type\' value of branch.'));
|
|
1009
1009
|
}
|
|
1010
1010
|
const orientation = json.orientation;
|
|
1011
1011
|
const height = json.height;
|
|
@@ -1070,11 +1070,11 @@ class GridView {
|
|
|
1070
1070
|
return [path, node];
|
|
1071
1071
|
}
|
|
1072
1072
|
if (!(node instanceof BranchNode)) {
|
|
1073
|
-
throw new Error('Invalid location');
|
|
1073
|
+
throw ( new Error('Invalid location'));
|
|
1074
1074
|
}
|
|
1075
1075
|
const [index, ...rest] = location;
|
|
1076
1076
|
if (index < 0 || index >= node.children.length) {
|
|
1077
|
-
throw new Error('Invalid location');
|
|
1077
|
+
throw ( new Error('Invalid location'));
|
|
1078
1078
|
}
|
|
1079
1079
|
const child = node.children[index];
|
|
1080
1080
|
path.push(node);
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
2
2
|
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
3
|
+
const _moduleId = "vs/platform/languagePacks/common/localizedStrings";
|
|
4
|
+
const open = ( localizeWithPath(_moduleId, 0, 'open'));
|
|
5
|
+
const close = ( localizeWithPath(_moduleId, 1, 'close'));
|
|
6
|
+
const find = ( localizeWithPath(_moduleId, 2, 'find'));
|
|
6
7
|
var localizedStrings = {
|
|
7
8
|
open: open,
|
|
8
9
|
close: close,
|