@theia/monaco 1.24.0-next.46 → 1.24.0-next.49
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/lib/browser/monaco-bulk-edit-service.d.ts +6 -4
- package/lib/browser/monaco-bulk-edit-service.d.ts.map +1 -1
- package/lib/browser/monaco-bulk-edit-service.js.map +1 -1
- package/lib/browser/monaco-color-registry.d.ts +6 -3
- package/lib/browser/monaco-color-registry.d.ts.map +1 -1
- package/lib/browser/monaco-color-registry.js +17 -13
- package/lib/browser/monaco-color-registry.js.map +1 -1
- package/lib/browser/monaco-command-service.d.ts +6 -5
- package/lib/browser/monaco-command-service.d.ts.map +1 -1
- package/lib/browser/monaco-command-service.js +2 -2
- package/lib/browser/monaco-command-service.js.map +1 -1
- package/lib/browser/monaco-command.d.ts +2 -1
- package/lib/browser/monaco-command.d.ts.map +1 -1
- package/lib/browser/monaco-command.js +17 -16
- package/lib/browser/monaco-command.js.map +1 -1
- package/lib/browser/monaco-context-key-service.d.ts +10 -8
- package/lib/browser/monaco-context-key-service.d.ts.map +1 -1
- package/lib/browser/monaco-context-key-service.js +18 -9
- package/lib/browser/monaco-context-key-service.js.map +1 -1
- package/lib/browser/monaco-context-menu.d.ts +8 -2
- package/lib/browser/monaco-context-menu.d.ts.map +1 -1
- package/lib/browser/monaco-context-menu.js +22 -4
- package/lib/browser/monaco-context-menu.js.map +1 -1
- package/lib/browser/monaco-diagnostic-collection.d.ts +4 -6
- package/lib/browser/monaco-diagnostic-collection.d.ts.map +1 -1
- package/lib/browser/monaco-diagnostic-collection.js +1 -0
- package/lib/browser/monaco-diagnostic-collection.js.map +1 -1
- package/lib/browser/monaco-diff-editor.d.ts +8 -10
- package/lib/browser/monaco-diff-editor.d.ts.map +1 -1
- package/lib/browser/monaco-diff-editor.js +4 -1
- package/lib/browser/monaco-diff-editor.js.map +1 -1
- package/lib/browser/monaco-diff-navigator-factory.d.ts +3 -4
- package/lib/browser/monaco-diff-navigator-factory.d.ts.map +1 -1
- package/lib/browser/monaco-diff-navigator-factory.js +14 -9
- package/lib/browser/monaco-diff-navigator-factory.js.map +1 -1
- package/lib/browser/monaco-editor-model.d.ts +20 -13
- package/lib/browser/monaco-editor-model.d.ts.map +1 -1
- package/lib/browser/monaco-editor-model.js +39 -14
- package/lib/browser/monaco-editor-model.js.map +1 -1
- package/lib/browser/monaco-editor-provider.d.ts +13 -19
- package/lib/browser/monaco-editor-provider.d.ts.map +1 -1
- package/lib/browser/monaco-editor-provider.js +39 -96
- package/lib/browser/monaco-editor-provider.js.map +1 -1
- package/lib/browser/monaco-editor-service.d.ts +9 -8
- package/lib/browser/monaco-editor-service.d.ts.map +1 -1
- package/lib/browser/monaco-editor-service.js +19 -8
- package/lib/browser/monaco-editor-service.js.map +1 -1
- package/lib/browser/monaco-editor-zone-widget.d.ts +3 -3
- package/lib/browser/monaco-editor-zone-widget.d.ts.map +1 -1
- package/lib/browser/monaco-editor-zone-widget.js +3 -2
- package/lib/browser/monaco-editor-zone-widget.js.map +1 -1
- package/lib/browser/monaco-editor.d.ts +20 -18
- package/lib/browser/monaco-editor.d.ts.map +1 -1
- package/lib/browser/monaco-editor.js +53 -19
- package/lib/browser/monaco-editor.js.map +1 -1
- package/lib/browser/monaco-formatting-conflicts.d.ts +1 -1
- package/lib/browser/monaco-formatting-conflicts.d.ts.map +1 -1
- package/lib/browser/monaco-formatting-conflicts.js +2 -1
- package/lib/browser/monaco-formatting-conflicts.js.map +1 -1
- package/lib/browser/monaco-frontend-application-contribution.d.ts +10 -1
- package/lib/browser/monaco-frontend-application-contribution.d.ts.map +1 -1
- package/lib/browser/monaco-frontend-application-contribution.js +42 -1
- package/lib/browser/monaco-frontend-application-contribution.js.map +1 -1
- package/lib/browser/monaco-frontend-module.d.ts +2 -1
- package/lib/browser/monaco-frontend-module.d.ts.map +1 -1
- package/lib/browser/monaco-frontend-module.js +8 -5
- package/lib/browser/monaco-frontend-module.js.map +1 -1
- package/lib/browser/monaco-gotoline-quick-access.d.ts +4 -2
- package/lib/browser/monaco-gotoline-quick-access.d.ts.map +1 -1
- package/lib/browser/monaco-gotoline-quick-access.js +9 -4
- package/lib/browser/monaco-gotoline-quick-access.js.map +1 -1
- package/lib/browser/monaco-gotosymbol-quick-access.d.ts +10 -3
- package/lib/browser/monaco-gotosymbol-quick-access.d.ts.map +1 -1
- package/lib/browser/monaco-gotosymbol-quick-access.js +19 -8
- package/lib/browser/monaco-gotosymbol-quick-access.js.map +1 -1
- package/lib/browser/monaco-indexed-db.d.ts +1 -1
- package/lib/browser/monaco-indexed-db.d.ts.map +1 -1
- package/lib/browser/monaco-indexed-db.js.map +1 -1
- package/lib/browser/monaco-keybinding.d.ts.map +1 -1
- package/lib/browser/monaco-keybinding.js +4 -2
- package/lib/browser/monaco-keybinding.js.map +1 -1
- package/lib/browser/monaco-keycode-map.d.ts +2 -2
- package/lib/browser/monaco-keycode-map.d.ts.map +1 -1
- package/lib/browser/monaco-keycode-map.js +122 -122
- package/lib/browser/monaco-keycode-map.js.map +1 -1
- package/lib/browser/monaco-languages.d.ts +1 -1
- package/lib/browser/monaco-languages.d.ts.map +1 -1
- package/lib/browser/monaco-languages.js +1 -0
- package/lib/browser/monaco-languages.js.map +1 -1
- package/lib/browser/monaco-menu.js +7 -7
- package/lib/browser/monaco-menu.js.map +1 -1
- package/lib/browser/monaco-mime-service.d.ts.map +1 -1
- package/lib/browser/monaco-mime-service.js +8 -4
- package/lib/browser/monaco-mime-service.js.map +1 -1
- package/lib/browser/monaco-outline-contribution.d.ts +15 -16
- package/lib/browser/monaco-outline-contribution.d.ts.map +1 -1
- package/lib/browser/monaco-outline-contribution.js +21 -19
- package/lib/browser/monaco-outline-contribution.js.map +1 -1
- package/lib/browser/monaco-quick-access-registry.d.ts.map +1 -1
- package/lib/browser/monaco-quick-access-registry.js +11 -13
- package/lib/browser/monaco-quick-access-registry.js.map +1 -1
- package/lib/browser/monaco-quick-input-service.d.ts +46 -25
- package/lib/browser/monaco-quick-input-service.d.ts.map +1 -1
- package/lib/browser/monaco-quick-input-service.js +40 -29
- package/lib/browser/monaco-quick-input-service.js.map +1 -1
- package/lib/browser/monaco-resolved-keybinding.d.ts +9 -7
- package/lib/browser/monaco-resolved-keybinding.d.ts.map +1 -1
- package/lib/browser/monaco-resolved-keybinding.js +35 -14
- package/lib/browser/monaco-resolved-keybinding.js.map +1 -1
- package/lib/browser/monaco-snippet-suggest-provider.d.ts +1 -1
- package/lib/browser/monaco-snippet-suggest-provider.d.ts.map +1 -1
- package/lib/browser/monaco-snippet-suggest-provider.js +5 -3
- package/lib/browser/monaco-snippet-suggest-provider.js.map +1 -1
- package/lib/browser/monaco-status-bar-contribution.d.ts +2 -2
- package/lib/browser/monaco-status-bar-contribution.d.ts.map +1 -1
- package/lib/browser/monaco-status-bar-contribution.js.map +1 -1
- package/lib/browser/monaco-text-model-service.d.ts +14 -8
- package/lib/browser/monaco-text-model-service.d.ts.map +1 -1
- package/lib/browser/monaco-text-model-service.js +35 -17
- package/lib/browser/monaco-text-model-service.js.map +1 -1
- package/lib/browser/monaco-theming-service.d.ts +1 -1
- package/lib/browser/monaco-theming-service.d.ts.map +1 -1
- package/lib/browser/monaco-theming-service.js.map +1 -1
- package/lib/browser/monaco-to-protocol-converter.d.ts +1 -1
- package/lib/browser/monaco-to-protocol-converter.d.ts.map +1 -1
- package/lib/browser/monaco-to-protocol-converter.js.map +1 -1
- package/lib/browser/monaco-workspace.d.ts +7 -6
- package/lib/browser/monaco-workspace.d.ts.map +1 -1
- package/lib/browser/monaco-workspace.js +13 -7
- package/lib/browser/monaco-workspace.js.map +1 -1
- package/lib/browser/protocol-to-monaco-converter.d.ts +1 -1
- package/lib/browser/protocol-to-monaco-converter.d.ts.map +1 -1
- package/lib/browser/protocol-to-monaco-converter.js +1 -0
- package/lib/browser/protocol-to-monaco-converter.js.map +1 -1
- package/lib/browser/textmate/monaco-textmate-service.d.ts.map +1 -1
- package/lib/browser/textmate/monaco-textmate-service.js +14 -11
- package/lib/browser/textmate/monaco-textmate-service.js.map +1 -1
- package/lib/browser/textmate/monaco-theme-registry.d.ts +5 -3
- package/lib/browser/textmate/monaco-theme-registry.d.ts.map +1 -1
- package/lib/browser/textmate/monaco-theme-registry.js +6 -3
- package/lib/browser/textmate/monaco-theme-registry.js.map +1 -1
- package/lib/browser/textmate/monaco-theme-types.d.ts +5 -4
- package/lib/browser/textmate/monaco-theme-types.d.ts.map +1 -1
- package/lib/browser/textmate/monaco-theme-types.js +1 -0
- package/lib/browser/textmate/monaco-theme-types.js.map +1 -1
- package/lib/browser/textmate/textmate-contribution.d.ts.map +1 -1
- package/lib/browser/textmate/textmate-contribution.js +1 -0
- package/lib/browser/textmate/textmate-contribution.js.map +1 -1
- package/lib/browser/textmate/textmate-snippet-completion-provider.d.ts +1 -1
- package/lib/browser/textmate/textmate-snippet-completion-provider.d.ts.map +1 -1
- package/lib/browser/textmate/textmate-snippet-completion-provider.js +3 -1
- package/lib/browser/textmate/textmate-snippet-completion-provider.js.map +1 -1
- package/lib/browser/textmate/textmate-tokenizer.d.ts +1 -1
- package/lib/browser/textmate/textmate-tokenizer.d.ts.map +1 -1
- package/lib/browser/textmate/textmate-tokenizer.js +2 -2
- package/lib/browser/textmate/textmate-tokenizer.js.map +1 -1
- package/package.json +9 -10
- package/src/browser/monaco-bulk-edit-service.ts +9 -4
- package/src/browser/monaco-color-registry.ts +17 -14
- package/src/browser/monaco-command-service.ts +8 -7
- package/src/browser/monaco-command.ts +18 -16
- package/src/browser/monaco-context-key-service.ts +25 -16
- package/src/browser/monaco-context-menu.ts +23 -6
- package/src/browser/monaco-diagnostic-collection.ts +4 -5
- package/src/browser/monaco-diff-editor.ts +12 -14
- package/src/browser/monaco-diff-navigator-factory.ts +18 -14
- package/src/browser/monaco-editor-model.ts +56 -24
- package/src/browser/monaco-editor-provider.ts +48 -114
- package/src/browser/monaco-editor-service.ts +27 -16
- package/src/browser/monaco-editor-zone-widget.ts +6 -2
- package/src/browser/monaco-editor.ts +85 -44
- package/src/browser/monaco-formatting-conflicts.ts +10 -5
- package/src/browser/monaco-frontend-application-contribution.ts +40 -2
- package/src/browser/monaco-frontend-module.ts +18 -14
- package/src/browser/monaco-gotoline-quick-access.ts +10 -5
- package/src/browser/monaco-gotosymbol-quick-access.ts +17 -6
- package/src/browser/monaco-indexed-db.ts +1 -0
- package/src/browser/monaco-keybinding.ts +3 -2
- package/src/browser/monaco-keycode-map.ts +72 -71
- package/src/browser/monaco-languages.ts +1 -0
- package/src/browser/monaco-menu.ts +7 -7
- package/src/browser/monaco-mime-service.ts +9 -5
- package/src/browser/monaco-outline-contribution.ts +36 -32
- package/src/browser/monaco-quick-access-registry.ts +29 -19
- package/src/browser/monaco-quick-input-service.ts +102 -59
- package/src/browser/monaco-resolved-keybinding.ts +52 -28
- package/src/browser/monaco-snippet-suggest-provider.ts +5 -3
- package/src/browser/monaco-status-bar-contribution.ts +2 -1
- package/src/browser/monaco-text-model-service.ts +49 -26
- package/src/browser/monaco-theming-service.ts +1 -0
- package/src/browser/monaco-to-protocol-converter.ts +1 -0
- package/src/browser/monaco-workspace.ts +28 -19
- package/src/browser/protocol-to-monaco-converter.ts +1 -0
- package/src/browser/textmate/monaco-textmate-service.ts +15 -12
- package/src/browser/textmate/monaco-theme-registry.ts +10 -5
- package/src/browser/textmate/monaco-theme-types.ts +5 -4
- package/src/browser/textmate/textmate-contribution.ts +1 -0
- package/src/browser/textmate/textmate-snippet-completion-provider.ts +4 -1
- package/src/browser/textmate/textmate-tokenizer.ts +3 -2
- package/lib/browser/monaco-browser-module.d.ts +0 -5
- package/lib/browser/monaco-browser-module.d.ts.map +0 -1
- package/lib/browser/monaco-browser-module.js +0 -27
- package/lib/browser/monaco-browser-module.js.map +0 -1
- package/lib/browser/monaco-comparers.d.ts +0 -10
- package/lib/browser/monaco-comparers.d.ts.map +0 -1
- package/lib/browser/monaco-comparers.js +0 -109
- package/lib/browser/monaco-comparers.js.map +0 -1
- package/lib/browser/monaco-loader.d.ts +0 -4
- package/lib/browser/monaco-loader.d.ts.map +0 -1
- package/lib/browser/monaco-loader.js +0 -177
- package/lib/browser/monaco-loader.js.map +0 -1
- package/lib/electron-browser/monaco-electron-module.d.ts +0 -5
- package/lib/electron-browser/monaco-electron-module.d.ts.map +0 -1
- package/lib/electron-browser/monaco-electron-module.js +0 -50
- package/lib/electron-browser/monaco-electron-module.js.map +0 -1
- package/src/browser/monaco-browser-module.ts +0 -26
- package/src/browser/monaco-comparers.ts +0 -125
- package/src/browser/monaco-loader.ts +0 -193
- package/src/electron-browser/monaco-electron-module.ts +0 -52
- package/src/typings/monaco/index.d.ts +0 -2471
|
@@ -13,37 +13,68 @@
|
|
|
13
13
|
//
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
17
16
|
|
|
18
17
|
import {
|
|
19
18
|
InputBox, InputOptions, KeybindingRegistry, PickOptions,
|
|
20
|
-
QuickInputButton, QuickInputService, QuickPick, QuickPickItem,
|
|
19
|
+
QuickInputButton, QuickInputHideReason, QuickInputService, QuickPick, QuickPickItem,
|
|
21
20
|
QuickPickItemButtonEvent, QuickPickItemHighlights, QuickPickOptions, QuickPickSeparator
|
|
22
21
|
} from '@theia/core/lib/browser';
|
|
23
|
-
import { CancellationToken, Event } from '@theia/core/lib/common';
|
|
24
22
|
import { injectable, inject } from '@theia/core/shared/inversify';
|
|
23
|
+
import {
|
|
24
|
+
IInputBox, IInputOptions, IKeyMods, IPickOptions, IQuickInput, IQuickInputButton,
|
|
25
|
+
IQuickInputService, IQuickNavigateConfiguration, IQuickPick, IQuickPickItem, IQuickPickItemButtonEvent, IQuickPickSeparator, QuickPickInput
|
|
26
|
+
} from '@theia/monaco-editor-core/esm/vs/platform/quickinput/common/quickInput';
|
|
27
|
+
import { IQuickInputOptions, IQuickInputStyles, QuickInputController } from '@theia/monaco-editor-core/esm/vs/base/parts/quickinput/browser/quickInput';
|
|
25
28
|
import { MonacoResolvedKeybinding } from './monaco-resolved-keybinding';
|
|
29
|
+
import { IQuickAccessController } from '@theia/monaco-editor-core/esm/vs/platform/quickinput/common/quickAccess';
|
|
30
|
+
import { QuickAccessController } from '@theia/monaco-editor-core/esm/vs/platform/quickinput/browser/quickAccess';
|
|
31
|
+
import { ContextKeyService as VSCodeContextKeyService } from '@theia/monaco-editor-core/esm/vs/platform/contextkey/browser/contextKeyService';
|
|
32
|
+
import { IListOptions, List } from '@theia/monaco-editor-core/esm/vs/base/browser/ui/list/listWidget';
|
|
33
|
+
import * as monaco from '@theia/monaco-editor-core';
|
|
34
|
+
import { ResolvedKeybinding } from '@theia/monaco-editor-core/esm/vs/base/common/keybindings';
|
|
35
|
+
import { IInstantiationService } from '@theia/monaco-editor-core/esm/vs/platform/instantiation/common/instantiation';
|
|
36
|
+
import { StandaloneServices } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices';
|
|
37
|
+
import { IMatch } from '@theia/monaco-editor-core/esm/vs/base/common/filters';
|
|
38
|
+
import { IListRenderer, IListVirtualDelegate } from '@theia/monaco-editor-core/esm/vs/base/browser/ui/list/list';
|
|
39
|
+
import { Event } from '@theia/core';
|
|
40
|
+
|
|
41
|
+
// Copied from @vscode/src/vs/base/parts/quickInput/browser/quickInputList.ts
|
|
42
|
+
export interface IListElement {
|
|
43
|
+
readonly index: number;
|
|
44
|
+
readonly item: IQuickPickItem;
|
|
45
|
+
readonly saneLabel: string;
|
|
46
|
+
readonly saneAriaLabel: string;
|
|
47
|
+
readonly saneDescription?: string;
|
|
48
|
+
readonly saneDetail?: string;
|
|
49
|
+
readonly labelHighlights?: IMatch[];
|
|
50
|
+
readonly descriptionHighlights?: IMatch[];
|
|
51
|
+
readonly detailHighlights?: IMatch[];
|
|
52
|
+
readonly checked: boolean;
|
|
53
|
+
readonly separator?: IQuickPickSeparator;
|
|
54
|
+
readonly fireButtonTriggered: (event: IQuickPickItemButtonEvent<IQuickPickItem>) => void;
|
|
55
|
+
}
|
|
26
56
|
|
|
27
57
|
@injectable()
|
|
28
|
-
export class MonacoQuickInputImplementation implements
|
|
58
|
+
export class MonacoQuickInputImplementation implements IQuickInputService {
|
|
59
|
+
declare readonly _serviceBrand: undefined;
|
|
29
60
|
|
|
30
|
-
controller:
|
|
31
|
-
quickAccess:
|
|
61
|
+
controller: QuickInputController;
|
|
62
|
+
quickAccess: IQuickAccessController;
|
|
32
63
|
|
|
33
|
-
@inject(
|
|
34
|
-
protected readonly contextKeyService:
|
|
64
|
+
@inject(VSCodeContextKeyService)
|
|
65
|
+
protected readonly contextKeyService: VSCodeContextKeyService;
|
|
35
66
|
|
|
36
67
|
protected container: HTMLElement;
|
|
37
|
-
private quickInputList:
|
|
68
|
+
private quickInputList: List<unknown>;
|
|
38
69
|
|
|
39
|
-
get backButton():
|
|
40
|
-
get onShow():
|
|
41
|
-
get onHide():
|
|
70
|
+
get backButton(): IQuickInputButton { return this.controller.backButton; }
|
|
71
|
+
get onShow(): monaco.IEvent<void> { return this.controller.onShow; }
|
|
72
|
+
get onHide(): monaco.IEvent<void> { return this.controller.onHide; }
|
|
42
73
|
|
|
43
74
|
constructor() {
|
|
44
75
|
this.initContainer();
|
|
45
76
|
this.initController();
|
|
46
|
-
this.quickAccess = new
|
|
77
|
+
this.quickAccess = new QuickAccessController(this, StandaloneServices.get(IInstantiationService));
|
|
47
78
|
}
|
|
48
79
|
|
|
49
80
|
setContextKey(key: string | undefined): void {
|
|
@@ -52,11 +83,11 @@ export class MonacoQuickInputImplementation implements monaco.quickInput.IQuickI
|
|
|
52
83
|
}
|
|
53
84
|
}
|
|
54
85
|
|
|
55
|
-
createQuickPick<T extends
|
|
86
|
+
createQuickPick<T extends IQuickPickItem>(): IQuickPick<T> {
|
|
56
87
|
return this.controller.createQuickPick<T>();
|
|
57
88
|
}
|
|
58
89
|
|
|
59
|
-
createInputBox():
|
|
90
|
+
createInputBox(): IInputBox {
|
|
60
91
|
return this.controller.createInputBox();
|
|
61
92
|
}
|
|
62
93
|
|
|
@@ -67,12 +98,13 @@ export class MonacoQuickInputImplementation implements monaco.quickInput.IQuickI
|
|
|
67
98
|
}, 300);
|
|
68
99
|
}
|
|
69
100
|
|
|
70
|
-
input(options?:
|
|
101
|
+
input(options?: IInputOptions, token?: monaco.CancellationToken): Promise<string | undefined> {
|
|
71
102
|
return this.controller.input(options, token);
|
|
72
103
|
}
|
|
73
104
|
|
|
74
|
-
pick<T extends
|
|
75
|
-
picks: Promise<T[]> | T[], options
|
|
105
|
+
pick<T extends IQuickPickItem, O extends IPickOptions<T>>(
|
|
106
|
+
picks: Promise<QuickPickInput<T>[]> | QuickPickInput<T>[], options?: O, token?: monaco.CancellationToken
|
|
107
|
+
): Promise<(O extends { canPickMany: true; } ? T[] : T) | undefined> {
|
|
76
108
|
return this.controller.pick(picks, options, token);
|
|
77
109
|
}
|
|
78
110
|
|
|
@@ -88,7 +120,7 @@ export class MonacoQuickInputImplementation implements monaco.quickInput.IQuickI
|
|
|
88
120
|
this.controller.toggle();
|
|
89
121
|
}
|
|
90
122
|
|
|
91
|
-
applyStyles(styles:
|
|
123
|
+
applyStyles(styles: IQuickInputStyles): void {
|
|
92
124
|
this.controller.applyStyles(styles);
|
|
93
125
|
}
|
|
94
126
|
|
|
@@ -96,7 +128,7 @@ export class MonacoQuickInputImplementation implements monaco.quickInput.IQuickI
|
|
|
96
128
|
this.controller.layout(dimension, titleBarOffset);
|
|
97
129
|
}
|
|
98
130
|
|
|
99
|
-
navigate
|
|
131
|
+
navigate(next: boolean, quickNavigate?: IQuickNavigateConfiguration): void {
|
|
100
132
|
this.controller.navigate(next, quickNavigate);
|
|
101
133
|
}
|
|
102
134
|
|
|
@@ -112,7 +144,7 @@ export class MonacoQuickInputImplementation implements monaco.quickInput.IQuickI
|
|
|
112
144
|
this.controller.back();
|
|
113
145
|
}
|
|
114
146
|
|
|
115
|
-
async accept
|
|
147
|
+
async accept(keyMods?: IKeyMods): Promise<void> {
|
|
116
148
|
this.controller.accept(keyMods);
|
|
117
149
|
}
|
|
118
150
|
|
|
@@ -129,12 +161,21 @@ export class MonacoQuickInputImplementation implements monaco.quickInput.IQuickI
|
|
|
129
161
|
}
|
|
130
162
|
|
|
131
163
|
private initController(): void {
|
|
132
|
-
this.controller = new
|
|
164
|
+
this.controller = new QuickInputController(this.getOptions());
|
|
133
165
|
this.controller.layout({ width: 600, height: 1200 }, 0);
|
|
134
166
|
}
|
|
135
167
|
|
|
136
|
-
private getOptions():
|
|
137
|
-
|
|
168
|
+
private getOptions(): IQuickInputOptions {
|
|
169
|
+
const styles: IQuickInputStyles = {
|
|
170
|
+
widget: {},
|
|
171
|
+
list: {},
|
|
172
|
+
inputBox: {},
|
|
173
|
+
countBadge: {},
|
|
174
|
+
button: {},
|
|
175
|
+
progressBar: {},
|
|
176
|
+
keybindingLabel: {},
|
|
177
|
+
};
|
|
178
|
+
const options: IQuickInputOptions = {
|
|
138
179
|
idPrefix: 'quickInput_',
|
|
139
180
|
container: this.container,
|
|
140
181
|
ignoreFocusOut: () => false,
|
|
@@ -142,20 +183,12 @@ export class MonacoQuickInputImplementation implements monaco.quickInput.IQuickI
|
|
|
142
183
|
backKeybindingLabel: () => undefined,
|
|
143
184
|
setContextKey: (id?: string) => this.setContextKey(id),
|
|
144
185
|
returnFocus: () => this.container.focus(),
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
},
|
|
150
|
-
styles: {
|
|
151
|
-
widget: {},
|
|
152
|
-
list: {},
|
|
153
|
-
inputBox: {},
|
|
154
|
-
countBadge: {},
|
|
155
|
-
button: {},
|
|
156
|
-
progressBar: {}
|
|
157
|
-
}
|
|
186
|
+
createList: <T>(
|
|
187
|
+
user: string, container: HTMLElement, delegate: IListVirtualDelegate<T>, renderers: IListRenderer<T, unknown>[], listOptions: IListOptions<T>
|
|
188
|
+
): List<T> => this.quickInputList = new List(user, container, delegate, renderers, listOptions),
|
|
189
|
+
styles,
|
|
158
190
|
};
|
|
191
|
+
return options;
|
|
159
192
|
}
|
|
160
193
|
}
|
|
161
194
|
|
|
@@ -179,11 +212,11 @@ export class MonacoQuickInputService implements QuickInputService {
|
|
|
179
212
|
}
|
|
180
213
|
|
|
181
214
|
createInputBox(): InputBox {
|
|
182
|
-
return this.monacoService.createInputBox();
|
|
215
|
+
return this.monacoService.createInputBox() as unknown as InputBox;
|
|
183
216
|
}
|
|
184
217
|
|
|
185
|
-
input(options?: InputOptions, token?: CancellationToken): Promise<string | undefined> {
|
|
186
|
-
let inputOptions:
|
|
218
|
+
input(options?: InputOptions, token?: monaco.CancellationToken): Promise<string | undefined> {
|
|
219
|
+
let inputOptions: IInputOptions | undefined;
|
|
187
220
|
if (options) {
|
|
188
221
|
const { validateInput, ...props } = options;
|
|
189
222
|
inputOptions = { ...props };
|
|
@@ -194,12 +227,19 @@ export class MonacoQuickInputService implements QuickInputService {
|
|
|
194
227
|
return this.monacoService.input(inputOptions, token);
|
|
195
228
|
}
|
|
196
229
|
|
|
197
|
-
pick<T extends QuickPickItem, O extends PickOptions<T
|
|
198
|
-
Promise<
|
|
199
|
-
|
|
230
|
+
async pick<T extends QuickPickItem, O extends PickOptions<T> = PickOptions<T>>(
|
|
231
|
+
picks: Promise<QuickPickInput<T>[]> | QuickPickInput<T>[], options: O = <O>{}, token?: monaco.CancellationToken
|
|
232
|
+
): Promise<(O extends { canPickMany: true; } ? T[] : T) | undefined> {
|
|
233
|
+
const monacoPicks = (await picks).map(pick => {
|
|
234
|
+
if (pick.type === 'separator') {
|
|
235
|
+
return pick;
|
|
236
|
+
}
|
|
237
|
+
return this.convertItems(pick);
|
|
238
|
+
});
|
|
239
|
+
return this.monacoService.pick(monacoPicks, options as any, token) as any; /* eslint-disable-line @typescript-eslint/no-explicit-any */
|
|
200
240
|
}
|
|
201
241
|
|
|
202
|
-
showQuickPick<T extends QuickPickItem>(items: T
|
|
242
|
+
showQuickPick<T extends QuickPickItem>(items: Array<T | QuickPickSeparator>, options?: QuickPickOptions<T>): Promise<T> {
|
|
203
243
|
return new Promise<T>((resolve, reject) => {
|
|
204
244
|
const quickPick = this.monacoService.createQuickPick<MonacoQuickPickItem<T>>();
|
|
205
245
|
const wrapped = this.wrapQuickPick(quickPick);
|
|
@@ -245,7 +285,7 @@ export class MonacoQuickInputService implements QuickInputService {
|
|
|
245
285
|
options.onDidChangeActive(wrapped, activeItems);
|
|
246
286
|
}
|
|
247
287
|
});
|
|
248
|
-
wrapped.onDidTriggerButton((button:
|
|
288
|
+
wrapped.onDidTriggerButton((button: IQuickInputButton) => {
|
|
249
289
|
if (options.onDidTriggerButton) {
|
|
250
290
|
options.onDidTriggerButton(button);
|
|
251
291
|
}
|
|
@@ -285,7 +325,7 @@ export class MonacoQuickInputService implements QuickInputService {
|
|
|
285
325
|
return this.wrapQuickPick(quickPick);
|
|
286
326
|
}
|
|
287
327
|
|
|
288
|
-
wrapQuickPick<T extends QuickPickItem>(wrapped:
|
|
328
|
+
wrapQuickPick<T extends QuickPickItem>(wrapped: IQuickPick<MonacoQuickPickItem<T>>): QuickPick<T> {
|
|
289
329
|
return new MonacoQuickPick(wrapped, this.keybindingRegistry);
|
|
290
330
|
}
|
|
291
331
|
|
|
@@ -299,11 +339,11 @@ export class MonacoQuickInputService implements QuickInputService {
|
|
|
299
339
|
}
|
|
300
340
|
|
|
301
341
|
class MonacoQuickInput {
|
|
302
|
-
constructor(protected readonly wrapped:
|
|
342
|
+
constructor(protected readonly wrapped: IQuickInput) {
|
|
303
343
|
}
|
|
304
344
|
|
|
305
|
-
|
|
306
|
-
|
|
345
|
+
get onDidHide(): Event<{ reason: QuickInputHideReason }> { return this.wrapped.onDidHide; }
|
|
346
|
+
get onDispose(): Event<void> { return this.wrapped.onDispose; }
|
|
307
347
|
|
|
308
348
|
get title(): string | undefined {
|
|
309
349
|
return this.wrapped.title;
|
|
@@ -379,7 +419,7 @@ class MonacoQuickInput {
|
|
|
379
419
|
}
|
|
380
420
|
|
|
381
421
|
class MonacoQuickPick<T extends QuickPickItem> extends MonacoQuickInput implements QuickPick<T> {
|
|
382
|
-
constructor(protected override readonly wrapped:
|
|
422
|
+
constructor(protected override readonly wrapped: IQuickPick<MonacoQuickPickItem<T>>, protected readonly keybindingRegistry: KeybindingRegistry) {
|
|
383
423
|
super(wrapped);
|
|
384
424
|
}
|
|
385
425
|
|
|
@@ -447,29 +487,32 @@ class MonacoQuickPick<T extends QuickPickItem> extends MonacoQuickInput implemen
|
|
|
447
487
|
return this.wrapped.selectedItems.map(item => item.item);
|
|
448
488
|
}
|
|
449
489
|
|
|
450
|
-
readonly onDidAccept: Event<
|
|
490
|
+
readonly onDidAccept: Event<{ inBackground: boolean }> = this.wrapped.onDidAccept;
|
|
451
491
|
readonly onDidChangeValue: Event<string> = this.wrapped.onDidChangeValue;
|
|
452
492
|
readonly onDidTriggerButton: Event<QuickInputButton> = this.wrapped.onDidTriggerButton;
|
|
453
493
|
readonly onDidTriggerItemButton: Event<QuickPickItemButtonEvent<T>> =
|
|
454
|
-
Event.map(this.wrapped.onDidTriggerItemButton, (evt:
|
|
494
|
+
Event.map(this.wrapped.onDidTriggerItemButton, (evt: IQuickPickItemButtonEvent<MonacoQuickPickItem<T>>) => ({
|
|
455
495
|
item: evt.item.item,
|
|
456
496
|
button: evt.button
|
|
457
497
|
}));
|
|
458
|
-
readonly onDidChangeActive: Event<T[]> = Event.map(
|
|
459
|
-
|
|
498
|
+
readonly onDidChangeActive: Event<T[]> = Event.map(
|
|
499
|
+
this.wrapped.onDidChangeActive,
|
|
500
|
+
(items: MonacoQuickPickItem<T>[]) => items.map(item => item.item));
|
|
501
|
+
readonly onDidChangeSelection: Event<T[]> = Event.map(
|
|
502
|
+
this.wrapped.onDidChangeSelection, (items: MonacoQuickPickItem<T>[]) => items.map(item => item.item));
|
|
460
503
|
}
|
|
461
504
|
|
|
462
|
-
export class MonacoQuickPickItem<T extends QuickPickItem> implements
|
|
463
|
-
readonly type?: 'item'
|
|
505
|
+
export class MonacoQuickPickItem<T extends QuickPickItem> implements IQuickPickItem {
|
|
506
|
+
readonly type?: 'item';
|
|
464
507
|
readonly id?: string;
|
|
465
508
|
readonly label: string;
|
|
466
509
|
readonly meta?: string;
|
|
467
510
|
readonly ariaLabel?: string;
|
|
468
511
|
readonly description?: string;
|
|
469
512
|
readonly detail?: string;
|
|
470
|
-
readonly keybinding?:
|
|
513
|
+
readonly keybinding?: ResolvedKeybinding;
|
|
471
514
|
readonly iconClasses?: string[];
|
|
472
|
-
buttons?:
|
|
515
|
+
buttons?: IQuickInputButton[];
|
|
473
516
|
readonly alwaysShow?: boolean;
|
|
474
517
|
readonly highlights?: QuickPickItemHighlights;
|
|
475
518
|
|
|
@@ -483,7 +526,7 @@ export class MonacoQuickPickItem<T extends QuickPickItem> implements monaco.quic
|
|
|
483
526
|
this.detail = item.detail;
|
|
484
527
|
this.keybinding = item.keySequence ? new MonacoResolvedKeybinding(item.keySequence, kbRegistry) : undefined;
|
|
485
528
|
this.iconClasses = item.iconClasses;
|
|
486
|
-
this.buttons = item.buttons;
|
|
529
|
+
this.buttons = item.buttons?.map(QuickInputButton.normalize);
|
|
487
530
|
this.alwaysShow = item.alwaysShow;
|
|
488
531
|
this.highlights = item.highlights;
|
|
489
532
|
}
|
|
@@ -14,14 +14,21 @@
|
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
|
+
import { KeyCode as MonacoKeyCode } from '@theia/monaco-editor-core/esm/vs/base/common/keyCodes';
|
|
18
|
+
import {
|
|
19
|
+
ChordKeybinding, KeybindingModifier, ResolvedKeybinding, ResolvedKeybindingPart, ScanCodeBinding, SimpleKeybinding
|
|
20
|
+
} from '@theia/monaco-editor-core/esm/vs/base/common/keybindings';
|
|
21
|
+
import { ElectronAcceleratorLabelProvider, UILabelProvider, UserSettingsLabelProvider } from '@theia/monaco-editor-core/esm/vs/base/common/keybindingLabels';
|
|
22
|
+
import { USLayoutResolvedKeybinding } from '@theia/monaco-editor-core/esm/vs/platform/keybinding/common/usLayoutResolvedKeybinding';
|
|
23
|
+
import * as MonacoPlatform from '@theia/monaco-editor-core/esm/vs/base/common/platform';
|
|
17
24
|
import { KeybindingRegistry } from '@theia/core/lib/browser/keybinding';
|
|
18
25
|
import { KeyCode, KeySequence, Keystroke, Key, KeyModifier } from '@theia/core/lib/browser/keys';
|
|
19
26
|
import { isOSX } from '@theia/core/lib/common/os';
|
|
20
27
|
import { KEY_CODE_MAP } from './monaco-keycode-map';
|
|
21
28
|
|
|
22
|
-
export class MonacoResolvedKeybinding extends
|
|
29
|
+
export class MonacoResolvedKeybinding extends ResolvedKeybinding {
|
|
23
30
|
|
|
24
|
-
protected readonly parts:
|
|
31
|
+
protected readonly parts: ResolvedKeybindingPart[];
|
|
25
32
|
|
|
26
33
|
constructor(protected readonly keySequence: KeySequence, keybindingService: KeybindingRegistry) {
|
|
27
34
|
super();
|
|
@@ -29,7 +36,7 @@ export class MonacoResolvedKeybinding extends monaco.keybindings.ResolvedKeybind
|
|
|
29
36
|
// eslint-disable-next-line no-null/no-null
|
|
30
37
|
const keyLabel = keyCode.key ? keybindingService.acceleratorForKey(keyCode.key) : null;
|
|
31
38
|
const keyAriaLabel = keyLabel;
|
|
32
|
-
return new
|
|
39
|
+
return new ResolvedKeybindingPart(
|
|
33
40
|
keyCode.ctrl,
|
|
34
41
|
keyCode.shift,
|
|
35
42
|
keyCode.alt,
|
|
@@ -40,45 +47,64 @@ export class MonacoResolvedKeybinding extends monaco.keybindings.ResolvedKeybind
|
|
|
40
47
|
});
|
|
41
48
|
}
|
|
42
49
|
|
|
43
|
-
|
|
44
|
-
return
|
|
50
|
+
getLabel(): string | null {
|
|
51
|
+
return UILabelProvider.toLabel(MonacoPlatform.OS, this.parts, p => p.keyLabel);
|
|
45
52
|
}
|
|
46
53
|
|
|
47
|
-
|
|
48
|
-
return
|
|
54
|
+
getAriaLabel(): string | null {
|
|
55
|
+
return UILabelProvider.toLabel(MonacoPlatform.OS, this.parts, p => p.keyAriaLabel);
|
|
49
56
|
}
|
|
50
57
|
|
|
51
|
-
|
|
58
|
+
getElectronAccelerator(): string | null {
|
|
52
59
|
if (this.isChord()) {
|
|
53
60
|
// Electron cannot handle chords
|
|
54
61
|
// eslint-disable-next-line no-null/no-null
|
|
55
62
|
return null;
|
|
56
63
|
}
|
|
57
|
-
return
|
|
64
|
+
return ElectronAcceleratorLabelProvider.toLabel(MonacoPlatform.OS, this.parts, p => p.keyLabel);
|
|
58
65
|
}
|
|
59
66
|
|
|
60
|
-
|
|
61
|
-
return
|
|
67
|
+
getUserSettingsLabel(): string | null {
|
|
68
|
+
return UserSettingsLabelProvider.toLabel(MonacoPlatform.OS, this.parts, p => p.keyLabel);
|
|
62
69
|
}
|
|
63
70
|
|
|
64
|
-
|
|
71
|
+
isWYSIWYG(): boolean {
|
|
65
72
|
return true;
|
|
66
73
|
}
|
|
67
74
|
|
|
68
|
-
|
|
75
|
+
isChord(): boolean {
|
|
69
76
|
return this.parts.length > 1;
|
|
70
77
|
}
|
|
71
78
|
|
|
72
|
-
|
|
73
|
-
return this.keySequence.map(keyCode =>
|
|
79
|
+
getDispatchParts(): (string | null)[] {
|
|
80
|
+
return this.keySequence.map(keyCode => USLayoutResolvedKeybinding.getDispatchStr(this.toKeybinding(keyCode)));
|
|
74
81
|
}
|
|
75
82
|
|
|
76
|
-
|
|
77
|
-
return
|
|
83
|
+
getSingleModifierDispatchParts(): (KeybindingModifier | null)[] {
|
|
84
|
+
return this.keySequence.map(keybinding => this.getSingleModifierDispatchPart(keybinding));
|
|
78
85
|
}
|
|
79
86
|
|
|
80
|
-
|
|
81
|
-
|
|
87
|
+
protected getSingleModifierDispatchPart(code: KeyCode): KeybindingModifier | null {
|
|
88
|
+
if (code.key?.keyCode === undefined) {
|
|
89
|
+
return null; // eslint-disable-line no-null/no-null
|
|
90
|
+
}
|
|
91
|
+
if (KEY_CODE_MAP[code.key?.keyCode] === MonacoKeyCode.Ctrl && !code.shift && !code.alt && !code.meta) {
|
|
92
|
+
return 'ctrl';
|
|
93
|
+
}
|
|
94
|
+
if (KEY_CODE_MAP[code.key?.keyCode] === MonacoKeyCode.Shift && !code.ctrl && !code.alt && !code.meta) {
|
|
95
|
+
return 'shift';
|
|
96
|
+
}
|
|
97
|
+
if (KEY_CODE_MAP[code.key?.keyCode] === MonacoKeyCode.Alt && !code.shift && !code.ctrl && !code.meta) {
|
|
98
|
+
return 'alt';
|
|
99
|
+
}
|
|
100
|
+
if (KEY_CODE_MAP[code.key?.keyCode] === MonacoKeyCode.Meta && !code.shift && !code.alt && !code.ctrl) {
|
|
101
|
+
return 'meta';
|
|
102
|
+
}
|
|
103
|
+
return null; // eslint-disable-line no-null/no-null
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
private toKeybinding(keyCode: KeyCode): SimpleKeybinding {
|
|
107
|
+
return new SimpleKeybinding(
|
|
82
108
|
keyCode.ctrl,
|
|
83
109
|
keyCode.shift,
|
|
84
110
|
keyCode.alt,
|
|
@@ -87,18 +113,16 @@ export class MonacoResolvedKeybinding extends monaco.keybindings.ResolvedKeybind
|
|
|
87
113
|
);
|
|
88
114
|
}
|
|
89
115
|
|
|
90
|
-
public getParts():
|
|
116
|
+
public getParts(): ResolvedKeybindingPart[] {
|
|
91
117
|
return this.parts;
|
|
92
118
|
}
|
|
93
119
|
|
|
94
|
-
static toKeybinding(
|
|
95
|
-
return
|
|
96
|
-
? this.keyCode(keybinding).toString()
|
|
97
|
-
: this.keySequence(keybinding as monaco.keybindings.ChordKeybinding).join(' ');
|
|
120
|
+
static toKeybinding(keybindings: Array<SimpleKeybinding | ScanCodeBinding>): string {
|
|
121
|
+
return keybindings.map(binding => this.keyCode(binding)).join(' ');
|
|
98
122
|
}
|
|
99
123
|
|
|
100
|
-
static keyCode(keybinding:
|
|
101
|
-
const keyCode = keybinding.keyCode;
|
|
124
|
+
static keyCode(keybinding: SimpleKeybinding | ScanCodeBinding): KeyCode {
|
|
125
|
+
const keyCode = keybinding instanceof SimpleKeybinding ? keybinding.keyCode : USLayoutResolvedKeybinding['_scanCodeToKeyCode'](keybinding.scanCode);
|
|
102
126
|
const sequence: Keystroke = {
|
|
103
127
|
first: Key.getKey(this.monaco2BrowserKeyCode(keyCode & 0xff)),
|
|
104
128
|
modifiers: []
|
|
@@ -122,11 +146,11 @@ export class MonacoResolvedKeybinding extends monaco.keybindings.ResolvedKeybind
|
|
|
122
146
|
return KeyCode.createKeyCode(sequence);
|
|
123
147
|
}
|
|
124
148
|
|
|
125
|
-
static keySequence(keybinding:
|
|
149
|
+
static keySequence(keybinding: ChordKeybinding): KeySequence {
|
|
126
150
|
return keybinding.parts.map(part => this.keyCode(part));
|
|
127
151
|
}
|
|
128
152
|
|
|
129
|
-
private static monaco2BrowserKeyCode(keyCode:
|
|
153
|
+
private static monaco2BrowserKeyCode(keyCode: MonacoKeyCode): number {
|
|
130
154
|
for (let i = 0; i < KEY_CODE_MAP.length; i++) {
|
|
131
155
|
if (KEY_CODE_MAP[i] === keyCode) {
|
|
132
156
|
return i;
|
|
@@ -24,6 +24,8 @@ import URI from '@theia/core/lib/common/uri';
|
|
|
24
24
|
import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable';
|
|
25
25
|
import { FileService } from '@theia/filesystem/lib/browser/file-service';
|
|
26
26
|
import { FileOperationError } from '@theia/filesystem/lib/common/files';
|
|
27
|
+
import * as monaco from '@theia/monaco-editor-core';
|
|
28
|
+
import { SnippetParser } from '@theia/monaco-editor-core/esm/vs/editor/contrib/snippet/browser/snippetParser';
|
|
27
29
|
|
|
28
30
|
@injectable()
|
|
29
31
|
export class MonacoSnippetSuggestProvider implements monaco.languages.CompletionItemProvider {
|
|
@@ -49,13 +51,13 @@ export class MonacoSnippetSuggestProvider implements monaco.languages.Completion
|
|
|
49
51
|
return undefined;
|
|
50
52
|
}
|
|
51
53
|
|
|
52
|
-
const languageId = model.
|
|
54
|
+
const languageId = model.getLanguageId(); // TODO: look up a language id at the position
|
|
53
55
|
await this.loadSnippets(languageId);
|
|
54
56
|
const snippetsForLanguage = this.snippets.get(languageId) || [];
|
|
55
57
|
|
|
56
58
|
const pos = { lineNumber: position.lineNumber, column: 1 };
|
|
57
59
|
const lineOffsets: number[] = [];
|
|
58
|
-
const linePrefixLow = model.getLineContent(position.lineNumber).
|
|
60
|
+
const linePrefixLow = model.getLineContent(position.lineNumber).substring(0, position.column - 1).toLowerCase();
|
|
59
61
|
const endsInWhitespace = linePrefixLow.match(/\s$/);
|
|
60
62
|
|
|
61
63
|
while (pos.column < position.column) {
|
|
@@ -287,7 +289,7 @@ export class MonacoSnippetSuggestion implements monaco.languages.CompletionItem
|
|
|
287
289
|
protected resolved = false;
|
|
288
290
|
resolve(): MonacoSnippetSuggestion {
|
|
289
291
|
if (!this.resolved) {
|
|
290
|
-
const codeSnippet = new
|
|
292
|
+
const codeSnippet = new SnippetParser().parse(this.snippet.body).toString();
|
|
291
293
|
this.documentation = { value: '```\n' + codeSnippet + '```' };
|
|
292
294
|
this.resolved = true;
|
|
293
295
|
}
|
|
@@ -19,6 +19,7 @@ import { DisposableCollection, nls } from '@theia/core';
|
|
|
19
19
|
import { FrontendApplicationContribution, FrontendApplication, StatusBar, StatusBarAlignment } from '@theia/core/lib/browser';
|
|
20
20
|
import { EditorCommands, EditorManager, EditorWidget } from '@theia/editor/lib/browser';
|
|
21
21
|
import { MonacoEditor } from './monaco-editor';
|
|
22
|
+
import * as monaco from '@theia/monaco-editor-core';
|
|
22
23
|
|
|
23
24
|
@injectable()
|
|
24
25
|
export class MonacoStatusBarContribution implements FrontendApplicationContribution {
|
|
@@ -101,7 +102,7 @@ export class MonacoStatusBarContribution implements FrontendApplicationContribut
|
|
|
101
102
|
this.statusBar.removeElement('editor-status-eol');
|
|
102
103
|
}
|
|
103
104
|
|
|
104
|
-
protected getModel(editor: EditorWidget | undefined): monaco.editor.
|
|
105
|
+
protected getModel(editor: EditorWidget | undefined): monaco.editor.ITextModel | undefined {
|
|
105
106
|
const monacoEditor = MonacoEditor.get(editor);
|
|
106
107
|
return monacoEditor && monacoEditor.getControl().getModel() || undefined;
|
|
107
108
|
}
|