@codingame/monaco-vscode-editor-service-override 8.0.4 → 9.0.2
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 +2 -0
- package/package.json +2 -2
- package/tools/editor.js +7 -3
- package/tools.js +1 -1
package/editor.js
CHANGED
|
@@ -18,6 +18,7 @@ import 'vscode/vscode/vs/workbench/contrib/files/browser/fileCommands._save';
|
|
|
18
18
|
|
|
19
19
|
class EmptyEditorPart {
|
|
20
20
|
constructor() {
|
|
21
|
+
this.onWillDispose = Event.None;
|
|
21
22
|
this.hasMaximizedGroup = () => false;
|
|
22
23
|
this.windowId = mainWindow.vscodeWindowId;
|
|
23
24
|
this.onDidLayout = Event.None;
|
|
@@ -68,6 +69,7 @@ class EmptyEditorPart {
|
|
|
68
69
|
}
|
|
69
70
|
class EmptyEditorGroupsService {
|
|
70
71
|
constructor() {
|
|
72
|
+
this.getScopedInstantiationService = unsupported;
|
|
71
73
|
this.registerContextKeyProvider = unsupported;
|
|
72
74
|
this.saveWorkingSet = unsupported;
|
|
73
75
|
this.getWorkingSets = unsupported;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-editor-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.2",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@9.0.2"
|
|
30
30
|
}
|
|
31
31
|
}
|
package/tools/editor.js
CHANGED
|
@@ -142,7 +142,7 @@ function wrapOpenEditor(textModelService, defaultBehavior, fallbackBahavior) {
|
|
|
142
142
|
}
|
|
143
143
|
const resource = isResourceEditorInput(editor) || isEditorInput(editor) ? editor.resource : undefined;
|
|
144
144
|
if (resource == null || !textModelService.canHandleResource(resource)) {
|
|
145
|
-
return defaultBehavior(editor, optionsOrPreferredGroup, preferredGroup);
|
|
145
|
+
return await defaultBehavior(editor, optionsOrPreferredGroup, preferredGroup);
|
|
146
146
|
}
|
|
147
147
|
let modelEditor;
|
|
148
148
|
const codeEditors = StandaloneServices.get(ICodeEditorService).listCodeEditors();
|
|
@@ -187,7 +187,7 @@ let MonacoEditorService = class MonacoEditorService extends EditorService {
|
|
|
187
187
|
if (!this._isEditorPartVisible()) {
|
|
188
188
|
return undefined;
|
|
189
189
|
}
|
|
190
|
-
return super.openEditor(editor, optionsOrPreferredGroup, preferredGroup);
|
|
190
|
+
return await super.openEditor(editor, optionsOrPreferredGroup, preferredGroup);
|
|
191
191
|
}
|
|
192
192
|
};
|
|
193
193
|
MonacoEditorService = __decorate([
|
|
@@ -299,7 +299,7 @@ let StandaloneEditorGroup = StandaloneEditorGroup_1 = class StandaloneEditorGrou
|
|
|
299
299
|
};
|
|
300
300
|
this.openEditors = async (editors) => {
|
|
301
301
|
if (editors.length === 1) {
|
|
302
|
-
return this.openEditor(editors[0].editor);
|
|
302
|
+
return await this.openEditor(editors[0].editor);
|
|
303
303
|
}
|
|
304
304
|
return undefined;
|
|
305
305
|
};
|
|
@@ -430,6 +430,7 @@ let MonacoDelegateEditorGroupsService = class MonacoDelegateEditorGroupsService
|
|
|
430
430
|
constructor(delegate, emptyDelegate, instantiationService) {
|
|
431
431
|
super();
|
|
432
432
|
this.delegate = delegate;
|
|
433
|
+
this.instantiationService = instantiationService;
|
|
433
434
|
this._serviceBrand = undefined;
|
|
434
435
|
this.additionalGroups = [];
|
|
435
436
|
this.activeGroupOverride = undefined;
|
|
@@ -558,6 +559,9 @@ let MonacoDelegateEditorGroupsService = class MonacoDelegateEditorGroupsService
|
|
|
558
559
|
codeEditorService.listCodeEditors().forEach(handleCodeEditor);
|
|
559
560
|
});
|
|
560
561
|
}
|
|
562
|
+
getScopedInstantiationService() {
|
|
563
|
+
return this.instantiationService;
|
|
564
|
+
}
|
|
561
565
|
registerContextKeyProvider(provider) {
|
|
562
566
|
return this.delegate.registerContextKeyProvider(provider);
|
|
563
567
|
}
|
package/tools.js
CHANGED
|
@@ -26,7 +26,7 @@ function throttle(fct, merge, delay) {
|
|
|
26
26
|
return async (param) => {
|
|
27
27
|
if (toConsume == null) {
|
|
28
28
|
toConsume = param;
|
|
29
|
-
lastPromise = lastPromise.then(async () => sleep(delay)).then(async () => {
|
|
29
|
+
lastPromise = lastPromise.then(async () => await sleep(delay)).then(async () => {
|
|
30
30
|
const _toConsume = toConsume;
|
|
31
31
|
toConsume = null;
|
|
32
32
|
await fct(_toConsume);
|