@codingame/monaco-vscode-views-service-override 4.5.2 → 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/index.js +0 -1
- package/package.json +5 -5
- package/tools/editor.js +31 -8
- package/tools/views.js +2 -3
- package/views.js +1 -2
package/index.js
CHANGED
|
@@ -4,7 +4,6 @@ export { ActivitybarPart } from '@codingame/monaco-vscode-view-common-service-ov
|
|
|
4
4
|
export { GroupOrientation } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService';
|
|
5
5
|
export { EditorInputCapabilities } from 'vscode/vscode/vs/workbench/common/editor';
|
|
6
6
|
export { Parts, Position } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
7
|
-
export { HoverService } from 'vscode/vscode/vs/editor/browser/services/hoverService/hoverService';
|
|
8
7
|
export { EditorPane, SimpleEditorInput, SimpleEditorPane, getPanelPosition, getSideBarPosition, isPartVisibile, onDidChangePanelPosition, onDidChangeSideBarPosition, registerCustomView, registerEditor, registerEditorPane, registerEditorSerializer, setPartVisibility, viewContainerRegistry, viewRegistry } from './tools/views.js';
|
|
9
8
|
export { ViewContainerLocation } from 'vscode/vscode/vs/workbench/common/views';
|
|
10
9
|
export { ViewPaneContainer } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPaneContainer';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-views-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
30
|
-
"@codingame/monaco-vscode-quickaccess-service-override": "
|
|
31
|
-
"@codingame/monaco-vscode-keybindings-service-override": "
|
|
32
|
-
"@codingame/monaco-vscode-view-common-service-override": "
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@5.0.0",
|
|
30
|
+
"@codingame/monaco-vscode-quickaccess-service-override": "5.0.0",
|
|
31
|
+
"@codingame/monaco-vscode-keybindings-service-override": "5.0.0",
|
|
32
|
+
"@codingame/monaco-vscode-view-common-service-override": "5.0.0"
|
|
33
33
|
}
|
|
34
34
|
}
|
package/tools/editor.js
CHANGED
|
@@ -421,7 +421,7 @@ StandaloneEditorGroup = StandaloneEditorGroup_1 = __decorate([
|
|
|
421
421
|
( __param(2, IContextKeyService))
|
|
422
422
|
], StandaloneEditorGroup);
|
|
423
423
|
let MonacoDelegateEditorGroupsService = class MonacoDelegateEditorGroupsService extends Disposable {
|
|
424
|
-
constructor(delegate, instantiationService) {
|
|
424
|
+
constructor(delegate, emptyDelegate, instantiationService) {
|
|
425
425
|
super();
|
|
426
426
|
this.delegate = delegate;
|
|
427
427
|
this._serviceBrand = undefined;
|
|
@@ -493,23 +493,34 @@ let MonacoDelegateEditorGroupsService = class MonacoDelegateEditorGroupsService
|
|
|
493
493
|
const handleCodeEditor = (editor) => {
|
|
494
494
|
if (editor instanceof StandaloneEditor) {
|
|
495
495
|
let timeout;
|
|
496
|
+
const updateActiveGroup = (editor) => {
|
|
497
|
+
const newActiveGroup = editor != null ? this.additionalGroups.find(group => group.editor === editor) : undefined;
|
|
498
|
+
if (this.activeGroupOverride !== newActiveGroup) {
|
|
499
|
+
this.activeGroupOverride = newActiveGroup;
|
|
500
|
+
this._onDidChangeActiveGroup.fire(this.activeGroup);
|
|
501
|
+
}
|
|
502
|
+
};
|
|
503
|
+
const remoteActiveGroup = (editor) => {
|
|
504
|
+
if (!emptyDelegate && this.activeGroupOverride === this.additionalGroups.find(group => group.editor === editor)) {
|
|
505
|
+
updateActiveGroup(undefined);
|
|
506
|
+
}
|
|
507
|
+
};
|
|
496
508
|
const onEditorFocused = () => {
|
|
497
509
|
if (timeout != null)
|
|
498
510
|
window.clearTimeout(timeout);
|
|
499
|
-
|
|
500
|
-
this._onDidChangeActiveGroup.fire(this.activeGroup);
|
|
511
|
+
updateActiveGroup(editor);
|
|
501
512
|
};
|
|
502
513
|
const onEditorBlurred = () => {
|
|
503
514
|
if (timeout != null)
|
|
504
515
|
window.clearTimeout(timeout);
|
|
505
516
|
timeout = window.setTimeout(() => {
|
|
506
517
|
timeout = undefined;
|
|
507
|
-
|
|
508
|
-
this.activeGroupOverride = undefined;
|
|
509
|
-
this._onDidChangeActiveGroup.fire(this.activeGroup);
|
|
510
|
-
}
|
|
518
|
+
remoteActiveGroup(editor);
|
|
511
519
|
}, 100);
|
|
512
520
|
};
|
|
521
|
+
editor.onDidDispose(() => {
|
|
522
|
+
remoteActiveGroup(editor);
|
|
523
|
+
});
|
|
513
524
|
editor.onDidFocusEditorText(onEditorFocused);
|
|
514
525
|
editor.onDidFocusEditorWidget(onEditorFocused);
|
|
515
526
|
editor.onDidBlurEditorText(onEditorBlurred);
|
|
@@ -541,6 +552,18 @@ let MonacoDelegateEditorGroupsService = class MonacoDelegateEditorGroupsService
|
|
|
541
552
|
codeEditorService.listCodeEditors().forEach(handleCodeEditor);
|
|
542
553
|
});
|
|
543
554
|
}
|
|
555
|
+
saveWorkingSet(name) {
|
|
556
|
+
return this.delegate.saveWorkingSet(name);
|
|
557
|
+
}
|
|
558
|
+
getWorkingSets() {
|
|
559
|
+
return this.delegate.getWorkingSets();
|
|
560
|
+
}
|
|
561
|
+
applyWorkingSet(workingSet) {
|
|
562
|
+
return this.delegate.applyWorkingSet(workingSet);
|
|
563
|
+
}
|
|
564
|
+
deleteWorkingSet(workingSet) {
|
|
565
|
+
return this.delegate.deleteWorkingSet(workingSet);
|
|
566
|
+
}
|
|
544
567
|
get isReady() {
|
|
545
568
|
return this.delegate.isReady;
|
|
546
569
|
}
|
|
@@ -582,7 +605,7 @@ let MonacoDelegateEditorGroupsService = class MonacoDelegateEditorGroupsService
|
|
|
582
605
|
get partOptions() { return this.delegate.partOptions; }
|
|
583
606
|
};
|
|
584
607
|
MonacoDelegateEditorGroupsService = __decorate([
|
|
585
|
-
( __param(
|
|
608
|
+
( __param(2, IInstantiationService))
|
|
586
609
|
], MonacoDelegateEditorGroupsService);
|
|
587
610
|
|
|
588
611
|
export { MonacoDelegateEditorGroupsService, MonacoEditorService, fakeActiveGroup, wrapOpenEditor };
|
package/tools/views.js
CHANGED
|
@@ -34,12 +34,11 @@ export { Parts } from 'vscode/vscode/vs/workbench/services/layout/browser/layout
|
|
|
34
34
|
import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService.service';
|
|
35
35
|
import { StandaloneServices } from 'vscode/vscode/vs/editor/standalone/browser/standaloneServices';
|
|
36
36
|
export { SplitView } from 'vscode/vscode/vs/base/browser/ui/splitview/splitview';
|
|
37
|
-
import { fakeActiveGroup } from './editor.js';
|
|
38
37
|
import { withReadyServices } from 'vscode/services';
|
|
39
38
|
|
|
40
39
|
class InjectedEditorPane extends EditorPane {
|
|
41
|
-
constructor(id) {
|
|
42
|
-
super(id,
|
|
40
|
+
constructor(id, group) {
|
|
41
|
+
super(id, group, StandaloneServices.get(ITelemetryService), StandaloneServices.get(IThemeService), StandaloneServices.get(IStorageService));
|
|
43
42
|
}
|
|
44
43
|
}
|
|
45
44
|
class SimpleEditorPane extends InjectedEditorPane {
|
package/views.js
CHANGED
|
@@ -35,7 +35,6 @@ import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/c
|
|
|
35
35
|
import { coalesce } from 'vscode/vscode/vs/base/common/arrays';
|
|
36
36
|
import { IWorkingCopyBackupService } from 'vscode/vscode/vs/workbench/services/workingCopy/common/workingCopyBackup.service';
|
|
37
37
|
import { EditorParts } from '@codingame/monaco-vscode-view-common-service-override/vscode/vs/workbench/browser/parts/editor/editorParts';
|
|
38
|
-
export { HoverService } from 'vscode/vscode/vs/editor/browser/services/hoverService/hoverService';
|
|
39
38
|
import { MonacoDelegateEditorGroupsService, MonacoEditorService } from './tools/editor.js';
|
|
40
39
|
import getServiceOverride$2 from '@codingame/monaco-vscode-quickaccess-service-override';
|
|
41
40
|
import getServiceOverride$3 from '@codingame/monaco-vscode-keybindings-service-override';
|
|
@@ -144,7 +143,7 @@ function isEditorPartVisible() {
|
|
|
144
143
|
}
|
|
145
144
|
let MonacoEditorParts = class MonacoEditorParts extends MonacoDelegateEditorGroupsService {
|
|
146
145
|
constructor(instantiationService) {
|
|
147
|
-
super(instantiationService.createInstance(EditorParts), instantiationService);
|
|
146
|
+
super(instantiationService.createInstance(EditorParts), false, instantiationService);
|
|
148
147
|
this.restoreGroup = (...args) => {
|
|
149
148
|
return this.delegate.restoreGroup(...args);
|
|
150
149
|
};
|