@codingame/monaco-vscode-editor-service-override 2.0.3-improve-modularity.1 → 2.1.0-update-vscode-1.86.1
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 +5 -8
- package/package.json +2 -2
- package/tools/editor.js +14 -0
package/editor.js
CHANGED
|
@@ -4,21 +4,21 @@ import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
|
4
4
|
import { ICodeEditorService } from 'vscode/vscode/vs/editor/browser/services/codeEditorService';
|
|
5
5
|
import { CodeEditorService } from 'vscode/vscode/vs/workbench/services/editor/browser/codeEditorService';
|
|
6
6
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
|
|
7
|
-
import { EditorExtensions } from 'vscode/vscode/vs/workbench/common/editor';
|
|
8
7
|
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
9
8
|
import { ITextEditorService, TextEditorService } from 'vscode/vscode/vs/workbench/services/textfile/common/textEditorService';
|
|
10
|
-
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
11
|
-
import { FILE_EDITOR_INPUT_ID } from 'vscode/vscode/vs/workbench/contrib/files/common/files';
|
|
12
9
|
import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService';
|
|
13
10
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
14
11
|
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
15
12
|
import { DEFAULT_EDITOR_PART_OPTIONS } from 'vscode/vscode/vs/workbench/browser/parts/editor/editor';
|
|
13
|
+
import { mainWindow } from 'vscode/vscode/vs/base/browser/window';
|
|
16
14
|
import { MonacoEditorService, MonacoDelegateEditorGroupsService } from './tools/editor.js';
|
|
17
15
|
import { unsupported } from './tools.js';
|
|
18
16
|
import 'vscode/vscode/vs/workbench/browser/parts/editor/editor.autosave.contribution';
|
|
17
|
+
import 'vscode/vscode/vs/workbench/contrib/files/browser/files.fileEditorFactory.contribution';
|
|
19
18
|
|
|
20
19
|
class EmptyEditorGroup {
|
|
21
20
|
constructor() {
|
|
21
|
+
this.windowId = mainWindow.vscodeWindowId;
|
|
22
22
|
this.createEditorActions = unsupported;
|
|
23
23
|
this.onDidFocus = Event.None;
|
|
24
24
|
this.onDidOpenEditorFail = Event.None;
|
|
@@ -96,6 +96,8 @@ class EmptyEditorGroup {
|
|
|
96
96
|
const fakeActiveGroup = new EmptyEditorGroup();
|
|
97
97
|
class EmptyEditorPart {
|
|
98
98
|
constructor() {
|
|
99
|
+
this.hasMaximizedGroup = () => false;
|
|
100
|
+
this.windowId = mainWindow.vscodeWindowId;
|
|
99
101
|
this.onDidLayout = Event.None;
|
|
100
102
|
this.onDidScroll = Event.None;
|
|
101
103
|
this.isReady = true;
|
|
@@ -205,11 +207,6 @@ let MonacoEditorGroupsService = class MonacoEditorGroupsService extends MonacoDe
|
|
|
205
207
|
MonacoEditorGroupsService = __decorate([
|
|
206
208
|
( __param(0, IInstantiationService))
|
|
207
209
|
], MonacoEditorGroupsService);
|
|
208
|
-
( Registry.as(EditorExtensions.EditorFactory)).registerFileEditorFactory({
|
|
209
|
-
typeId: FILE_EDITOR_INPUT_ID,
|
|
210
|
-
createFileEditor: unsupported,
|
|
211
|
-
isFileEditor: (obj) => false
|
|
212
|
-
});
|
|
213
210
|
function getServiceOverride(openEditor) {
|
|
214
211
|
return {
|
|
215
212
|
[( ICodeEditorService.toString())]: new SyncDescriptor(CodeEditorService, undefined, true),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-editor-service-override",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0-update-vscode-1.86.1",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"module": "index.js",
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode": "npm:@codingame/monaco-vscode-api@2.0
|
|
21
|
+
"vscode": "npm:@codingame/monaco-vscode-api@2.1.0-update-vscode-1.86.1",
|
|
22
22
|
"vscode-marked": "npm:marked@=3.0.2"
|
|
23
23
|
}
|
|
24
24
|
}
|
package/tools/editor.js
CHANGED
|
@@ -22,6 +22,7 @@ import { IHostService } from 'vscode/vscode/vs/workbench/services/host/browser/h
|
|
|
22
22
|
import { Event, Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
23
23
|
import { TextResourceEditorInput } from 'vscode/vscode/vs/workbench/common/editor/textResourceEditorInput';
|
|
24
24
|
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
25
|
+
import { mainWindow } from 'vscode/vscode/vs/base/browser/window';
|
|
25
26
|
import { unsupported } from '../tools.js';
|
|
26
27
|
|
|
27
28
|
var StandaloneEditorGroup_1;
|
|
@@ -164,6 +165,7 @@ let StandaloneEditorGroup = StandaloneEditorGroup_1 = class StandaloneEditorGrou
|
|
|
164
165
|
this.editor = editor;
|
|
165
166
|
this.scopedContextKeyService = scopedContextKeyService;
|
|
166
167
|
this.active = false;
|
|
168
|
+
this.windowId = mainWindow.vscodeWindowId;
|
|
167
169
|
this.onDidFocus = this.editor.onDidFocusEditorWidget;
|
|
168
170
|
this.onDidOpenEditorFail = Event.None;
|
|
169
171
|
this.whenRestored = Promise.resolve();
|
|
@@ -434,6 +436,18 @@ let MonacoDelegateEditorGroupsService = class MonacoDelegateEditorGroupsService
|
|
|
434
436
|
codeEditorService.listCodeEditors().forEach(handleCodeEditor);
|
|
435
437
|
});
|
|
436
438
|
}
|
|
439
|
+
get isReady() {
|
|
440
|
+
return this.delegate.isReady;
|
|
441
|
+
}
|
|
442
|
+
get whenReady() {
|
|
443
|
+
return this.delegate.whenReady;
|
|
444
|
+
}
|
|
445
|
+
get whenRestored() {
|
|
446
|
+
return this.delegate.whenRestored;
|
|
447
|
+
}
|
|
448
|
+
get hasRestorableState() {
|
|
449
|
+
return this.delegate.hasRestorableState;
|
|
450
|
+
}
|
|
437
451
|
get parts() { return this.delegate.parts; }
|
|
438
452
|
createAuxiliaryEditorPart(options) {
|
|
439
453
|
return this.delegate.createAuxiliaryEditorPart(options);
|