@theia/monaco 1.53.0-next.5 → 1.53.0-next.55
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/README.md +100 -100
- package/data/monaco-nls.json +1379 -1379
- package/data/monaco-themes/vscode/dark_plus.json +201 -201
- package/data/monaco-themes/vscode/dark_theia.json +5 -5
- package/data/monaco-themes/vscode/dark_vs.json +393 -393
- package/data/monaco-themes/vscode/hc_black.json +457 -457
- package/data/monaco-themes/vscode/hc_light.json +590 -590
- package/data/monaco-themes/vscode/hc_theia.json +5 -5
- package/data/monaco-themes/vscode/hc_theia_light.json +5 -5
- package/data/monaco-themes/vscode/light_plus.json +202 -202
- package/data/monaco-themes/vscode/light_theia.json +10 -10
- package/data/monaco-themes/vscode/light_vs.json +421 -421
- package/lib/browser/monaco-context-key-service.js +1 -1
- package/lib/browser/monaco-context-key-service.js.map +1 -1
- package/lib/browser/monaco-editor-model.d.ts +11 -5
- package/lib/browser/monaco-editor-model.d.ts.map +1 -1
- package/lib/browser/monaco-editor-model.js +2 -1
- package/lib/browser/monaco-editor-model.js.map +1 -1
- package/lib/browser/monaco-editor-service.js +1 -1
- package/lib/browser/monaco-editor-service.js.map +1 -1
- package/lib/browser/monaco-editor-zone-widget.js +1 -1
- package/lib/browser/monaco-editor.d.ts +5 -4
- package/lib/browser/monaco-editor.d.ts.map +1 -1
- package/lib/browser/monaco-editor.js +5 -2
- package/lib/browser/monaco-editor.js.map +1 -1
- package/lib/browser/monaco-frontend-application-contribution.js +25 -25
- package/lib/browser/monaco-quick-input-service.d.ts.map +1 -1
- package/lib/browser/monaco-quick-input-service.js +15 -15
- package/lib/browser/monaco-quick-input-service.js.map +1 -1
- package/lib/browser/monaco-text-model-service.d.ts +0 -10
- package/lib/browser/monaco-text-model-service.d.ts.map +1 -1
- package/lib/browser/monaco-text-model-service.js +0 -36
- package/lib/browser/monaco-text-model-service.js.map +1 -1
- package/lib/browser/monaco-to-protocol-converter.d.ts +2 -0
- package/lib/browser/monaco-to-protocol-converter.d.ts.map +1 -1
- package/lib/browser/monaco-to-protocol-converter.js +10 -0
- package/lib/browser/monaco-to-protocol-converter.js.map +1 -1
- package/package.json +9 -9
- package/src/browser/index.ts +17 -17
- package/src/browser/markdown-renderer/monaco-markdown-renderer.ts +109 -109
- package/src/browser/monaco-bulk-edit-service.ts +64 -64
- package/src/browser/monaco-color-registry.ts +73 -73
- package/src/browser/monaco-command-registry.ts +85 -85
- package/src/browser/monaco-command-service.ts +90 -90
- package/src/browser/monaco-command.ts +303 -303
- package/src/browser/monaco-context-key-service.ts +144 -144
- package/src/browser/monaco-context-menu.ts +112 -112
- package/src/browser/monaco-diff-editor.ts +141 -141
- package/src/browser/monaco-diff-navigator-factory.ts +39 -39
- package/src/browser/monaco-editor-model.ts +693 -685
- package/src/browser/monaco-editor-peek-view-widget.ts +233 -233
- package/src/browser/monaco-editor-provider.ts +455 -455
- package/src/browser/monaco-editor-service.ts +152 -152
- package/src/browser/monaco-editor-zone-widget.ts +250 -250
- package/src/browser/monaco-editor.ts +733 -729
- package/src/browser/monaco-formatting-conflicts.ts +116 -116
- package/src/browser/monaco-frontend-application-contribution.ts +182 -182
- package/src/browser/monaco-frontend-module.ts +319 -319
- package/src/browser/monaco-gotoline-quick-access.ts +47 -47
- package/src/browser/monaco-gotosymbol-quick-access.ts +53 -53
- package/src/browser/monaco-icon-registry.ts +49 -49
- package/src/browser/monaco-indexed-db.ts +130 -130
- package/src/browser/monaco-init.ts +134 -134
- package/src/browser/monaco-keybinding.ts +111 -111
- package/src/browser/monaco-keycode-map.ts +171 -171
- package/src/browser/monaco-languages.ts +177 -177
- package/src/browser/monaco-marker-collection.ts +83 -83
- package/src/browser/monaco-menu.ts +147 -147
- package/src/browser/monaco-mime-service.ts +71 -71
- package/src/browser/monaco-outline-contribution.ts +404 -404
- package/src/browser/monaco-outline-decorator.ts +66 -66
- package/src/browser/monaco-quick-access-registry.ts +112 -112
- package/src/browser/monaco-quick-input-service.ts +701 -702
- package/src/browser/monaco-resolved-keybinding.ts +162 -162
- package/src/browser/monaco-snippet-suggest-provider.ts +306 -306
- package/src/browser/monaco-standalone-theme-service.ts +51 -51
- package/src/browser/monaco-status-bar-contribution.ts +110 -110
- package/src/browser/monaco-text-model-service.ts +157 -199
- package/src/browser/monaco-theming-service.ts +204 -204
- package/src/browser/monaco-to-protocol-converter.ts +82 -71
- package/src/browser/monaco-undo-redo-handler.ts +64 -64
- package/src/browser/monaco-workspace.ts +416 -416
- package/src/browser/protocol-to-monaco-converter.ts +158 -158
- package/src/browser/simple-monaco-editor.ts +216 -216
- package/src/browser/style/index.css +266 -266
- package/src/browser/textmate/index.ts +20 -20
- package/src/browser/textmate/monaco-textmate-frontend-bindings.ts +90 -90
- package/src/browser/textmate/monaco-textmate-service.ts +187 -187
- package/src/browser/textmate/monaco-theme-registry.ts +176 -176
- package/src/browser/textmate/monaco-theme-types.ts +37 -37
- package/src/browser/textmate/textmate-contribution.ts +29 -29
- package/src/browser/textmate/textmate-registry.ts +129 -129
- package/src/browser/textmate/textmate-snippet-completion-provider.ts +73 -73
- package/src/browser/textmate/textmate-tokenizer.ts +84 -84
- package/src/browser/workspace-symbol-command.ts +196 -196
- package/src/package.spec.ts +28 -28
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2024 STMicroelectronics and others.
|
|
4
|
-
//
|
|
5
|
-
// This program and the accompanying materials are made available under the
|
|
6
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
-
//
|
|
9
|
-
// This Source Code may also be made available under the following Secondary
|
|
10
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
-
// with the GNU Classpath Exception which is available at
|
|
13
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
-
//
|
|
15
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
-
// *****************************************************************************
|
|
17
|
-
|
|
18
|
-
import { IDisposable } from '@theia/monaco-editor-core/esm/vs/base/common/lifecycle';
|
|
19
|
-
import { StandaloneThemeService } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneThemeService';
|
|
20
|
-
|
|
21
|
-
export class MonacoStandaloneThemeService extends StandaloneThemeService {
|
|
22
|
-
protected get styleElements(): HTMLStyleElement[] {
|
|
23
|
-
// access private style element array
|
|
24
|
-
return (this as any)._styleElements;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
protected get allCSS(): string {
|
|
28
|
-
return (this as any)._allCSS;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
override registerEditorContainer(domNode: HTMLElement): IDisposable {
|
|
32
|
-
const style = domNode.ownerDocument.createElement('style');
|
|
33
|
-
style.type = 'text/css';
|
|
34
|
-
style.media = 'screen';
|
|
35
|
-
style.className = 'monaco-colors';
|
|
36
|
-
style.textContent = this.allCSS;
|
|
37
|
-
domNode.ownerDocument.head.appendChild(style);
|
|
38
|
-
this.styleElements.push(style);
|
|
39
|
-
return {
|
|
40
|
-
dispose: () => {
|
|
41
|
-
for (let i = 0; i < this.styleElements.length; i++) {
|
|
42
|
-
if (this.styleElements[i] === style) {
|
|
43
|
-
this.styleElements.splice(i, 1);
|
|
44
|
-
style.remove();
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
}
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2024 STMicroelectronics and others.
|
|
4
|
+
//
|
|
5
|
+
// This program and the accompanying materials are made available under the
|
|
6
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
//
|
|
9
|
+
// This Source Code may also be made available under the following Secondary
|
|
10
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
// with the GNU Classpath Exception which is available at
|
|
13
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
//
|
|
15
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
|
|
18
|
+
import { IDisposable } from '@theia/monaco-editor-core/esm/vs/base/common/lifecycle';
|
|
19
|
+
import { StandaloneThemeService } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneThemeService';
|
|
20
|
+
|
|
21
|
+
export class MonacoStandaloneThemeService extends StandaloneThemeService {
|
|
22
|
+
protected get styleElements(): HTMLStyleElement[] {
|
|
23
|
+
// access private style element array
|
|
24
|
+
return (this as any)._styleElements;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
protected get allCSS(): string {
|
|
28
|
+
return (this as any)._allCSS;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
override registerEditorContainer(domNode: HTMLElement): IDisposable {
|
|
32
|
+
const style = domNode.ownerDocument.createElement('style');
|
|
33
|
+
style.type = 'text/css';
|
|
34
|
+
style.media = 'screen';
|
|
35
|
+
style.className = 'monaco-colors';
|
|
36
|
+
style.textContent = this.allCSS;
|
|
37
|
+
domNode.ownerDocument.head.appendChild(style);
|
|
38
|
+
this.styleElements.push(style);
|
|
39
|
+
return {
|
|
40
|
+
dispose: () => {
|
|
41
|
+
for (let i = 0; i < this.styleElements.length; i++) {
|
|
42
|
+
if (this.styleElements[i] === style) {
|
|
43
|
+
this.styleElements.splice(i, 1);
|
|
44
|
+
style.remove();
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -1,110 +1,110 @@
|
|
|
1
|
-
// *****************************************************************************
|
|
2
|
-
// Copyright (C) 2018 Ericsson
|
|
3
|
-
//
|
|
4
|
-
// This program and the accompanying materials are made available under the
|
|
5
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
-
//
|
|
8
|
-
// This Source Code may also be made available under the following Secondary
|
|
9
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
-
// with the GNU Classpath Exception which is available at
|
|
12
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
-
//
|
|
14
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
-
// *****************************************************************************
|
|
16
|
-
|
|
17
|
-
import { injectable, inject } from '@theia/core/shared/inversify';
|
|
18
|
-
import { DisposableCollection, nls } from '@theia/core';
|
|
19
|
-
import { FrontendApplicationContribution, FrontendApplication, StatusBar, StatusBarAlignment } from '@theia/core/lib/browser';
|
|
20
|
-
import { EditorCommands, EditorManager, EditorWidget } from '@theia/editor/lib/browser';
|
|
21
|
-
import { MonacoEditor } from './monaco-editor';
|
|
22
|
-
import * as monaco from '@theia/monaco-editor-core';
|
|
23
|
-
|
|
24
|
-
@injectable()
|
|
25
|
-
export class MonacoStatusBarContribution implements FrontendApplicationContribution {
|
|
26
|
-
|
|
27
|
-
protected readonly toDispose = new DisposableCollection();
|
|
28
|
-
|
|
29
|
-
constructor(
|
|
30
|
-
@inject(EditorManager) protected readonly editorManager: EditorManager,
|
|
31
|
-
@inject(StatusBar) protected readonly statusBar: StatusBar
|
|
32
|
-
) { }
|
|
33
|
-
|
|
34
|
-
onStart(app: FrontendApplication): void {
|
|
35
|
-
this.updateStatusBar();
|
|
36
|
-
this.editorManager.onCurrentEditorChanged(() => this.updateStatusBar());
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
protected updateStatusBar(): void {
|
|
40
|
-
const editor = this.editorManager.currentEditor;
|
|
41
|
-
const editorModel = this.getModel(editor);
|
|
42
|
-
if (editor && editorModel) {
|
|
43
|
-
this.setConfigTabSizeWidget();
|
|
44
|
-
this.setLineEndingWidget();
|
|
45
|
-
|
|
46
|
-
this.toDispose.dispose();
|
|
47
|
-
this.toDispose.push(editorModel.onDidChangeOptions(() => {
|
|
48
|
-
this.setConfigTabSizeWidget();
|
|
49
|
-
this.setLineEndingWidget();
|
|
50
|
-
}));
|
|
51
|
-
let previous = editorModel.getEOL();
|
|
52
|
-
this.toDispose.push(editorModel.onDidChangeContent(e => {
|
|
53
|
-
if (previous !== e.eol) {
|
|
54
|
-
previous = e.eol;
|
|
55
|
-
this.setLineEndingWidget();
|
|
56
|
-
}
|
|
57
|
-
}));
|
|
58
|
-
} else {
|
|
59
|
-
this.removeConfigTabSizeWidget();
|
|
60
|
-
this.removeLineEndingWidget();
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
protected setConfigTabSizeWidget(): void {
|
|
65
|
-
const editor = this.editorManager.currentEditor;
|
|
66
|
-
const editorModel = this.getModel(editor);
|
|
67
|
-
if (editor && editorModel) {
|
|
68
|
-
const modelOptions = editorModel.getOptions();
|
|
69
|
-
const tabSize = modelOptions.tabSize;
|
|
70
|
-
const indentSize = modelOptions.indentSize;
|
|
71
|
-
const spaceOrTabSizeMessage = modelOptions.insertSpaces
|
|
72
|
-
? nls.localizeByDefault('Spaces: {0}', indentSize)
|
|
73
|
-
: nls.localizeByDefault('Tab Size: {0}', tabSize);
|
|
74
|
-
this.statusBar.setElement('editor-status-tabbing-config', {
|
|
75
|
-
text: spaceOrTabSizeMessage,
|
|
76
|
-
alignment: StatusBarAlignment.RIGHT,
|
|
77
|
-
priority: 10,
|
|
78
|
-
command: EditorCommands.CONFIG_INDENTATION.id,
|
|
79
|
-
tooltip: nls.localizeByDefault('Select Indentation')
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
protected removeConfigTabSizeWidget(): void {
|
|
84
|
-
this.statusBar.removeElement('editor-status-tabbing-config');
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
protected setLineEndingWidget(): void {
|
|
88
|
-
const editor = this.editorManager.currentEditor;
|
|
89
|
-
const editorModel = this.getModel(editor);
|
|
90
|
-
if (editor && editorModel) {
|
|
91
|
-
const eol = editorModel.getEOL();
|
|
92
|
-
const text = eol === '\n' ? 'LF' : 'CRLF';
|
|
93
|
-
this.statusBar.setElement('editor-status-eol', {
|
|
94
|
-
text: `${text}`,
|
|
95
|
-
alignment: StatusBarAlignment.RIGHT,
|
|
96
|
-
priority: 11,
|
|
97
|
-
command: EditorCommands.CONFIG_EOL.id,
|
|
98
|
-
tooltip: nls.localizeByDefault('Select End of Line Sequence')
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
protected removeLineEndingWidget(): void {
|
|
103
|
-
this.statusBar.removeElement('editor-status-eol');
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
protected getModel(editor: EditorWidget | undefined): monaco.editor.ITextModel | undefined {
|
|
107
|
-
const monacoEditor = MonacoEditor.get(editor);
|
|
108
|
-
return monacoEditor && monacoEditor.getControl().getModel() || undefined;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2018 Ericsson
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
|
|
17
|
+
import { injectable, inject } from '@theia/core/shared/inversify';
|
|
18
|
+
import { DisposableCollection, nls } from '@theia/core';
|
|
19
|
+
import { FrontendApplicationContribution, FrontendApplication, StatusBar, StatusBarAlignment } from '@theia/core/lib/browser';
|
|
20
|
+
import { EditorCommands, EditorManager, EditorWidget } from '@theia/editor/lib/browser';
|
|
21
|
+
import { MonacoEditor } from './monaco-editor';
|
|
22
|
+
import * as monaco from '@theia/monaco-editor-core';
|
|
23
|
+
|
|
24
|
+
@injectable()
|
|
25
|
+
export class MonacoStatusBarContribution implements FrontendApplicationContribution {
|
|
26
|
+
|
|
27
|
+
protected readonly toDispose = new DisposableCollection();
|
|
28
|
+
|
|
29
|
+
constructor(
|
|
30
|
+
@inject(EditorManager) protected readonly editorManager: EditorManager,
|
|
31
|
+
@inject(StatusBar) protected readonly statusBar: StatusBar
|
|
32
|
+
) { }
|
|
33
|
+
|
|
34
|
+
onStart(app: FrontendApplication): void {
|
|
35
|
+
this.updateStatusBar();
|
|
36
|
+
this.editorManager.onCurrentEditorChanged(() => this.updateStatusBar());
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
protected updateStatusBar(): void {
|
|
40
|
+
const editor = this.editorManager.currentEditor;
|
|
41
|
+
const editorModel = this.getModel(editor);
|
|
42
|
+
if (editor && editorModel) {
|
|
43
|
+
this.setConfigTabSizeWidget();
|
|
44
|
+
this.setLineEndingWidget();
|
|
45
|
+
|
|
46
|
+
this.toDispose.dispose();
|
|
47
|
+
this.toDispose.push(editorModel.onDidChangeOptions(() => {
|
|
48
|
+
this.setConfigTabSizeWidget();
|
|
49
|
+
this.setLineEndingWidget();
|
|
50
|
+
}));
|
|
51
|
+
let previous = editorModel.getEOL();
|
|
52
|
+
this.toDispose.push(editorModel.onDidChangeContent(e => {
|
|
53
|
+
if (previous !== e.eol) {
|
|
54
|
+
previous = e.eol;
|
|
55
|
+
this.setLineEndingWidget();
|
|
56
|
+
}
|
|
57
|
+
}));
|
|
58
|
+
} else {
|
|
59
|
+
this.removeConfigTabSizeWidget();
|
|
60
|
+
this.removeLineEndingWidget();
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
protected setConfigTabSizeWidget(): void {
|
|
65
|
+
const editor = this.editorManager.currentEditor;
|
|
66
|
+
const editorModel = this.getModel(editor);
|
|
67
|
+
if (editor && editorModel) {
|
|
68
|
+
const modelOptions = editorModel.getOptions();
|
|
69
|
+
const tabSize = modelOptions.tabSize;
|
|
70
|
+
const indentSize = modelOptions.indentSize;
|
|
71
|
+
const spaceOrTabSizeMessage = modelOptions.insertSpaces
|
|
72
|
+
? nls.localizeByDefault('Spaces: {0}', indentSize)
|
|
73
|
+
: nls.localizeByDefault('Tab Size: {0}', tabSize);
|
|
74
|
+
this.statusBar.setElement('editor-status-tabbing-config', {
|
|
75
|
+
text: spaceOrTabSizeMessage,
|
|
76
|
+
alignment: StatusBarAlignment.RIGHT,
|
|
77
|
+
priority: 10,
|
|
78
|
+
command: EditorCommands.CONFIG_INDENTATION.id,
|
|
79
|
+
tooltip: nls.localizeByDefault('Select Indentation')
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
protected removeConfigTabSizeWidget(): void {
|
|
84
|
+
this.statusBar.removeElement('editor-status-tabbing-config');
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
protected setLineEndingWidget(): void {
|
|
88
|
+
const editor = this.editorManager.currentEditor;
|
|
89
|
+
const editorModel = this.getModel(editor);
|
|
90
|
+
if (editor && editorModel) {
|
|
91
|
+
const eol = editorModel.getEOL();
|
|
92
|
+
const text = eol === '\n' ? 'LF' : 'CRLF';
|
|
93
|
+
this.statusBar.setElement('editor-status-eol', {
|
|
94
|
+
text: `${text}`,
|
|
95
|
+
alignment: StatusBarAlignment.RIGHT,
|
|
96
|
+
priority: 11,
|
|
97
|
+
command: EditorCommands.CONFIG_EOL.id,
|
|
98
|
+
tooltip: nls.localizeByDefault('Select End of Line Sequence')
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
protected removeLineEndingWidget(): void {
|
|
103
|
+
this.statusBar.removeElement('editor-status-eol');
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
protected getModel(editor: EditorWidget | undefined): monaco.editor.ITextModel | undefined {
|
|
107
|
+
const monacoEditor = MonacoEditor.get(editor);
|
|
108
|
+
return monacoEditor && monacoEditor.getControl().getModel() || undefined;
|
|
109
|
+
}
|
|
110
|
+
}
|