@theia/editor 1.67.0-next.13 → 1.67.0-next.56

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.
Files changed (147) hide show
  1. package/README.md +1 -1
  2. package/package.json +4 -4
  3. package/src/browser/editor-contribution.ts +26 -8
  4. package/src/browser/editor-frontend-module.ts +6 -0
  5. package/src/browser/index.ts +2 -0
  6. package/src/browser/split-editor-contribution.ts +46 -0
  7. package/src/browser/text-editor-split-contribution.ts +50 -0
  8. package/lib/browser/decorations/editor-decoration-style.d.ts +0 -9
  9. package/lib/browser/decorations/editor-decoration-style.d.ts.map +0 -1
  10. package/lib/browser/decorations/editor-decoration-style.js +0 -37
  11. package/lib/browser/decorations/editor-decoration-style.js.map +0 -1
  12. package/lib/browser/decorations/editor-decoration.d.ts +0 -119
  13. package/lib/browser/decorations/editor-decoration.d.ts.map +0 -1
  14. package/lib/browser/decorations/editor-decoration.js +0 -38
  15. package/lib/browser/decorations/editor-decoration.js.map +0 -1
  16. package/lib/browser/decorations/editor-decorator.d.ts +0 -7
  17. package/lib/browser/decorations/editor-decorator.d.ts.map +0 -1
  18. package/lib/browser/decorations/editor-decorator.js +0 -39
  19. package/lib/browser/decorations/editor-decorator.js.map +0 -1
  20. package/lib/browser/decorations/index.d.ts +0 -4
  21. package/lib/browser/decorations/index.d.ts.map +0 -1
  22. package/lib/browser/decorations/index.js +0 -22
  23. package/lib/browser/decorations/index.js.map +0 -1
  24. package/lib/browser/diff-navigator.d.ts +0 -10
  25. package/lib/browser/diff-navigator.d.ts.map +0 -1
  26. package/lib/browser/diff-navigator.js +0 -20
  27. package/lib/browser/diff-navigator.js.map +0 -1
  28. package/lib/browser/editor-command.d.ts +0 -102
  29. package/lib/browser/editor-command.d.ts.map +0 -1
  30. package/lib/browser/editor-command.js +0 -402
  31. package/lib/browser/editor-command.js.map +0 -1
  32. package/lib/browser/editor-contribution.d.ts +0 -30
  33. package/lib/browser/editor-contribution.d.ts.map +0 -1
  34. package/lib/browser/editor-contribution.js +0 -206
  35. package/lib/browser/editor-contribution.js.map +0 -1
  36. package/lib/browser/editor-frontend-module.d.ts +0 -6
  37. package/lib/browser/editor-frontend-module.d.ts.map +0 -1
  38. package/lib/browser/editor-frontend-module.js +0 -83
  39. package/lib/browser/editor-frontend-module.js.map +0 -1
  40. package/lib/browser/editor-keybinding.d.ts +0 -6
  41. package/lib/browser/editor-keybinding.d.ts.map +0 -1
  42. package/lib/browser/editor-keybinding.js +0 -51
  43. package/lib/browser/editor-keybinding.js.map +0 -1
  44. package/lib/browser/editor-language-quick-pick-service.d.ts +0 -12
  45. package/lib/browser/editor-language-quick-pick-service.d.ts.map +0 -1
  46. package/lib/browser/editor-language-quick-pick-service.js +0 -77
  47. package/lib/browser/editor-language-quick-pick-service.js.map +0 -1
  48. package/lib/browser/editor-linenumber-contribution.d.ts +0 -16
  49. package/lib/browser/editor-linenumber-contribution.d.ts.map +0 -1
  50. package/lib/browser/editor-linenumber-contribution.js +0 -89
  51. package/lib/browser/editor-linenumber-contribution.js.map +0 -1
  52. package/lib/browser/editor-manager.d.ts +0 -135
  53. package/lib/browser/editor-manager.d.ts.map +0 -1
  54. package/lib/browser/editor-manager.js +0 -472
  55. package/lib/browser/editor-manager.js.map +0 -1
  56. package/lib/browser/editor-menu.d.ts +0 -51
  57. package/lib/browser/editor-menu.d.ts.map +0 -1
  58. package/lib/browser/editor-menu.js +0 -208
  59. package/lib/browser/editor-menu.js.map +0 -1
  60. package/lib/browser/editor-navigation-contribution.d.ts +0 -68
  61. package/lib/browser/editor-navigation-contribution.d.ts.map +0 -1
  62. package/lib/browser/editor-navigation-contribution.js +0 -324
  63. package/lib/browser/editor-navigation-contribution.js.map +0 -1
  64. package/lib/browser/editor-variable-contribution.d.ts +0 -9
  65. package/lib/browser/editor-variable-contribution.d.ts.map +0 -1
  66. package/lib/browser/editor-variable-contribution.js +0 -65
  67. package/lib/browser/editor-variable-contribution.js.map +0 -1
  68. package/lib/browser/editor-widget-factory.d.ts +0 -18
  69. package/lib/browser/editor-widget-factory.d.ts.map +0 -1
  70. package/lib/browser/editor-widget-factory.js +0 -84
  71. package/lib/browser/editor-widget-factory.js.map +0 -1
  72. package/lib/browser/editor-widget.d.ts +0 -28
  73. package/lib/browser/editor-widget.d.ts.map +0 -1
  74. package/lib/browser/editor-widget.js +0 -130
  75. package/lib/browser/editor-widget.js.map +0 -1
  76. package/lib/browser/editor.d.ts +0 -311
  77. package/lib/browser/editor.d.ts.map +0 -1
  78. package/lib/browser/editor.js +0 -104
  79. package/lib/browser/editor.js.map +0 -1
  80. package/lib/browser/index.d.ts +0 -10
  81. package/lib/browser/index.d.ts.map +0 -1
  82. package/lib/browser/index.js +0 -28
  83. package/lib/browser/index.js.map +0 -1
  84. package/lib/browser/language-status/editor-language-status-service.d.ts +0 -78
  85. package/lib/browser/language-status/editor-language-status-service.d.ts.map +0 -1
  86. package/lib/browser/language-status/editor-language-status-service.js +0 -244
  87. package/lib/browser/language-status/editor-language-status-service.js.map +0 -1
  88. package/lib/browser/navigation/navigation-location-service.d.ts +0 -132
  89. package/lib/browser/navigation/navigation-location-service.d.ts.map +0 -1
  90. package/lib/browser/navigation/navigation-location-service.js +0 -352
  91. package/lib/browser/navigation/navigation-location-service.js.map +0 -1
  92. package/lib/browser/navigation/navigation-location-service.spec.d.ts +0 -2
  93. package/lib/browser/navigation/navigation-location-service.spec.d.ts.map +0 -1
  94. package/lib/browser/navigation/navigation-location-service.spec.js +0 -185
  95. package/lib/browser/navigation/navigation-location-service.spec.js.map +0 -1
  96. package/lib/browser/navigation/navigation-location-similarity.d.ts +0 -16
  97. package/lib/browser/navigation/navigation-location-similarity.d.ts.map +0 -1
  98. package/lib/browser/navigation/navigation-location-similarity.js +0 -58
  99. package/lib/browser/navigation/navigation-location-similarity.js.map +0 -1
  100. package/lib/browser/navigation/navigation-location-similarity.spec.d.ts +0 -2
  101. package/lib/browser/navigation/navigation-location-similarity.spec.d.ts.map +0 -1
  102. package/lib/browser/navigation/navigation-location-similarity.spec.js +0 -33
  103. package/lib/browser/navigation/navigation-location-similarity.spec.js.map +0 -1
  104. package/lib/browser/navigation/navigation-location-updater.d.ts +0 -36
  105. package/lib/browser/navigation/navigation-location-updater.d.ts.map +0 -1
  106. package/lib/browser/navigation/navigation-location-updater.js +0 -206
  107. package/lib/browser/navigation/navigation-location-updater.js.map +0 -1
  108. package/lib/browser/navigation/navigation-location-updater.spec.d.ts +0 -2
  109. package/lib/browser/navigation/navigation-location-updater.spec.d.ts.map +0 -1
  110. package/lib/browser/navigation/navigation-location-updater.spec.js +0 -178
  111. package/lib/browser/navigation/navigation-location-updater.spec.js.map +0 -1
  112. package/lib/browser/navigation/navigation-location.d.ts +0 -192
  113. package/lib/browser/navigation/navigation-location.d.ts.map +0 -1
  114. package/lib/browser/navigation/navigation-location.js +0 -301
  115. package/lib/browser/navigation/navigation-location.js.map +0 -1
  116. package/lib/browser/navigation/test/mock-navigation-location-updater.d.ts +0 -16
  117. package/lib/browser/navigation/test/mock-navigation-location-updater.d.ts.map +0 -1
  118. package/lib/browser/navigation/test/mock-navigation-location-updater.js +0 -39
  119. package/lib/browser/navigation/test/mock-navigation-location-updater.js.map +0 -1
  120. package/lib/browser/quick-editor-service.d.ts +0 -17
  121. package/lib/browser/quick-editor-service.d.ts.map +0 -1
  122. package/lib/browser/quick-editor-service.js +0 -102
  123. package/lib/browser/quick-editor-service.js.map +0 -1
  124. package/lib/browser/undo-redo-service.d.ts +0 -24
  125. package/lib/browser/undo-redo-service.d.ts.map +0 -1
  126. package/lib/browser/undo-redo-service.js +0 -106
  127. package/lib/browser/undo-redo-service.js.map +0 -1
  128. package/lib/common/editor-generated-preference-schema.d.ts +0 -303
  129. package/lib/common/editor-generated-preference-schema.d.ts.map +0 -1
  130. package/lib/common/editor-generated-preference-schema.js +0 -2666
  131. package/lib/common/editor-generated-preference-schema.js.map +0 -1
  132. package/lib/common/editor-preferences.d.ts +0 -42
  133. package/lib/common/editor-preferences.d.ts.map +0 -1
  134. package/lib/common/editor-preferences.js +0 -179
  135. package/lib/common/editor-preferences.js.map +0 -1
  136. package/lib/common/language-selector.d.ts +0 -14
  137. package/lib/common/language-selector.d.ts.map +0 -1
  138. package/lib/common/language-selector.js +0 -91
  139. package/lib/common/language-selector.js.map +0 -1
  140. package/lib/node/editor-backend-module.d.ts +0 -4
  141. package/lib/node/editor-backend-module.d.ts.map +0 -1
  142. package/lib/node/editor-backend-module.js +0 -23
  143. package/lib/node/editor-backend-module.js.map +0 -1
  144. package/lib/package.spec.d.ts +0 -1
  145. package/lib/package.spec.d.ts.map +0 -1
  146. package/lib/package.spec.js +0 -26
  147. package/lib/package.spec.js.map +0 -1
@@ -1,206 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2017 TypeFox 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
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.EditorContribution = void 0;
19
- const tslib_1 = require("tslib");
20
- const editor_manager_1 = require("./editor-manager");
21
- const inversify_1 = require("@theia/core/shared/inversify");
22
- const status_bar_1 = require("@theia/core/lib/browser/status-bar/status-bar");
23
- const browser_1 = require("@theia/core/lib/browser");
24
- const context_key_service_1 = require("@theia/core/lib/browser/context-key-service");
25
- const core_1 = require("@theia/core");
26
- const editor_command_1 = require("./editor-command");
27
- const supported_encodings_1 = require("@theia/core/lib/common/supported-encodings");
28
- const nls_1 = require("@theia/core/lib/common/nls");
29
- const current_widget_command_adapter_1 = require("@theia/core/lib/browser/shell/current-widget-command-adapter");
30
- const editor_widget_1 = require("./editor-widget");
31
- const editor_language_status_service_1 = require("./language-status/editor-language-status-service");
32
- const quick_editor_service_1 = require("./quick-editor-service");
33
- let EditorContribution = class EditorContribution {
34
- constructor() {
35
- this.toDisposeOnCurrentEditorChanged = new core_1.DisposableCollection();
36
- }
37
- onStart() {
38
- this.initEditorContextKeys();
39
- this.openWithService.registerHandler({
40
- id: 'default',
41
- label: this.editorManager.label,
42
- providerName: nls_1.nls.localizeByDefault('Built-in'),
43
- canHandle: () => 100,
44
- // Higher priority than any other handler
45
- // so that the text editor always appears first in the quick pick
46
- getOrder: () => 10000,
47
- open: uri => this.editorManager.open(uri)
48
- });
49
- }
50
- initEditorContextKeys() {
51
- const editorIsOpen = this.contextKeyService.createKey('editorIsOpen', false);
52
- const textCompareEditorVisible = this.contextKeyService.createKey('textCompareEditorVisible', false);
53
- const updateContextKeys = () => {
54
- const widgets = this.editorManager.all;
55
- editorIsOpen.set(!!widgets.length);
56
- textCompareEditorVisible.set(widgets.some(widget => browser_1.DiffUris.isDiffUri(widget.editor.uri)));
57
- };
58
- updateContextKeys();
59
- for (const widget of this.editorManager.all) {
60
- widget.disposed.connect(updateContextKeys);
61
- }
62
- this.editorManager.onCreated(widget => {
63
- updateContextKeys();
64
- widget.disposed.connect(updateContextKeys);
65
- });
66
- }
67
- canHandle(widget) {
68
- return widget instanceof editor_widget_1.EditorWidget;
69
- }
70
- activate(statusBar, widget) {
71
- this.toDisposeOnCurrentEditorChanged.dispose();
72
- const editor = widget.editor;
73
- this.updateLanguageStatus(statusBar, editor);
74
- this.updateEncodingStatus(statusBar, editor);
75
- this.setCursorPositionStatus(statusBar, editor);
76
- this.toDisposeOnCurrentEditorChanged.pushAll([
77
- editor.onLanguageChanged(() => this.updateLanguageStatus(statusBar, editor)),
78
- editor.onEncodingChanged(() => this.updateEncodingStatus(statusBar, editor)),
79
- editor.onCursorPositionChanged(() => this.setCursorPositionStatus(statusBar, editor))
80
- ]);
81
- }
82
- deactivate(statusBar) {
83
- this.toDisposeOnCurrentEditorChanged.dispose();
84
- this.updateLanguageStatus(statusBar, undefined);
85
- this.updateEncodingStatus(statusBar, undefined);
86
- this.setCursorPositionStatus(statusBar, undefined);
87
- }
88
- updateLanguageStatus(statusBar, editor) {
89
- this.languageStatusService.updateLanguageStatus(editor);
90
- }
91
- updateEncodingStatus(statusBar, editor) {
92
- if (!editor) {
93
- statusBar.removeElement('editor-status-encoding');
94
- return;
95
- }
96
- statusBar.setElement('editor-status-encoding', {
97
- text: supported_encodings_1.SUPPORTED_ENCODINGS[editor.getEncoding()].labelShort,
98
- alignment: status_bar_1.StatusBarAlignment.RIGHT,
99
- priority: 10,
100
- command: editor_command_1.EditorCommands.CHANGE_ENCODING.id,
101
- tooltip: nls_1.nls.localizeByDefault('Select Encoding')
102
- });
103
- }
104
- setCursorPositionStatus(statusBar, editor) {
105
- if (!editor) {
106
- statusBar.removeElement('editor-status-cursor-position');
107
- return;
108
- }
109
- const { cursor } = editor;
110
- statusBar.setElement('editor-status-cursor-position', {
111
- text: nls_1.nls.localizeByDefault('Ln {0}, Col {1}', cursor.line + 1, editor.getVisibleColumn(cursor)),
112
- alignment: status_bar_1.StatusBarAlignment.RIGHT,
113
- priority: 100,
114
- tooltip: editor_command_1.EditorCommands.GOTO_LINE_COLUMN.label,
115
- command: editor_command_1.EditorCommands.GOTO_LINE_COLUMN.id
116
- });
117
- }
118
- registerCommands(commands) {
119
- commands.registerCommand(editor_command_1.EditorCommands.SHOW_ALL_OPENED_EDITORS, {
120
- execute: () => { var _a; return (_a = this.quickInputService) === null || _a === void 0 ? void 0 : _a.open(quick_editor_service_1.QuickEditorService.PREFIX); }
121
- });
122
- const splitHandlerFactory = (splitMode) => new current_widget_command_adapter_1.CurrentWidgetCommandAdapter(this.shell, {
123
- isEnabled: title => (title === null || title === void 0 ? void 0 : title.owner) instanceof editor_widget_1.EditorWidget,
124
- execute: async (title) => {
125
- if ((title === null || title === void 0 ? void 0 : title.owner) instanceof editor_widget_1.EditorWidget) {
126
- const selection = title.owner.editor.selection;
127
- const newEditor = await this.editorManager.openToSide(title.owner.editor.uri, { selection, widgetOptions: { mode: splitMode, ref: title.owner } });
128
- const oldEditorState = title.owner.editor.storeViewState();
129
- newEditor.editor.restoreViewState(oldEditorState);
130
- }
131
- }
132
- });
133
- commands.registerCommand(editor_command_1.EditorCommands.SPLIT_EDITOR_HORIZONTAL, splitHandlerFactory('split-right'));
134
- commands.registerCommand(editor_command_1.EditorCommands.SPLIT_EDITOR_VERTICAL, splitHandlerFactory('split-bottom'));
135
- commands.registerCommand(editor_command_1.EditorCommands.SPLIT_EDITOR_RIGHT, splitHandlerFactory('split-right'));
136
- commands.registerCommand(editor_command_1.EditorCommands.SPLIT_EDITOR_DOWN, splitHandlerFactory('split-bottom'));
137
- commands.registerCommand(editor_command_1.EditorCommands.SPLIT_EDITOR_UP, splitHandlerFactory('split-top'));
138
- commands.registerCommand(editor_command_1.EditorCommands.SPLIT_EDITOR_LEFT, splitHandlerFactory('split-left'));
139
- }
140
- registerKeybindings(keybindings) {
141
- keybindings.registerKeybinding({
142
- command: editor_command_1.EditorCommands.SHOW_ALL_OPENED_EDITORS.id,
143
- keybinding: 'ctrlcmd+k ctrlcmd+p'
144
- });
145
- keybindings.registerKeybinding({
146
- command: editor_command_1.EditorCommands.SPLIT_EDITOR_HORIZONTAL.id,
147
- keybinding: 'ctrlcmd+\\',
148
- });
149
- keybindings.registerKeybinding({
150
- command: editor_command_1.EditorCommands.SPLIT_EDITOR_VERTICAL.id,
151
- keybinding: 'ctrlcmd+k ctrlcmd+\\',
152
- });
153
- }
154
- registerMenus(registry) {
155
- registry.registerMenuAction(browser_1.SHELL_TABBAR_CONTEXT_SPLIT, {
156
- commandId: editor_command_1.EditorCommands.SPLIT_EDITOR_UP.id,
157
- label: nls_1.nls.localizeByDefault('Split Up'),
158
- order: '1',
159
- });
160
- registry.registerMenuAction(browser_1.SHELL_TABBAR_CONTEXT_SPLIT, {
161
- commandId: editor_command_1.EditorCommands.SPLIT_EDITOR_DOWN.id,
162
- label: nls_1.nls.localizeByDefault('Split Down'),
163
- order: '2',
164
- });
165
- registry.registerMenuAction(browser_1.SHELL_TABBAR_CONTEXT_SPLIT, {
166
- commandId: editor_command_1.EditorCommands.SPLIT_EDITOR_LEFT.id,
167
- label: nls_1.nls.localizeByDefault('Split Left'),
168
- order: '3',
169
- });
170
- registry.registerMenuAction(browser_1.SHELL_TABBAR_CONTEXT_SPLIT, {
171
- commandId: editor_command_1.EditorCommands.SPLIT_EDITOR_RIGHT.id,
172
- label: nls_1.nls.localizeByDefault('Split Right'),
173
- order: '4',
174
- });
175
- }
176
- };
177
- exports.EditorContribution = EditorContribution;
178
- tslib_1.__decorate([
179
- (0, inversify_1.inject)(editor_manager_1.EditorManager),
180
- tslib_1.__metadata("design:type", editor_manager_1.EditorManager)
181
- ], EditorContribution.prototype, "editorManager", void 0);
182
- tslib_1.__decorate([
183
- (0, inversify_1.inject)(browser_1.OpenWithService),
184
- tslib_1.__metadata("design:type", browser_1.OpenWithService)
185
- ], EditorContribution.prototype, "openWithService", void 0);
186
- tslib_1.__decorate([
187
- (0, inversify_1.inject)(editor_language_status_service_1.EditorLanguageStatusService),
188
- tslib_1.__metadata("design:type", editor_language_status_service_1.EditorLanguageStatusService)
189
- ], EditorContribution.prototype, "languageStatusService", void 0);
190
- tslib_1.__decorate([
191
- (0, inversify_1.inject)(browser_1.ApplicationShell),
192
- tslib_1.__metadata("design:type", browser_1.ApplicationShell)
193
- ], EditorContribution.prototype, "shell", void 0);
194
- tslib_1.__decorate([
195
- (0, inversify_1.inject)(context_key_service_1.ContextKeyService),
196
- tslib_1.__metadata("design:type", Object)
197
- ], EditorContribution.prototype, "contextKeyService", void 0);
198
- tslib_1.__decorate([
199
- (0, inversify_1.inject)(browser_1.QuickInputService),
200
- (0, inversify_1.optional)(),
201
- tslib_1.__metadata("design:type", Object)
202
- ], EditorContribution.prototype, "quickInputService", void 0);
203
- exports.EditorContribution = EditorContribution = tslib_1.__decorate([
204
- (0, inversify_1.injectable)()
205
- ], EditorContribution);
206
- //# sourceMappingURL=editor-contribution.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"editor-contribution.js","sourceRoot":"","sources":["../../src/browser/editor-contribution.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAEhF,qDAAiD;AAEjD,4DAA4E;AAC5E,8EAA8F;AAC9F,qDAMiC;AACjC,qFAAgF;AAChF,sCAAwG;AACxG,qDAAkD;AAElD,oFAAiF;AACjF,oDAAiD;AACjD,iHAA2G;AAC3G,mDAA+C;AAC/C,qGAA+F;AAC/F,iEAA4D;AAGrD,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAAxB;QA8CgB,oCAA+B,GAAG,IAAI,2BAAoB,EAAE,CAAC;IAuHpF,CAAC;IAvJG,OAAO;QACH,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAC7B,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC;YACjC,EAAE,EAAE,SAAS;YACb,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,KAAK;YAC/B,YAAY,EAAE,SAAG,CAAC,iBAAiB,CAAC,UAAU,CAAC;YAC/C,SAAS,EAAE,GAAG,EAAE,CAAC,GAAG;YACpB,yCAAyC;YACzC,iEAAiE;YACjE,QAAQ,EAAE,GAAG,EAAE,CAAC,KAAK;YACrB,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC;SAC5C,CAAC,CAAC;IACP,CAAC;IAES,qBAAqB;QAC3B,MAAM,YAAY,GAA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AM,EAAC,yBAAe,CAAC;sCAAqC,yBAAe;2DAAC;AACrB;IAAvD,IAAA,kBAAM,EAAC,4DAA2B,CAAC;sCAA2C,4DAA2B;iEAAC;AAC9D;IAA5C,IAAA,kBAAM,EAAC,0BAAgB,CAAC;sCAA2B,0BAAgB;iDAAC;AAGlD;IADlB,IAAA,kBAAM,EAAC,uCAAiB,CAAC;;6DAC8B;AAGrC;IADlB,IAAA,kBAAM,EAAC,2BAAiB,CAAC;IAAE,IAAA,oBAAQ,GAAE;;6DACkB;6BAZ/C,kBAAkB;IAD9B,IAAA,sBAAU,GAAE;GACA,kBAAkB,CAqK9B"}
@@ -1,6 +0,0 @@
1
- import '../../src/browser/style/index.css';
2
- import '../../src/browser/language-status/editor-language-status.css';
3
- import { ContainerModule } from '@theia/core/shared/inversify';
4
- declare const _default: ContainerModule;
5
- export default _default;
6
- //# sourceMappingURL=editor-frontend-module.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"editor-frontend-module.d.ts","sourceRoot":"","sources":["../../src/browser/editor-frontend-module.ts"],"names":[],"mappings":"AAgBA,OAAO,mCAAmC,CAAC;AAC3C,OAAO,8DAA8D,CAAC;AAEtE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;;AAuB/D,wBAsDG"}
@@ -1,83 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2018 TypeFox 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
- Object.defineProperty(exports, "__esModule", { value: true });
18
- require("../../src/browser/style/index.css");
19
- require("../../src/browser/language-status/editor-language-status.css");
20
- const inversify_1 = require("@theia/core/shared/inversify");
21
- const common_1 = require("@theia/core/lib/common");
22
- const browser_1 = require("@theia/core/lib/browser");
23
- const browser_2 = require("@theia/variable-resolver/lib/browser");
24
- const editor_manager_1 = require("./editor-manager");
25
- const editor_contribution_1 = require("./editor-contribution");
26
- const editor_menu_1 = require("./editor-menu");
27
- const editor_command_1 = require("./editor-command");
28
- const editor_keybinding_1 = require("./editor-keybinding");
29
- const editor_preferences_1 = require("../common/editor-preferences");
30
- const editor_widget_factory_1 = require("./editor-widget-factory");
31
- const editor_navigation_contribution_1 = require("./editor-navigation-contribution");
32
- const navigation_location_updater_1 = require("./navigation/navigation-location-updater");
33
- const navigation_location_service_1 = require("./navigation/navigation-location-service");
34
- const navigation_location_similarity_1 = require("./navigation/navigation-location-similarity");
35
- const editor_variable_contribution_1 = require("./editor-variable-contribution");
36
- const quick_access_1 = require("@theia/core/lib/browser/quick-input/quick-access");
37
- const quick_editor_service_1 = require("./quick-editor-service");
38
- const editor_language_status_service_1 = require("./language-status/editor-language-status-service");
39
- const editor_linenumber_contribution_1 = require("./editor-linenumber-contribution");
40
- const undo_redo_service_1 = require("./undo-redo-service");
41
- const editor_language_quick_pick_service_1 = require("./editor-language-quick-pick-service");
42
- exports.default = new inversify_1.ContainerModule(bind => {
43
- (0, editor_preferences_1.bindEditorPreferences)(bind);
44
- bind(editor_widget_factory_1.EditorWidgetFactory).toSelf().inSingletonScope();
45
- bind(browser_1.WidgetFactory).toService(editor_widget_factory_1.EditorWidgetFactory);
46
- bind(editor_manager_1.EditorManager).toSelf().inSingletonScope();
47
- bind(browser_1.OpenHandler).toService(editor_manager_1.EditorManager);
48
- (0, common_1.bindContributionProvider)(bind, editor_manager_1.EditorSelectionResolver);
49
- bind(editor_command_1.EditorCommandContribution).toSelf().inSingletonScope();
50
- bind(common_1.CommandContribution).toService(editor_command_1.EditorCommandContribution);
51
- bind(editor_menu_1.EditorMenuContribution).toSelf().inSingletonScope();
52
- bind(common_1.MenuContribution).toService(editor_menu_1.EditorMenuContribution);
53
- bind(editor_keybinding_1.EditorKeybindingContribution).toSelf().inSingletonScope();
54
- bind(browser_1.KeybindingContribution).toService(editor_keybinding_1.EditorKeybindingContribution);
55
- bind(editor_contribution_1.EditorContribution).toSelf().inSingletonScope();
56
- bind(editor_language_status_service_1.EditorLanguageStatusService).toSelf().inSingletonScope();
57
- bind(editor_linenumber_contribution_1.EditorLineNumberContribution).toSelf().inSingletonScope();
58
- bind(browser_1.FrontendApplicationContribution).toService(editor_linenumber_contribution_1.EditorLineNumberContribution);
59
- bind(editor_navigation_contribution_1.EditorNavigationContribution).toSelf().inSingletonScope();
60
- bind(browser_1.FrontendApplicationContribution).toService(editor_navigation_contribution_1.EditorNavigationContribution);
61
- bind(navigation_location_service_1.NavigationLocationService).toSelf().inSingletonScope();
62
- bind(navigation_location_updater_1.NavigationLocationUpdater).toSelf().inSingletonScope();
63
- bind(navigation_location_similarity_1.NavigationLocationSimilarity).toSelf().inSingletonScope();
64
- bind(browser_2.VariableContribution).to(editor_variable_contribution_1.EditorVariableContribution).inSingletonScope();
65
- [
66
- browser_1.FrontendApplicationContribution,
67
- browser_1.WidgetStatusBarContribution,
68
- common_1.CommandContribution,
69
- browser_1.KeybindingContribution,
70
- common_1.MenuContribution
71
- ].forEach(serviceIdentifier => {
72
- bind(serviceIdentifier).toService(editor_contribution_1.EditorContribution);
73
- });
74
- bind(quick_editor_service_1.QuickEditorService).toSelf().inSingletonScope();
75
- bind(quick_access_1.QuickAccessContribution).to(quick_editor_service_1.QuickEditorService);
76
- bind(editor_manager_1.CurrentEditorAccess).toSelf().inSingletonScope();
77
- bind(editor_manager_1.ActiveEditorAccess).toSelf().inSingletonScope();
78
- bind(editor_manager_1.EditorAccess).to(editor_manager_1.CurrentEditorAccess).inSingletonScope().whenTargetNamed(editor_manager_1.EditorAccess.CURRENT);
79
- bind(editor_manager_1.EditorAccess).to(editor_manager_1.ActiveEditorAccess).inSingletonScope().whenTargetNamed(editor_manager_1.EditorAccess.ACTIVE);
80
- bind(undo_redo_service_1.UndoRedoService).toSelf().inSingletonScope();
81
- bind(editor_language_quick_pick_service_1.EditorLanguageQuickPickService).toSelf().inSingletonScope();
82
- });
83
- //# sourceMappingURL=editor-frontend-module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"editor-frontend-module.js","sourceRoot":"","sources":["../../src/browser/editor-frontend-module.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;AAEhF,6CAA2C;AAC3C,wEAAsE;AAEtE,4DAA+D;AAC/D,mDAAyG;AACzG,qDAA2J;AAC3J,kEAA4E;AAC5E,qDAAiI;AACjI,+DAA2D;AAC3D,+CAAuD;AACvD,qDAA6D;AAC7D,2DAAmE;AACnE,qEAAqE;AACrE,mEAA8D;AAC9D,qFAAgF;AAChF,0FAAqF;AACrF,0FAAqF;AACrF,gGAA2F;AAC3F,iFAA4E;AAC5E,mFAA2F;AAC3F,iEAA4D;AAC5D,qGAA+F;AAC/F,qFAAgF;AAChF,2DAAsD;AACtD,6FAAsF;AAEtF,kBAAe,IAAI,2BAAe,CAAC,IAAI,CAAC,EAAE;IACtC,IAAA,0CAAqB,EAAC,IAAI,CAAC,CAAC;IAE5B,IAAI,CAAC,2CAAmB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACtD,IAAI,CAAC,uBAAa,CAAC,CAAC,SAAS,CAAC,2CAAmB,CAAC,CAAC;IAEnD,IAAI,CAAC,8BAAa,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAChD,I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,CAAC,gBAAgB,EAAE,CAAC;IAE/D,IAAI,CAAC,8BAAoB,CAAC,CAAC,EAAE,CAAC,yDAA0B,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAE7E;QACI,yCAA+B;QAC/B,qCAA2B;QAC3B,4BAAmB;QACnB,gCAAsB;QACtB,yBAAgB;KACnB,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE;QAC1B,IAAI,CAAC,iBAAiB,CAAC,CAAC,SAAS,CAAC,wCAAkB,CAAC,CAAC;IAC1D,CAAC,CAAC,CAAC;IACH,IAAI,CAAC,yCAAkB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACrD,IAAI,CAAC,sCAAuB,CAAC,CAAC,EAAE,CAAC,yCAAkB,CAAC,CAAC;IAErD,IAAI,CAAC,oCAAmB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACtD,IAAI,CAAC,mCAAkB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACrD,IAAI,CAAC,6BAAY,CAAC,CAAC,EAAE,CAAC,oCAAmB,CAAC,CAAC,gBAAgB,EAAE,CAAC,eAAe,CAAC,6BAAY,CAAC,OAAO,CAAC,CAAC;IACpG,IAAI,CAAC,6BAAY,CAAC,CAAC,EAAE,CAAC,mCAAkB,CAAC,CAAC,gBAAgB,EAAE,CAAC,eAAe,CAAC,6BAAY,CAAC,MAAM,CAAC,CAAC;IAElG,IAAI,CAAC,mCAAe,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAElD,IAAI,CAAC,mEAA8B,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;AACrE,CAAC,CAAC,CAAC"}
@@ -1,6 +0,0 @@
1
- import { KeybindingContribution, KeybindingRegistry } from '@theia/core/lib/browser/keybinding';
2
- export declare class EditorKeybindingContribution implements KeybindingContribution {
3
- registerKeybindings(registry: KeybindingRegistry): void;
4
- private isElectron;
5
- }
6
- //# sourceMappingURL=editor-keybinding.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"editor-keybinding.d.ts","sourceRoot":"","sources":["../../src/browser/editor-keybinding.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAGhG,qBACa,4BAA6B,YAAW,sBAAsB;IAEvE,mBAAmB,CAAC,QAAQ,EAAE,kBAAkB,GAAG,IAAI;IAyBvD,OAAO,CAAC,UAAU;CAIrB"}
@@ -1,51 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2018 TypeFox 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
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.EditorKeybindingContribution = void 0;
19
- const tslib_1 = require("tslib");
20
- const inversify_1 = require("@theia/core/shared/inversify");
21
- const environment_1 = require("@theia/core/shared/@theia/application-package/lib/environment");
22
- const os_1 = require("@theia/core/lib/common/os");
23
- const editor_command_1 = require("./editor-command");
24
- let EditorKeybindingContribution = class EditorKeybindingContribution {
25
- registerKeybindings(registry) {
26
- registry.registerKeybindings({
27
- command: editor_command_1.EditorCommands.GO_BACK.id,
28
- keybinding: os_1.isOSX ? 'ctrl+-' : os_1.isWindows ? 'alt+left' : /* isLinux */ 'ctrl+alt+-'
29
- }, {
30
- command: editor_command_1.EditorCommands.GO_FORWARD.id,
31
- keybinding: os_1.isOSX ? 'ctrl+shift+-' : os_1.isWindows ? 'alt+right' : /* isLinux */ 'ctrl+shift+-'
32
- }, {
33
- command: editor_command_1.EditorCommands.GO_LAST_EDIT.id,
34
- keybinding: 'ctrl+alt+q'
35
- }, {
36
- command: editor_command_1.EditorCommands.TOGGLE_WORD_WRAP.id,
37
- keybinding: 'alt+z'
38
- }, {
39
- command: editor_command_1.EditorCommands.REOPEN_CLOSED_EDITOR.id,
40
- keybinding: this.isElectron() ? 'ctrlcmd+shift+t' : 'alt+shift+t'
41
- });
42
- }
43
- isElectron() {
44
- return environment_1.environment.electron.is();
45
- }
46
- };
47
- exports.EditorKeybindingContribution = EditorKeybindingContribution;
48
- exports.EditorKeybindingContribution = EditorKeybindingContribution = tslib_1.__decorate([
49
- (0, inversify_1.injectable)()
50
- ], EditorKeybindingContribution);
51
- //# sourceMappingURL=editor-keybinding.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"editor-keybinding.js","sourceRoot":"","sources":["../../src/browser/editor-keybinding.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAEhF,4DAA0D;AAC1D,+FAA4F;AAC5F,kDAA6D;AAE7D,qDAAkD;AAG3C,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IAErC,mBAAmB,CAAC,QAA4B;QAC5C,QAAQ,CAAC,mBAAmB,CACxB;YACI,OAAO,EAAE,+BAAc,CAAC,OAAO,CAAC,EAAE;YAClC,UAAU,EAAE,UAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,cAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,aAAa,CAAC,YAAY;SACrF,EACD;YACI,OAAO,EAAE,+BAAc,CAAC,UAAU,CAAC,EAAE;YACrC,UAAU,EAAE,UAAK,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,cAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,aAAa,CAAC,cAAc;SAC9F,EACD;YACI,OAAO,EAAE,+BAAc,CAAC,YAAY,CAAC,EAAE;YACvC,UAAU,EAAE,YAAY;SAC3B,EACD;YACI,OAAO,EAAE,+BAAc,CAAC,gBAAgB,CAAC,EAAE;YAC3C,UAAU,EAAE,OAAO;SACtB,EACD;YACI,OAAO,EAAE,+BAAc,CAAC,oBAAoB,CAAC,EAAE;YAC/C,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,aAAa;SACpE,CACJ,CAAC;IACN,CAAC;IAEO,UAAU;QACd,OAAO,yBAAW,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;IACrC,CAAC;CAEJ,CAAA;AA/BY,oEAA4B;uCAA5B,4BAA4B;IADxC,IAAA,sBAAU,GAAE;GACA,4BAA4B,CA+BxC"}
@@ -1,12 +0,0 @@
1
- import { Language, LanguageService } from '@theia/core/lib/browser/language-service';
2
- import { QuickInputService, QuickPickValue, URI } from '@theia/core';
3
- import { LabelProvider } from '@theia/core/lib/browser';
4
- export declare class EditorLanguageQuickPickService {
5
- protected readonly languages: LanguageService;
6
- protected readonly quickInputService: QuickInputService;
7
- protected readonly labelProvider: LabelProvider;
8
- pickEditorLanguage(current: string): Promise<QuickPickValue<'autoDetect' | Language> | undefined>;
9
- protected toQuickPickLanguage(value: Language, current: string): QuickPickValue<Language>;
10
- protected toLanguageUri(language: Language): URI;
11
- }
12
- //# sourceMappingURL=editor-language-quick-pick-service.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"editor-language-quick-pick-service.d.ts","sourceRoot":"","sources":["../../src/browser/editor-language-quick-pick-service.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAO,iBAAiB,EAA4B,cAAc,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AACpG,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,qBACa,8BAA8B;IAEvC,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC;IAG9C,SAAS,CAAC,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAGxD,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IAE1C,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,YAAY,GAAG,QAAQ,CAAC,GAAG,SAAS,CAAC;IAUvG,SAAS,CAAC,mBAAmB,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,GAAG,cAAc,CAAC,QAAQ,CAAC;IAgBzF,SAAS,CAAC,aAAa,CAAC,QAAQ,EAAE,QAAQ,GAAG,GAAG;CAYnD"}
@@ -1,77 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2024 TypeFox 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
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.EditorLanguageQuickPickService = void 0;
19
- const tslib_1 = require("tslib");
20
- const inversify_1 = require("@theia/core/shared/inversify");
21
- const language_service_1 = require("@theia/core/lib/browser/language-service");
22
- const core_1 = require("@theia/core");
23
- const browser_1 = require("@theia/core/lib/browser");
24
- let EditorLanguageQuickPickService = class EditorLanguageQuickPickService {
25
- async pickEditorLanguage(current) {
26
- var _a;
27
- const items = [
28
- { label: core_1.nls.localizeByDefault('Auto Detect'), value: 'autoDetect' },
29
- { type: 'separator', label: core_1.nls.localizeByDefault('languages (identifier)') },
30
- ...(this.languages.languages.map(language => this.toQuickPickLanguage(language, current))).sort((e, e2) => e.label.localeCompare(e2.label))
31
- ];
32
- const selectedMode = await ((_a = this.quickInputService) === null || _a === void 0 ? void 0 : _a.showQuickPick(items, { placeholder: core_1.nls.localizeByDefault('Select Language Mode') }));
33
- return (selectedMode && 'value' in selectedMode) ? selectedMode : undefined;
34
- }
35
- toQuickPickLanguage(value, current) {
36
- const languageUri = this.toLanguageUri(value);
37
- const iconClasses = this.labelProvider.getIcon(languageUri).split(' ').filter(v => v.length > 0);
38
- if (iconClasses.length > 0) {
39
- iconClasses.push('file-icon');
40
- }
41
- const configured = current === value.id;
42
- return {
43
- value,
44
- label: value.name,
45
- description: core_1.nls.localizeByDefault(`({0})${configured ? ' - Configured Language' : ''}`, value.id),
46
- iconClasses
47
- };
48
- }
49
- toLanguageUri(language) {
50
- const extension = language.extensions.values().next();
51
- if (extension.value) {
52
- return new core_1.URI('file:///' + extension.value);
53
- }
54
- const filename = language.filenames.values().next();
55
- if (filename.value) {
56
- return new core_1.URI('file:///' + filename.value);
57
- }
58
- return new core_1.URI('file:///.txt');
59
- }
60
- };
61
- exports.EditorLanguageQuickPickService = EditorLanguageQuickPickService;
62
- tslib_1.__decorate([
63
- (0, inversify_1.inject)(language_service_1.LanguageService),
64
- tslib_1.__metadata("design:type", language_service_1.LanguageService)
65
- ], EditorLanguageQuickPickService.prototype, "languages", void 0);
66
- tslib_1.__decorate([
67
- (0, inversify_1.inject)(core_1.QuickInputService),
68
- tslib_1.__metadata("design:type", Object)
69
- ], EditorLanguageQuickPickService.prototype, "quickInputService", void 0);
70
- tslib_1.__decorate([
71
- (0, inversify_1.inject)(browser_1.LabelProvider),
72
- tslib_1.__metadata("design:type", browser_1.LabelProvider)
73
- ], EditorLanguageQuickPickService.prototype, "labelProvider", void 0);
74
- exports.EditorLanguageQuickPickService = EditorLanguageQuickPickService = tslib_1.__decorate([
75
- (0, inversify_1.injectable)()
76
- ], EditorLanguageQuickPickService);
77
- //# sourceMappingURL=editor-language-quick-pick-service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"editor-language-quick-pick-service.js","sourceRoot":"","sources":["../../src/browser/editor-language-quick-pick-service.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAEhF,4DAAkE;AAClE,+EAAqF;AACrF,sCAAoG;AACpG,qDAAwD;AAGjD,IAAM,8BAA8B,GAApC,MAAM,8BAA8B;IAUvC,KAAK,CAAC,kBAAkB,CAAC,OAAe;;QACpC,MAAM,KAAK,GAA8E;YACrF,EAAE,KAAK,EAAE,UAAG,CAAC,iBAAiB,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE;YACpE,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,UAAG,CAAC,iBAAiB,CAAC,wBAAwB,CAAC,EAAE;YAC7E,GAAI,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;SAC/I,CAAC;QACF,MAA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AM,QAAQ,GAAG,QAAQ,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC;QACpD,IAAI,QAAQ,CAAC,KAAK,EAAE,CAAC;YACjB,OAAO,IAAI,UAAG,CAAC,UAAU,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAChD,CAAC;QACD,OAAO,IAAI,UAAG,CAAC,cAAc,CAAC,CAAC;IACnC,CAAC;CAEJ,CAAA;AAhDY,wEAA8B;AAEpB;IADlB,IAAA,kBAAM,EAAC,kCAAe,CAAC;sCACM,kCAAe;iEAAC;AAG3B;IADlB,IAAA,kBAAM,EAAC,wBAAiB,CAAC;;yEAC8B;AAGrC;IADlB,IAAA,kBAAM,EAAC,uBAAa,CAAC;sCACY,uBAAa;qEAAC;yCARvC,8BAA8B;IAD1C,IAAA,sBAAU,GAAE;GACA,8BAA8B,CAgD1C"}
@@ -1,16 +0,0 @@
1
- import { EditorManager } from './editor-manager';
2
- import { EditorMouseEvent, TextEditor } from './editor';
3
- import { FrontendApplicationContribution, ContextMenuRenderer } from '@theia/core/lib/browser';
4
- import { ContextKeyService } from '@theia/core/lib/browser/context-key-service';
5
- import { MenuPath } from '@theia/core';
6
- import { EditorWidget } from './editor-widget';
7
- export declare const EDITOR_LINENUMBER_CONTEXT_MENU: MenuPath;
8
- export declare class EditorLineNumberContribution implements FrontendApplicationContribution {
9
- protected readonly contextKeyService: ContextKeyService;
10
- protected readonly contextMenuRenderer: ContextMenuRenderer;
11
- protected readonly editorManager: EditorManager;
12
- onStart(): void;
13
- protected addLineNumberContextMenu(editorWidget: EditorWidget): void;
14
- protected handleContextMenu(editor: TextEditor, event: EditorMouseEvent): void;
15
- }
16
- //# sourceMappingURL=editor-linenumber-contribution.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"editor-linenumber-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/editor-linenumber-contribution.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAA6B,UAAU,EAAE,MAAM,UAAU,CAAC;AAEnF,OAAO,EAAE,+BAA+B,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC/F,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAChF,OAAO,EAAoC,QAAQ,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,eAAO,MAAM,8BAA8B,EAAE,QAA6C,CAAC;AAE3F,qBACa,4BAA6B,YAAW,+BAA+B;IAGhF,SAAS,CAAC,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAGxD,SAAS,CAAC,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;IAG5D,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IAEhD,OAAO,IAAI,IAAI;IAIf,SAAS,CAAC,wBAAwB,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI;IAWpE,SAAS,CAAC,iBAAiB,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,gBAAgB,GAAG,IAAI;CA0BjF"}
@@ -1,89 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2023 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
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.EditorLineNumberContribution = exports.EDITOR_LINENUMBER_CONTEXT_MENU = void 0;
19
- const tslib_1 = require("tslib");
20
- const editor_manager_1 = require("./editor-manager");
21
- const editor_1 = require("./editor");
22
- const inversify_1 = require("@theia/core/shared/inversify");
23
- const browser_1 = require("@theia/core/lib/browser");
24
- const context_key_service_1 = require("@theia/core/lib/browser/context-key-service");
25
- const core_1 = require("@theia/core");
26
- exports.EDITOR_LINENUMBER_CONTEXT_MENU = ['editor_linenumber_context_menu'];
27
- let EditorLineNumberContribution = class EditorLineNumberContribution {
28
- onStart() {
29
- this.editorManager.onCreated(editor => this.addLineNumberContextMenu(editor));
30
- }
31
- addLineNumberContextMenu(editorWidget) {
32
- const editor = editorWidget.editor;
33
- if (editor) {
34
- const disposables = new core_1.DisposableCollection();
35
- disposables.push(editor.onMouseDown(event => this.handleContextMenu(editor, event)));
36
- const dispose = () => disposables.dispose();
37
- editorWidget.disposed.connect(dispose);
38
- disposables.push(core_1.Disposable.create(() => editorWidget.disposed.disconnect(dispose)));
39
- }
40
- }
41
- handleContextMenu(editor, event) {
42
- if (event.target && (event.target.type === editor_1.MouseTargetType.GUTTER_LINE_NUMBERS || event.target.type === editor_1.MouseTargetType.GUTTER_GLYPH_MARGIN)) {
43
- if (event.event.button === 2) {
44
- editor.focus();
45
- const lineNumber = lineNumberFromPosition(event.target.position);
46
- const contextKeyService = this.contextKeyService.createOverlay([['editorLineNumber', lineNumber]]);
47
- const uri = editor.getResourceUri();
48
- const args = [{
49
- lineNumber: lineNumber,
50
- column: 1, // Compatible with Monaco editor IPosition API
51
- uri: uri['codeUri'],
52
- }];
53
- setTimeout(() => {
54
- this.contextMenuRenderer.render({
55
- menuPath: exports.EDITOR_LINENUMBER_CONTEXT_MENU,
56
- anchor: event.event,
57
- context: editor.node,
58
- args,
59
- contextKeyService
60
- });
61
- });
62
- }
63
- }
64
- }
65
- };
66
- exports.EditorLineNumberContribution = EditorLineNumberContribution;
67
- tslib_1.__decorate([
68
- (0, inversify_1.inject)(context_key_service_1.ContextKeyService),
69
- tslib_1.__metadata("design:type", Object)
70
- ], EditorLineNumberContribution.prototype, "contextKeyService", void 0);
71
- tslib_1.__decorate([
72
- (0, inversify_1.inject)(browser_1.ContextMenuRenderer),
73
- tslib_1.__metadata("design:type", browser_1.ContextMenuRenderer)
74
- ], EditorLineNumberContribution.prototype, "contextMenuRenderer", void 0);
75
- tslib_1.__decorate([
76
- (0, inversify_1.inject)(editor_manager_1.EditorManager),
77
- tslib_1.__metadata("design:type", editor_manager_1.EditorManager)
78
- ], EditorLineNumberContribution.prototype, "editorManager", void 0);
79
- exports.EditorLineNumberContribution = EditorLineNumberContribution = tslib_1.__decorate([
80
- (0, inversify_1.injectable)()
81
- ], EditorLineNumberContribution);
82
- function lineNumberFromPosition(position) {
83
- // position.line is 0-based line position, where the expected editor line number is 1-based.
84
- if (position) {
85
- return position.line + 1;
86
- }
87
- return undefined;
88
- }
89
- //# sourceMappingURL=editor-linenumber-contribution.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"editor-linenumber-contribution.js","sourceRoot":"","sources":["../../src/browser/editor-linenumber-contribution.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,oDAAoD;AACpD,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAEhF,qDAAiD;AACjD,qCAAmF;AACnF,4DAAkE;AAClE,qDAA+F;AAC/F,qFAAgF;AAChF,sCAAyE;AAG5D,QAAA,8BAA8B,GAAa,CAAC,gCAAgC,CAAC,CAAC;AAGpF,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IAWrC,OAAO;QACH,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC,CAAC,CAAC;IAClF,CAA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