@codingame/monaco-vscode-editor-service-override 11.1.2 → 12.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/editor.js DELETED
@@ -1,156 +0,0 @@
1
- import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
- import { Event } from 'vscode/vscode/vs/base/common/event';
3
- import { ICodeEditorService } from 'vscode/vscode/vs/editor/browser/services/codeEditorService';
4
- import { CodeEditorService } from 'vscode/vscode/vs/workbench/services/editor/browser/codeEditorService';
5
- import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
6
- import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
7
- import { TextEditorService } from 'vscode/vscode/vs/workbench/services/textfile/common/textEditorService';
8
- import { ITextEditorService } from 'vscode/vscode/vs/workbench/services/textfile/common/textEditorService.service';
9
- import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
10
- import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
11
- import { DEFAULT_EDITOR_PART_OPTIONS } from 'vscode/vscode/vs/workbench/browser/parts/editor/editor';
12
- import { mainWindow } from 'vscode/vscode/vs/base/browser/window';
13
- import { fakeActiveGroup, MonacoDelegateEditorGroupsService, MonacoEditorService } from './tools/editor.js';
14
- import { unsupported } from './tools.js';
15
- import 'vscode/vscode/vs/workbench/browser/parts/editor/editor.contribution._autosave';
16
- import 'vscode/vscode/vs/workbench/contrib/files/browser/files.contribution._fileEditorFactory';
17
- import 'vscode/vscode/vs/workbench/contrib/files/browser/fileCommands._save';
18
-
19
- class EmptyEditorPart {
20
- constructor() {
21
- this.onWillDispose = Event.None;
22
- this.hasMaximizedGroup = () => false;
23
- this.windowId = mainWindow.vscodeWindowId;
24
- this.onDidLayout = Event.None;
25
- this.onDidScroll = Event.None;
26
- this.isReady = true;
27
- this.whenReady = Promise.resolve();
28
- this.whenRestored = Promise.resolve();
29
- this.hasRestorableState = false;
30
- this.centerLayout = unsupported;
31
- this.isLayoutCentered = unsupported;
32
- this.enforcePartOptions = unsupported;
33
- this.onDidChangeActiveGroup = Event.None;
34
- this.onDidAddGroup = Event.None;
35
- this.onDidRemoveGroup = Event.None;
36
- this.onDidMoveGroup = Event.None;
37
- this.onDidActivateGroup = Event.None;
38
- this.onDidChangeGroupIndex = Event.None;
39
- this.onDidChangeGroupLocked = Event.None;
40
- this.onDidChangeGroupMaximized = Event.None;
41
- this.activeGroup = fakeActiveGroup;
42
- this.groups = [fakeActiveGroup];
43
- this.count = 0;
44
- this.orientation = 0 ;
45
- this.getGroups = () => [];
46
- this.getGroup = () => undefined;
47
- this.activateGroup = unsupported;
48
- this.getSize = unsupported;
49
- this.setSize = unsupported;
50
- this.arrangeGroups = unsupported;
51
- this.toggleMaximizeGroup = unsupported;
52
- this.toggleExpandGroup = unsupported;
53
- this.applyLayout = unsupported;
54
- this.getLayout = unsupported;
55
- this.setGroupOrientation = unsupported;
56
- this.findGroup = () => undefined;
57
- this.addGroup = unsupported;
58
- this.removeGroup = unsupported;
59
- this.moveGroup = unsupported;
60
- this.mergeGroup = unsupported;
61
- this.mergeAllGroups = unsupported;
62
- this.copyGroup = unsupported;
63
- this.partOptions = DEFAULT_EDITOR_PART_OPTIONS;
64
- this.onDidChangeEditorPartOptions = Event.None;
65
- this.createEditorDropTarget = unsupported;
66
- }
67
- get contentDimension() {
68
- return unsupported();
69
- }
70
- get sideGroup() {
71
- return unsupported();
72
- }
73
- }
74
- class EmptyEditorGroupsService {
75
- constructor() {
76
- this.getScopedInstantiationService = unsupported;
77
- this.registerContextKeyProvider = unsupported;
78
- this.saveWorkingSet = unsupported;
79
- this.getWorkingSets = unsupported;
80
- this.applyWorkingSet = unsupported;
81
- this.deleteWorkingSet = unsupported;
82
- this.onDidCreateAuxiliaryEditorPart = Event.None;
83
- this.mainPart = new EmptyEditorPart();
84
- this.activePart = this.mainPart;
85
- this.parts = [this.mainPart];
86
- this.getPart = unsupported;
87
- this.createAuxiliaryEditorPart = unsupported;
88
- this.onDidChangeGroupMaximized = Event.None;
89
- this.toggleMaximizeGroup = unsupported;
90
- this.toggleExpandGroup = unsupported;
91
- this.partOptions = DEFAULT_EDITOR_PART_OPTIONS;
92
- this.createEditorDropTarget = unsupported;
93
- this._serviceBrand = undefined;
94
- this.getLayout = unsupported;
95
- this.onDidChangeActiveGroup = Event.None;
96
- this.onDidAddGroup = Event.None;
97
- this.onDidRemoveGroup = Event.None;
98
- this.onDidMoveGroup = Event.None;
99
- this.onDidActivateGroup = Event.None;
100
- this.onDidLayout = Event.None;
101
- this.onDidScroll = Event.None;
102
- this.onDidChangeGroupIndex = Event.None;
103
- this.onDidChangeGroupLocked = Event.None;
104
- this.activeGroup = fakeActiveGroup;
105
- this.groups = [fakeActiveGroup];
106
- this.count = 0;
107
- this.orientation = 0 ;
108
- this.isReady = false;
109
- this.whenReady = Promise.resolve();
110
- this.whenRestored = Promise.resolve();
111
- this.hasRestorableState = false;
112
- this.getGroups = () => [];
113
- this.getGroup = () => undefined;
114
- this.activateGroup = unsupported;
115
- this.getSize = unsupported;
116
- this.setSize = unsupported;
117
- this.arrangeGroups = unsupported;
118
- this.applyLayout = unsupported;
119
- this.centerLayout = unsupported;
120
- this.isLayoutCentered = () => false;
121
- this.setGroupOrientation = unsupported;
122
- this.findGroup = () => undefined;
123
- this.addGroup = unsupported;
124
- this.removeGroup = unsupported;
125
- this.moveGroup = unsupported;
126
- this.mergeGroup = unsupported;
127
- this.mergeAllGroups = unsupported;
128
- this.copyGroup = unsupported;
129
- this.onDidChangeEditorPartOptions = Event.None;
130
- this.enforcePartOptions = unsupported;
131
- }
132
- get contentDimension() {
133
- return unsupported();
134
- }
135
- get sideGroup() {
136
- return unsupported();
137
- }
138
- }
139
- let MonacoEditorGroupsService = class MonacoEditorGroupsService extends MonacoDelegateEditorGroupsService {
140
- constructor(instantiationService) {
141
- super(instantiationService.createInstance(EmptyEditorGroupsService), true, instantiationService);
142
- }
143
- };
144
- MonacoEditorGroupsService = __decorate([
145
- ( __param(0, IInstantiationService))
146
- ], MonacoEditorGroupsService);
147
- function getServiceOverride(openEditor) {
148
- return {
149
- [( ICodeEditorService.toString())]: new SyncDescriptor(CodeEditorService, undefined, true),
150
- [( IEditorService.toString())]: new SyncDescriptor(MonacoEditorService, [openEditor, () => false], true),
151
- [( ITextEditorService.toString())]: new SyncDescriptor(TextEditorService, [], false),
152
- [( IEditorGroupsService.toString())]: new SyncDescriptor(MonacoEditorGroupsService)
153
- };
154
- }
155
-
156
- export { MonacoEditorService, getServiceOverride as default };