@theia/editor 1.67.0-next.3 → 1.67.0-next.59
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 +1 -1
- package/lib/browser/editor-contribution.d.ts +4 -1
- package/lib/browser/editor-contribution.d.ts.map +1 -1
- package/lib/browser/editor-contribution.js +22 -6
- package/lib/browser/editor-contribution.js.map +1 -1
- package/lib/browser/editor-frontend-module.d.ts.map +1 -1
- package/lib/browser/editor-frontend-module.js +5 -0
- package/lib/browser/editor-frontend-module.js.map +1 -1
- package/lib/browser/index.d.ts +2 -0
- package/lib/browser/index.d.ts.map +1 -1
- package/lib/browser/index.js +2 -0
- package/lib/browser/index.js.map +1 -1
- package/lib/browser/split-editor-contribution.d.ts +27 -0
- package/lib/browser/split-editor-contribution.d.ts.map +1 -0
- package/lib/browser/split-editor-contribution.js +23 -0
- package/lib/browser/split-editor-contribution.js.map +1 -0
- package/lib/browser/text-editor-split-contribution.d.ts +13 -0
- package/lib/browser/text-editor-split-contribution.d.ts.map +1 -0
- package/lib/browser/text-editor-split-contribution.js +50 -0
- package/lib/browser/text-editor-split-contribution.js.map +1 -0
- package/package.json +4 -4
- package/src/browser/editor-contribution.ts +26 -8
- package/src/browser/editor-frontend-module.ts +6 -0
- package/src/browser/index.ts +2 -0
- package/src/browser/split-editor-contribution.ts +46 -0
- package/src/browser/text-editor-split-contribution.ts +50 -0
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ The `@theia/editor` extension contributed functionality such as the `editor` wid
|
|
|
16
16
|
|
|
17
17
|
## Additional Information
|
|
18
18
|
|
|
19
|
-
- [API documentation for `@theia/editor`](https://eclipse-theia.github.io/theia/docs/next/modules/
|
|
19
|
+
- [API documentation for `@theia/editor`](https://eclipse-theia.github.io/theia/docs/next/modules/_theia_editor.html)
|
|
20
20
|
- [Theia - GitHub](https://github.com/eclipse-theia/theia)
|
|
21
21
|
- [Theia - Website](https://theia-ide.org/)
|
|
22
22
|
|
|
@@ -3,10 +3,11 @@ import { TextEditor } from './editor';
|
|
|
3
3
|
import { StatusBar } from '@theia/core/lib/browser/status-bar/status-bar';
|
|
4
4
|
import { FrontendApplicationContribution, QuickInputService, KeybindingRegistry, KeybindingContribution, ApplicationShell, WidgetStatusBarContribution, Widget, OpenWithService } from '@theia/core/lib/browser';
|
|
5
5
|
import { ContextKeyService } from '@theia/core/lib/browser/context-key-service';
|
|
6
|
-
import { DisposableCollection, MenuContribution, MenuModelRegistry } from '@theia/core';
|
|
6
|
+
import { DisposableCollection, MenuContribution, MenuModelRegistry, ContributionProvider } from '@theia/core';
|
|
7
7
|
import { CommandRegistry, CommandContribution } from '@theia/core/lib/common';
|
|
8
8
|
import { EditorWidget } from './editor-widget';
|
|
9
9
|
import { EditorLanguageStatusService } from './language-status/editor-language-status-service';
|
|
10
|
+
import { SplitEditorContribution } from './split-editor-contribution';
|
|
10
11
|
export declare class EditorContribution implements FrontendApplicationContribution, CommandContribution, KeybindingContribution, MenuContribution, WidgetStatusBarContribution<EditorWidget> {
|
|
11
12
|
protected readonly editorManager: EditorManager;
|
|
12
13
|
protected readonly openWithService: OpenWithService;
|
|
@@ -14,6 +15,7 @@ export declare class EditorContribution implements FrontendApplicationContributi
|
|
|
14
15
|
protected readonly shell: ApplicationShell;
|
|
15
16
|
protected readonly contextKeyService: ContextKeyService;
|
|
16
17
|
protected readonly quickInputService: QuickInputService;
|
|
18
|
+
protected readonly splitEditorContributions: ContributionProvider<SplitEditorContribution>;
|
|
17
19
|
onStart(): void;
|
|
18
20
|
protected initEditorContextKeys(): void;
|
|
19
21
|
protected readonly toDisposeOnCurrentEditorChanged: DisposableCollection;
|
|
@@ -24,6 +26,7 @@ export declare class EditorContribution implements FrontendApplicationContributi
|
|
|
24
26
|
protected updateEncodingStatus(statusBar: StatusBar, editor: TextEditor | undefined): void;
|
|
25
27
|
protected setCursorPositionStatus(statusBar: StatusBar, editor: TextEditor | undefined): void;
|
|
26
28
|
registerCommands(commands: CommandRegistry): void;
|
|
29
|
+
protected findSplitContribution(widget: Widget): SplitEditorContribution | undefined;
|
|
27
30
|
registerKeybindings(keybindings: KeybindingRegistry): void;
|
|
28
31
|
registerMenus(registry: MenuModelRegistry): void;
|
|
29
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/editor-contribution.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,EAAsB,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAC9F,OAAO,EACH,+BAA+B,EAC/B,iBAAiB,EAAE,kBAAkB,EAAE,sBAAsB,EAA8B,gBAAgB,EAC3G,2BAA2B,EAC3B,MAAM,EACN,eAAe,EAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAChF,OAAO,EAAkB,oBAAoB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"editor-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/editor-contribution.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,EAAsB,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAC9F,OAAO,EACH,+BAA+B,EAC/B,iBAAiB,EAAE,kBAAkB,EAAE,sBAAsB,EAA8B,gBAAgB,EAC3G,2BAA2B,EAC3B,MAAM,EACN,eAAe,EAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAChF,OAAO,EAAkB,oBAAoB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,oBAAoB,EAAkB,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AAE,SAAS,EAAE,MAAM,EAAE,UAAU,GAAG,SAAS,GAAG,IAAI;IAc1F,SAAS,CAAC,uBAAuB,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,GAAG,SAAS,GAAG,IAAI;IAe7F,gBAAgB,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI;IA6BjD,SAAS,CAAC,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,uBAAuB,GAAG,SAAS;IAQpF,mBAAmB,CAAC,WAAW,EAAE,kBAAkB,GAAG,IAAI;IAe1D,aAAa,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI;CAsBnD"}
|
|
@@ -30,6 +30,7 @@ const current_widget_command_adapter_1 = require("@theia/core/lib/browser/shell/
|
|
|
30
30
|
const editor_widget_1 = require("./editor-widget");
|
|
31
31
|
const editor_language_status_service_1 = require("./language-status/editor-language-status-service");
|
|
32
32
|
const quick_editor_service_1 = require("./quick-editor-service");
|
|
33
|
+
const split_editor_contribution_1 = require("./split-editor-contribution");
|
|
33
34
|
let EditorContribution = class EditorContribution {
|
|
34
35
|
constructor() {
|
|
35
36
|
this.toDisposeOnCurrentEditorChanged = new core_1.DisposableCollection();
|
|
@@ -120,13 +121,19 @@ let EditorContribution = class EditorContribution {
|
|
|
120
121
|
execute: () => { var _a; return (_a = this.quickInputService) === null || _a === void 0 ? void 0 : _a.open(quick_editor_service_1.QuickEditorService.PREFIX); }
|
|
121
122
|
});
|
|
122
123
|
const splitHandlerFactory = (splitMode) => new current_widget_command_adapter_1.CurrentWidgetCommandAdapter(this.shell, {
|
|
123
|
-
isEnabled: title =>
|
|
124
|
+
isEnabled: title => {
|
|
125
|
+
if (!(title === null || title === void 0 ? void 0 : title.owner)) {
|
|
126
|
+
return false;
|
|
127
|
+
}
|
|
128
|
+
return this.findSplitContribution(title.owner) !== undefined;
|
|
129
|
+
},
|
|
124
130
|
execute: async (title) => {
|
|
125
|
-
if ((title === null || title === void 0 ? void 0 : title.owner)
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
131
|
+
if (!(title === null || title === void 0 ? void 0 : title.owner)) {
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
const contribution = this.findSplitContribution(title.owner);
|
|
135
|
+
if (contribution) {
|
|
136
|
+
await contribution.split(title.owner, splitMode);
|
|
130
137
|
}
|
|
131
138
|
}
|
|
132
139
|
});
|
|
@@ -137,6 +144,10 @@ let EditorContribution = class EditorContribution {
|
|
|
137
144
|
commands.registerCommand(editor_command_1.EditorCommands.SPLIT_EDITOR_UP, splitHandlerFactory('split-top'));
|
|
138
145
|
commands.registerCommand(editor_command_1.EditorCommands.SPLIT_EDITOR_LEFT, splitHandlerFactory('split-left'));
|
|
139
146
|
}
|
|
147
|
+
findSplitContribution(widget) {
|
|
148
|
+
const prioritized = core_1.Prioritizeable.prioritizeAllSync(this.splitEditorContributions.getContributions(), contribution => contribution.canHandle(widget));
|
|
149
|
+
return prioritized.length > 0 ? prioritized[0].value : undefined;
|
|
150
|
+
}
|
|
140
151
|
registerKeybindings(keybindings) {
|
|
141
152
|
keybindings.registerKeybinding({
|
|
142
153
|
command: editor_command_1.EditorCommands.SHOW_ALL_OPENED_EDITORS.id,
|
|
@@ -200,6 +211,11 @@ tslib_1.__decorate([
|
|
|
200
211
|
(0, inversify_1.optional)(),
|
|
201
212
|
tslib_1.__metadata("design:type", Object)
|
|
202
213
|
], EditorContribution.prototype, "quickInputService", void 0);
|
|
214
|
+
tslib_1.__decorate([
|
|
215
|
+
(0, inversify_1.inject)(core_1.ContributionProvider),
|
|
216
|
+
(0, inversify_1.named)(split_editor_contribution_1.SplitEditorContribution),
|
|
217
|
+
tslib_1.__metadata("design:type", Object)
|
|
218
|
+
], EditorContribution.prototype, "splitEditorContributions", void 0);
|
|
203
219
|
exports.EditorContribution = EditorContribution = tslib_1.__decorate([
|
|
204
220
|
(0, inversify_1.injectable)()
|
|
205
221
|
], EditorContribution);
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,4DAAmF;AACnF,8EAA8F;AAC9F,qDAMiC;AACjC,qFAAgF;AAChF,sCAA8I;AAC9I,qDAAkD;AAElD,oFAAiF;AACjF,oDAAiD;AACjD,iHAA2G;AAC3G,mDAA+C;AAC/C,qGAA+F;AAC/F,iEAA4D;AAC5D,2EAAsE;AAG/D,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAAxB;QAiDgB,oCAA+B,GAAG,IAAI,2BAAoB,EAAE,CAAC;IAqIpF,CAAC;IArKG,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,yC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AAE,+BAAc,CAAC,iBAAiB,CAAC,EAAE;YAC9C,KAAK,EAAE,SAAG,CAAC,iBAAiB,CAAC,YAAY,CAAC;YAC1C,KAAK,EAAE,GAAG;SACb,CAAC,CAAC;QACH,QAAQ,CAAC,kBAAkB,CAAC,oCAA0B,EAAE;YACpD,SAAS,EAAE,+BAAc,CAAC,kBAAkB,CAAC,EAAE;YAC/C,KAAK,EAAE,SAAG,CAAC,iBAAiB,CAAC,aAAa,CAAC;YAC3C,KAAK,EAAE,GAAG;SACb,CAAC,CAAC;IACP,CAAC;CACJ,CAAA;AAtLY,gDAAkB;AAGe;IAAzC,IAAA,kBAAM,EAAC,8BAAa,CAAC;sCAAmC,8BAAa;yDAAC;AAC3B;IAA3C,IAAA,kBAAM,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;AAGrC;IADlB,IAAA,kBAAM,EAAC,2BAAoB,CAAC;IAAE,IAAA,iBAAK,EAAC,mDAAuB,CAAC;;oEAC8B;6BAflF,kBAAkB;IAD9B,IAAA,sBAAU,GAAE;GACA,kBAAkB,CAsL9B"}
|
|
@@ -1 +1 @@
|
|
|
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;;
|
|
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;;AAyB/D,wBA0DG"}
|
|
@@ -39,6 +39,8 @@ const editor_language_status_service_1 = require("./language-status/editor-langu
|
|
|
39
39
|
const editor_linenumber_contribution_1 = require("./editor-linenumber-contribution");
|
|
40
40
|
const undo_redo_service_1 = require("./undo-redo-service");
|
|
41
41
|
const editor_language_quick_pick_service_1 = require("./editor-language-quick-pick-service");
|
|
42
|
+
const split_editor_contribution_1 = require("./split-editor-contribution");
|
|
43
|
+
const text_editor_split_contribution_1 = require("./text-editor-split-contribution");
|
|
42
44
|
exports.default = new inversify_1.ContainerModule(bind => {
|
|
43
45
|
(0, editor_preferences_1.bindEditorPreferences)(bind);
|
|
44
46
|
bind(editor_widget_factory_1.EditorWidgetFactory).toSelf().inSingletonScope();
|
|
@@ -46,6 +48,9 @@ exports.default = new inversify_1.ContainerModule(bind => {
|
|
|
46
48
|
bind(editor_manager_1.EditorManager).toSelf().inSingletonScope();
|
|
47
49
|
bind(browser_1.OpenHandler).toService(editor_manager_1.EditorManager);
|
|
48
50
|
(0, common_1.bindContributionProvider)(bind, editor_manager_1.EditorSelectionResolver);
|
|
51
|
+
(0, common_1.bindContributionProvider)(bind, split_editor_contribution_1.SplitEditorContribution);
|
|
52
|
+
bind(text_editor_split_contribution_1.TextEditorSplitContribution).toSelf().inSingletonScope();
|
|
53
|
+
bind(split_editor_contribution_1.SplitEditorContribution).toService(text_editor_split_contribution_1.TextEditorSplitContribution);
|
|
49
54
|
bind(editor_command_1.EditorCommandContribution).toSelf().inSingletonScope();
|
|
50
55
|
bind(common_1.CommandContribution).toService(editor_command_1.EditorCommandContribution);
|
|
51
56
|
bind(editor_menu_1.EditorMenuContribution).toSelf().inSingletonScope();
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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,mFAA2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AkB,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"}
|
package/lib/browser/index.d.ts
CHANGED
|
@@ -7,4 +7,6 @@ export * from './editor-menu';
|
|
|
7
7
|
export * from './editor-frontend-module';
|
|
8
8
|
export * from './decorations';
|
|
9
9
|
export * from './editor-linenumber-contribution';
|
|
10
|
+
export * from './split-editor-contribution';
|
|
11
|
+
export * from './text-editor-split-contribution';
|
|
10
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAgBA,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,kCAAkC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAgBA,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC"}
|
package/lib/browser/index.js
CHANGED
|
@@ -25,4 +25,6 @@ tslib_1.__exportStar(require("./editor-menu"), exports);
|
|
|
25
25
|
tslib_1.__exportStar(require("./editor-frontend-module"), exports);
|
|
26
26
|
tslib_1.__exportStar(require("./decorations"), exports);
|
|
27
27
|
tslib_1.__exportStar(require("./editor-linenumber-contribution"), exports);
|
|
28
|
+
tslib_1.__exportStar(require("./split-editor-contribution"), exports);
|
|
29
|
+
tslib_1.__exportStar(require("./text-editor-split-contribution"), exports);
|
|
28
30
|
//# sourceMappingURL=index.js.map
|
package/lib/browser/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/browser/index.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,2DAAiC;AACjC,mDAAyB;AACzB,0DAAgC;AAChC,2DAAiC;AACjC,2DAAiC;AACjC,wDAA8B;AAC9B,mEAAyC;AACzC,wDAA8B;AAC9B,2EAAiD"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/browser/index.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,2DAAiC;AACjC,mDAAyB;AACzB,0DAAgC;AAChC,2DAAiC;AACjC,2DAAiC;AACjC,wDAA8B;AAC9B,mEAAyC;AACzC,wDAA8B;AAC9B,2EAAiD;AACjD,sEAA4C;AAC5C,2EAAiD"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Widget, DockLayout } from '@theia/core/lib/browser';
|
|
2
|
+
/**
|
|
3
|
+
* Symbol used to bind SplitEditorContribution implementations.
|
|
4
|
+
*/
|
|
5
|
+
export declare const SplitEditorContribution: unique symbol;
|
|
6
|
+
/**
|
|
7
|
+
* A contribution interface for handling split operations on different editor types.
|
|
8
|
+
* Implementations should handle specific editor widget types (e.g., text editors, notebook editors).
|
|
9
|
+
*
|
|
10
|
+
* @template W the specific widget type this contribution handles
|
|
11
|
+
*/
|
|
12
|
+
export interface SplitEditorContribution<W extends Widget = Widget> {
|
|
13
|
+
/**
|
|
14
|
+
* Determines whether this contribution can handle the split operation for the given widget.
|
|
15
|
+
* @param widget the widget to check
|
|
16
|
+
* @returns a priority number (higher means higher priority), or 0 if this contribution cannot handle the widget
|
|
17
|
+
*/
|
|
18
|
+
canHandle(widget: Widget): number;
|
|
19
|
+
/**
|
|
20
|
+
* Splits the given widget according to the specified split mode.
|
|
21
|
+
* @param widget the widget to split
|
|
22
|
+
* @param splitMode the direction in which to split
|
|
23
|
+
* @returns the newly created widget, or undefined if the split operation failed
|
|
24
|
+
*/
|
|
25
|
+
split(widget: W, splitMode: DockLayout.InsertMode): Promise<W | undefined>;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=split-editor-contribution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"split-editor-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/split-editor-contribution.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE7D;;GAEG;AACH,eAAO,MAAM,uBAAuB,eAAoC,CAAC;AAEzE;;;;;GAKG;AACH,MAAM,WAAW,uBAAuB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IAC9D;;;;OAIG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IAElC;;;;;OAKG;IACH,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,UAAU,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;CAC9E"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2025 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.SplitEditorContribution = void 0;
|
|
19
|
+
/**
|
|
20
|
+
* Symbol used to bind SplitEditorContribution implementations.
|
|
21
|
+
*/
|
|
22
|
+
exports.SplitEditorContribution = Symbol('SplitEditorContribution');
|
|
23
|
+
//# sourceMappingURL=split-editor-contribution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"split-editor-contribution.js","sourceRoot":"","sources":["../../src/browser/split-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;;;AAIhF;;GAEG;AACU,QAAA,uBAAuB,GAAG,MAAM,CAAC,yBAAyB,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Widget, DockLayout } from '@theia/core/lib/browser';
|
|
2
|
+
import { SplitEditorContribution } from './split-editor-contribution';
|
|
3
|
+
import { EditorWidget } from './editor-widget';
|
|
4
|
+
import { EditorManager } from './editor-manager';
|
|
5
|
+
/**
|
|
6
|
+
* Implementation of SplitEditorContribution for text editors (EditorWidget).
|
|
7
|
+
*/
|
|
8
|
+
export declare class TextEditorSplitContribution implements SplitEditorContribution<EditorWidget> {
|
|
9
|
+
protected readonly editorManager: EditorManager;
|
|
10
|
+
canHandle(widget: Widget): number;
|
|
11
|
+
split(widget: EditorWidget, splitMode: DockLayout.InsertMode): Promise<EditorWidget | undefined>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=text-editor-split-contribution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-editor-split-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/text-editor-split-contribution.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD;;GAEG;AACH,qBACa,2BAA4B,YAAW,uBAAuB,CAAC,YAAY,CAAC;IAGrF,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IAEhD,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAI3B,KAAK,CAAC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,CAAC,UAAU,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC;CAazG"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2025 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.TextEditorSplitContribution = void 0;
|
|
19
|
+
const tslib_1 = require("tslib");
|
|
20
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
21
|
+
const editor_widget_1 = require("./editor-widget");
|
|
22
|
+
const editor_manager_1 = require("./editor-manager");
|
|
23
|
+
/**
|
|
24
|
+
* Implementation of SplitEditorContribution for text editors (EditorWidget).
|
|
25
|
+
*/
|
|
26
|
+
let TextEditorSplitContribution = class TextEditorSplitContribution {
|
|
27
|
+
canHandle(widget) {
|
|
28
|
+
return widget instanceof editor_widget_1.EditorWidget ? 100 : 0;
|
|
29
|
+
}
|
|
30
|
+
async split(widget, splitMode) {
|
|
31
|
+
const selection = widget.editor.selection;
|
|
32
|
+
const newEditor = await this.editorManager.openToSide(widget.editor.uri, {
|
|
33
|
+
selection,
|
|
34
|
+
widgetOptions: { mode: splitMode, ref: widget }
|
|
35
|
+
});
|
|
36
|
+
// Preserve the view state (scroll position, etc.) from the original editor
|
|
37
|
+
const oldEditorState = widget.editor.storeViewState();
|
|
38
|
+
newEditor.editor.restoreViewState(oldEditorState);
|
|
39
|
+
return newEditor;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
exports.TextEditorSplitContribution = TextEditorSplitContribution;
|
|
43
|
+
tslib_1.__decorate([
|
|
44
|
+
(0, inversify_1.inject)(editor_manager_1.EditorManager),
|
|
45
|
+
tslib_1.__metadata("design:type", editor_manager_1.EditorManager)
|
|
46
|
+
], TextEditorSplitContribution.prototype, "editorManager", void 0);
|
|
47
|
+
exports.TextEditorSplitContribution = TextEditorSplitContribution = tslib_1.__decorate([
|
|
48
|
+
(0, inversify_1.injectable)()
|
|
49
|
+
], TextEditorSplitContribution);
|
|
50
|
+
//# sourceMappingURL=text-editor-split-contribution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-editor-split-contribution.js","sourceRoot":"","sources":["../../src/browser/text-editor-split-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,4DAAkE;AAGlE,mDAA+C;AAC/C,qDAAiD;AAEjD;;GAEG;AAEI,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;IAKpC,SAAS,CAAC,MAAc;QACpB,OAAO,MAAM,YAAY,4BAAY,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,MAAoB,EAAE,SAAgC;QAC9D,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC;QAC1C,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE;YACrE,SAAS;YACT,aAAa,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE;SAClD,CAAC,CAAC;QAEH,2EAA2E;QAC3E,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;QACtD,SAAS,CAAC,MAAM,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;QAElD,OAAO,SAAS,CAAC;IACrB,CAAC;CACJ,CAAA;AAtBY,kEAA2B;AAGjB;IADlB,IAAA,kBAAM,EAAC,8BAAa,CAAC;sCACY,8BAAa;kEAAC;sCAHvC,2BAA2B;IADvC,IAAA,sBAAU,GAAE;GACA,2BAA2B,CAsBvC"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/editor",
|
|
3
|
-
"version": "1.67.0-next.
|
|
3
|
+
"version": "1.67.0-next.59+3f14297ea",
|
|
4
4
|
"description": "Theia - Editor Extension",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@theia/core": "1.67.0-next.
|
|
7
|
-
"@theia/variable-resolver": "1.67.0-next.
|
|
6
|
+
"@theia/core": "1.67.0-next.59+3f14297ea",
|
|
7
|
+
"@theia/variable-resolver": "1.67.0-next.59+3f14297ea",
|
|
8
8
|
"tslib": "^2.6.2"
|
|
9
9
|
},
|
|
10
10
|
"publishConfig": {
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"nyc": {
|
|
48
48
|
"extends": "../../configs/nyc.json"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "3f14297ea2edcdb1fffd74afee0613e70b43e125"
|
|
51
51
|
}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
import { EditorManager } from './editor-manager';
|
|
18
18
|
import { TextEditor } from './editor';
|
|
19
|
-
import { injectable, inject, optional } from '@theia/core/shared/inversify';
|
|
19
|
+
import { injectable, inject, optional, named } from '@theia/core/shared/inversify';
|
|
20
20
|
import { StatusBarAlignment, StatusBar } from '@theia/core/lib/browser/status-bar/status-bar';
|
|
21
21
|
import {
|
|
22
22
|
FrontendApplicationContribution, DiffUris, DockLayout,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
OpenWithService
|
|
27
27
|
} from '@theia/core/lib/browser';
|
|
28
28
|
import { ContextKeyService } from '@theia/core/lib/browser/context-key-service';
|
|
29
|
-
import { CommandHandler, DisposableCollection, MenuContribution, MenuModelRegistry } from '@theia/core';
|
|
29
|
+
import { CommandHandler, DisposableCollection, MenuContribution, MenuModelRegistry, ContributionProvider, Prioritizeable } from '@theia/core';
|
|
30
30
|
import { EditorCommands } from './editor-command';
|
|
31
31
|
import { CommandRegistry, CommandContribution } from '@theia/core/lib/common';
|
|
32
32
|
import { SUPPORTED_ENCODINGS } from '@theia/core/lib/common/supported-encodings';
|
|
@@ -35,6 +35,7 @@ import { CurrentWidgetCommandAdapter } from '@theia/core/lib/browser/shell/curre
|
|
|
35
35
|
import { EditorWidget } from './editor-widget';
|
|
36
36
|
import { EditorLanguageStatusService } from './language-status/editor-language-status-service';
|
|
37
37
|
import { QuickEditorService } from './quick-editor-service';
|
|
38
|
+
import { SplitEditorContribution } from './split-editor-contribution';
|
|
38
39
|
|
|
39
40
|
@injectable()
|
|
40
41
|
export class EditorContribution implements FrontendApplicationContribution,
|
|
@@ -51,6 +52,9 @@ export class EditorContribution implements FrontendApplicationContribution,
|
|
|
51
52
|
@inject(QuickInputService) @optional()
|
|
52
53
|
protected readonly quickInputService: QuickInputService;
|
|
53
54
|
|
|
55
|
+
@inject(ContributionProvider) @named(SplitEditorContribution)
|
|
56
|
+
protected readonly splitEditorContributions: ContributionProvider<SplitEditorContribution>;
|
|
57
|
+
|
|
54
58
|
onStart(): void {
|
|
55
59
|
this.initEditorContextKeys();
|
|
56
60
|
this.openWithService.registerHandler({
|
|
@@ -147,13 +151,19 @@ export class EditorContribution implements FrontendApplicationContribution,
|
|
|
147
151
|
execute: () => this.quickInputService?.open(QuickEditorService.PREFIX)
|
|
148
152
|
});
|
|
149
153
|
const splitHandlerFactory = (splitMode: DockLayout.InsertMode): CommandHandler => new CurrentWidgetCommandAdapter(this.shell, {
|
|
150
|
-
isEnabled: title =>
|
|
154
|
+
isEnabled: title => {
|
|
155
|
+
if (!title?.owner) {
|
|
156
|
+
return false;
|
|
157
|
+
}
|
|
158
|
+
return this.findSplitContribution(title.owner) !== undefined;
|
|
159
|
+
},
|
|
151
160
|
execute: async title => {
|
|
152
|
-
if (title?.owner
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
161
|
+
if (!title?.owner) {
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
const contribution = this.findSplitContribution(title.owner);
|
|
165
|
+
if (contribution) {
|
|
166
|
+
await contribution.split(title.owner, splitMode);
|
|
157
167
|
}
|
|
158
168
|
}
|
|
159
169
|
});
|
|
@@ -165,6 +175,14 @@ export class EditorContribution implements FrontendApplicationContribution,
|
|
|
165
175
|
commands.registerCommand(EditorCommands.SPLIT_EDITOR_LEFT, splitHandlerFactory('split-left'));
|
|
166
176
|
}
|
|
167
177
|
|
|
178
|
+
protected findSplitContribution(widget: Widget): SplitEditorContribution | undefined {
|
|
179
|
+
const prioritized = Prioritizeable.prioritizeAllSync(
|
|
180
|
+
this.splitEditorContributions.getContributions(),
|
|
181
|
+
contribution => contribution.canHandle(widget)
|
|
182
|
+
);
|
|
183
|
+
return prioritized.length > 0 ? prioritized[0].value : undefined;
|
|
184
|
+
}
|
|
185
|
+
|
|
168
186
|
registerKeybindings(keybindings: KeybindingRegistry): void {
|
|
169
187
|
keybindings.registerKeybinding({
|
|
170
188
|
command: EditorCommands.SHOW_ALL_OPENED_EDITORS.id,
|
|
@@ -39,6 +39,8 @@ import { EditorLanguageStatusService } from './language-status/editor-language-s
|
|
|
39
39
|
import { EditorLineNumberContribution } from './editor-linenumber-contribution';
|
|
40
40
|
import { UndoRedoService } from './undo-redo-service';
|
|
41
41
|
import { EditorLanguageQuickPickService } from './editor-language-quick-pick-service';
|
|
42
|
+
import { SplitEditorContribution } from './split-editor-contribution';
|
|
43
|
+
import { TextEditorSplitContribution } from './text-editor-split-contribution';
|
|
42
44
|
|
|
43
45
|
export default new ContainerModule(bind => {
|
|
44
46
|
bindEditorPreferences(bind);
|
|
@@ -50,6 +52,10 @@ export default new ContainerModule(bind => {
|
|
|
50
52
|
bind(OpenHandler).toService(EditorManager);
|
|
51
53
|
|
|
52
54
|
bindContributionProvider(bind, EditorSelectionResolver);
|
|
55
|
+
bindContributionProvider(bind, SplitEditorContribution);
|
|
56
|
+
|
|
57
|
+
bind(TextEditorSplitContribution).toSelf().inSingletonScope();
|
|
58
|
+
bind(SplitEditorContribution).toService(TextEditorSplitContribution);
|
|
53
59
|
|
|
54
60
|
bind(EditorCommandContribution).toSelf().inSingletonScope();
|
|
55
61
|
bind(CommandContribution).toService(EditorCommandContribution);
|
package/src/browser/index.ts
CHANGED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2025 TypeFox and others.
|
|
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 { Widget, DockLayout } from '@theia/core/lib/browser';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Symbol used to bind SplitEditorContribution implementations.
|
|
21
|
+
*/
|
|
22
|
+
export const SplitEditorContribution = Symbol('SplitEditorContribution');
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* A contribution interface for handling split operations on different editor types.
|
|
26
|
+
* Implementations should handle specific editor widget types (e.g., text editors, notebook editors).
|
|
27
|
+
*
|
|
28
|
+
* @template W the specific widget type this contribution handles
|
|
29
|
+
*/
|
|
30
|
+
export interface SplitEditorContribution<W extends Widget = Widget> {
|
|
31
|
+
/**
|
|
32
|
+
* Determines whether this contribution can handle the split operation for the given widget.
|
|
33
|
+
* @param widget the widget to check
|
|
34
|
+
* @returns a priority number (higher means higher priority), or 0 if this contribution cannot handle the widget
|
|
35
|
+
*/
|
|
36
|
+
canHandle(widget: Widget): number;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Splits the given widget according to the specified split mode.
|
|
40
|
+
* @param widget the widget to split
|
|
41
|
+
* @param splitMode the direction in which to split
|
|
42
|
+
* @returns the newly created widget, or undefined if the split operation failed
|
|
43
|
+
*/
|
|
44
|
+
split(widget: W, splitMode: DockLayout.InsertMode): Promise<W | undefined>;
|
|
45
|
+
}
|
|
46
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2025 TypeFox and others.
|
|
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 { inject, injectable } from '@theia/core/shared/inversify';
|
|
18
|
+
import { Widget, DockLayout } from '@theia/core/lib/browser';
|
|
19
|
+
import { SplitEditorContribution } from './split-editor-contribution';
|
|
20
|
+
import { EditorWidget } from './editor-widget';
|
|
21
|
+
import { EditorManager } from './editor-manager';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Implementation of SplitEditorContribution for text editors (EditorWidget).
|
|
25
|
+
*/
|
|
26
|
+
@injectable()
|
|
27
|
+
export class TextEditorSplitContribution implements SplitEditorContribution<EditorWidget> {
|
|
28
|
+
|
|
29
|
+
@inject(EditorManager)
|
|
30
|
+
protected readonly editorManager: EditorManager;
|
|
31
|
+
|
|
32
|
+
canHandle(widget: Widget): number {
|
|
33
|
+
return widget instanceof EditorWidget ? 100 : 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
async split(widget: EditorWidget, splitMode: DockLayout.InsertMode): Promise<EditorWidget | undefined> {
|
|
37
|
+
const selection = widget.editor.selection;
|
|
38
|
+
const newEditor = await this.editorManager.openToSide(widget.editor.uri, {
|
|
39
|
+
selection,
|
|
40
|
+
widgetOptions: { mode: splitMode, ref: widget }
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
// Preserve the view state (scroll position, etc.) from the original editor
|
|
44
|
+
const oldEditorState = widget.editor.storeViewState();
|
|
45
|
+
newEditor.editor.restoreViewState(oldEditorState);
|
|
46
|
+
|
|
47
|
+
return newEditor;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|