@theia/terminal 1.34.2 → 1.34.3
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/LICENSE +641 -641
- package/README.md +30 -30
- package/lib/browser/base/terminal-service.d.ts +34 -34
- package/lib/browser/base/terminal-service.js +7 -7
- package/lib/browser/base/terminal-widget.d.ts +184 -184
- package/lib/browser/base/terminal-widget.js +34 -34
- package/lib/browser/index.d.ts +1 -1
- package/lib/browser/index.js +28 -28
- package/lib/browser/search/terminal-search-container.d.ts +3 -3
- package/lib/browser/search/terminal-search-container.js +28 -28
- package/lib/browser/search/terminal-search-widget.d.ts +30 -30
- package/lib/browser/search/terminal-search-widget.js +147 -147
- package/lib/browser/shell-terminal-profile.d.ts +19 -19
- package/lib/browser/shell-terminal-profile.js +39 -39
- package/lib/browser/terminal-contribution.d.ts +3 -3
- package/lib/browser/terminal-contribution.js +20 -20
- package/lib/browser/terminal-copy-on-selection-handler.d.ts +10 -10
- package/lib/browser/terminal-copy-on-selection-handler.js +103 -103
- package/lib/browser/terminal-file-link-provider.d.ts +24 -24
- package/lib/browser/terminal-file-link-provider.js +200 -200
- package/lib/browser/terminal-frontend-contribution.d.ts +112 -112
- package/lib/browser/terminal-frontend-contribution.js +994 -994
- package/lib/browser/terminal-frontend-module.d.ts +5 -5
- package/lib/browser/terminal-frontend-module.js +115 -115
- package/lib/browser/terminal-keybinding-contexts.d.ts +15 -15
- package/lib/browser/terminal-keybinding-contexts.js +71 -71
- package/lib/browser/terminal-link-helpers.d.ts +27 -27
- package/lib/browser/terminal-link-helpers.js +155 -155
- package/lib/browser/terminal-link-provider.d.ts +51 -51
- package/lib/browser/terminal-link-provider.js +197 -197
- package/lib/browser/terminal-preferences.d.ts +61 -61
- package/lib/browser/terminal-preferences.js +329 -329
- package/lib/browser/terminal-profile-service.d.ts +55 -55
- package/lib/browser/terminal-profile-service.js +149 -149
- package/lib/browser/terminal-quick-open-service.d.ts +36 -36
- package/lib/browser/terminal-quick-open-service.js +137 -137
- package/lib/browser/terminal-theme-service.d.ts +21 -21
- package/lib/browser/terminal-theme-service.js +218 -218
- package/lib/browser/terminal-url-link-provider.d.ts +11 -11
- package/lib/browser/terminal-url-link-provider.js +76 -76
- package/lib/browser/terminal-widget-impl.d.ts +173 -173
- package/lib/browser/terminal-widget-impl.js +769 -769
- package/lib/common/base-terminal-protocol.d.ts +100 -100
- package/lib/common/base-terminal-protocol.js +88 -88
- package/lib/common/shell-terminal-protocol.d.ts +29 -29
- package/lib/common/shell-terminal-protocol.js +22 -22
- package/lib/common/terminal-common-module.d.ts +7 -7
- package/lib/common/terminal-common-module.js +31 -31
- package/lib/common/terminal-protocol.d.ts +12 -12
- package/lib/common/terminal-protocol.js +21 -21
- package/lib/common/terminal-watcher.d.ts +13 -13
- package/lib/common/terminal-watcher.js +70 -70
- package/lib/node/base-terminal-server.d.ts +36 -36
- package/lib/node/base-terminal-server.js +252 -252
- package/lib/node/buffering-stream.d.ts +39 -39
- package/lib/node/buffering-stream.js +75 -75
- package/lib/node/buffering-stream.spec.d.ts +1 -1
- package/lib/node/buffering-stream.spec.js +43 -43
- package/lib/node/index.d.ts +1 -1
- package/lib/node/index.js +28 -28
- package/lib/node/shell-process.d.ts +26 -26
- package/lib/node/shell-process.js +106 -106
- package/lib/node/shell-terminal-server.d.ts +14 -14
- package/lib/node/shell-terminal-server.js +114 -114
- package/lib/node/shell-terminal-server.spec.d.ts +1 -1
- package/lib/node/shell-terminal-server.spec.js +35 -35
- package/lib/node/terminal-backend-contribution.d.ts +9 -9
- package/lib/node/terminal-backend-contribution.js +75 -75
- package/lib/node/terminal-backend-contribution.slow-spec.d.ts +1 -1
- package/lib/node/terminal-backend-contribution.slow-spec.js +54 -54
- package/lib/node/terminal-backend-module.d.ts +11 -11
- package/lib/node/terminal-backend-module.js +69 -69
- package/lib/node/terminal-server.d.ts +9 -9
- package/lib/node/terminal-server.js +64 -64
- package/lib/node/terminal-server.spec.d.ts +1 -1
- package/lib/node/terminal-server.spec.js +41 -41
- package/lib/node/test/terminal-test-container.d.ts +2 -2
- package/lib/node/test/terminal-test-container.js +40 -40
- package/lib/package.spec.js +25 -25
- package/package.json +9 -9
- package/src/browser/base/terminal-service.ts +60 -60
- package/src/browser/base/terminal-widget.ts +244 -244
- package/src/browser/index.ts +17 -17
- package/src/browser/search/terminal-search-container.ts +28 -28
- package/src/browser/search/terminal-search-widget.tsx +161 -161
- package/src/browser/shell-terminal-profile.ts +40 -40
- package/src/browser/style/terminal-search.css +93 -93
- package/src/browser/style/terminal.css +33 -33
- package/src/browser/terminal-contribution.ts +19 -19
- package/src/browser/terminal-copy-on-selection-handler.ts +92 -92
- package/src/browser/terminal-file-link-provider.ts +200 -200
- package/src/browser/terminal-frontend-contribution.ts +1048 -1048
- package/src/browser/terminal-frontend-module.ts +139 -139
- package/src/browser/terminal-keybinding-contexts.ts +52 -52
- package/src/browser/terminal-link-helpers.ts +187 -187
- package/src/browser/terminal-link-provider.ts +203 -203
- package/src/browser/terminal-preferences.ts +427 -427
- package/src/browser/terminal-profile-service.ts +170 -170
- package/src/browser/terminal-quick-open-service.ts +132 -132
- package/src/browser/terminal-theme-service.ts +209 -209
- package/src/browser/terminal-url-link-provider.ts +66 -66
- package/src/browser/terminal-widget-impl.ts +827 -827
- package/src/common/base-terminal-protocol.ts +183 -183
- package/src/common/shell-terminal-protocol.ts +50 -50
- package/src/common/terminal-common-module.ts +30 -30
- package/src/common/terminal-protocol.ts +32 -32
- package/src/common/terminal-watcher.ts +69 -69
- package/src/node/base-terminal-server.ts +279 -279
- package/src/node/buffering-stream.spec.ts +46 -46
- package/src/node/buffering-stream.ts +95 -95
- package/src/node/index.ts +17 -17
- package/src/node/shell-process.ts +101 -101
- package/src/node/shell-terminal-server.spec.ts +40 -40
- package/src/node/shell-terminal-server.ts +95 -95
- package/src/node/terminal-backend-contribution.slow-spec.ts +63 -63
- package/src/node/terminal-backend-contribution.ts +60 -60
- package/src/node/terminal-backend-module.ts +82 -82
- package/src/node/terminal-server.spec.ts +47 -47
- package/src/node/terminal-server.ts +52 -52
- package/src/node/test/terminal-test-container.ts +39 -39
- package/src/package.spec.ts +28 -28
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import '../../src/browser/style/terminal.css';
|
|
2
|
-
import 'xterm/css/xterm.css';
|
|
3
|
-
import { ContainerModule } from '@theia/core/shared/inversify';
|
|
4
|
-
declare const _default: ContainerModule;
|
|
5
|
-
export default _default;
|
|
1
|
+
import '../../src/browser/style/terminal.css';
|
|
2
|
+
import 'xterm/css/xterm.css';
|
|
3
|
+
import { ContainerModule } from '@theia/core/shared/inversify';
|
|
4
|
+
declare const _default: ContainerModule;
|
|
5
|
+
export default _default;
|
|
6
6
|
//# sourceMappingURL=terminal-frontend-module.d.ts.map
|
|
@@ -1,116 +1,116 @@
|
|
|
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 WITH Classpath-exception-2.0
|
|
16
|
-
// *****************************************************************************
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
require("../../src/browser/style/terminal.css");
|
|
19
|
-
require("xterm/css/xterm.css");
|
|
20
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
21
|
-
const common_1 = require("@theia/core/lib/common");
|
|
22
|
-
const core_1 = require("@theia/core");
|
|
23
|
-
const browser_1 = require("@theia/core/lib/browser");
|
|
24
|
-
const tab_bar_toolbar_1 = require("@theia/core/lib/browser/shell/tab-bar-toolbar");
|
|
25
|
-
const terminal_frontend_contribution_1 = require("./terminal-frontend-contribution");
|
|
26
|
-
const terminal_widget_impl_1 = require("./terminal-widget-impl");
|
|
27
|
-
const terminal_widget_1 = require("./base/terminal-widget");
|
|
28
|
-
const terminal_protocol_1 = require("../common/terminal-protocol");
|
|
29
|
-
const terminal_watcher_1 = require("../common/terminal-watcher");
|
|
30
|
-
const shell_terminal_protocol_1 = require("../common/shell-terminal-protocol");
|
|
31
|
-
const terminal_keybinding_contexts_1 = require("./terminal-keybinding-contexts");
|
|
32
|
-
const terminal_common_module_1 = require("../common/terminal-common-module");
|
|
33
|
-
const terminal_service_1 = require("./base/terminal-service");
|
|
34
|
-
const terminal_preferences_1 = require("./terminal-preferences");
|
|
35
|
-
const terminal_contribution_1 = require("./terminal-contribution");
|
|
36
|
-
const terminal_search_widget_1 = require("./search/terminal-search-widget");
|
|
37
|
-
const terminal_quick_open_service_1 = require("./terminal-quick-open-service");
|
|
38
|
-
const terminal_search_container_1 = require("./search/terminal-search-container");
|
|
39
|
-
const terminal_copy_on_selection_handler_1 = require("./terminal-copy-on-selection-handler");
|
|
40
|
-
const color_application_contribution_1 = require("@theia/core/lib/browser/color-application-contribution");
|
|
41
|
-
const terminal_theme_service_1 = require("./terminal-theme-service");
|
|
42
|
-
const quick_access_1 = require("@theia/core/lib/browser/quick-input/quick-access");
|
|
43
|
-
const terminal_link_provider_1 = require("./terminal-link-provider");
|
|
44
|
-
const terminal_url_link_provider_1 = require("./terminal-url-link-provider");
|
|
45
|
-
const terminal_file_link_provider_1 = require("./terminal-file-link-provider");
|
|
46
|
-
const terminal_profile_service_1 = require("./terminal-profile-service");
|
|
47
|
-
exports.default = new inversify_1.ContainerModule(bind => {
|
|
48
|
-
(0, terminal_preferences_1.bindTerminalPreferences)(bind);
|
|
49
|
-
bind(browser_1.KeybindingContext).to(terminal_keybinding_contexts_1.TerminalActiveContext).inSingletonScope();
|
|
50
|
-
bind(browser_1.KeybindingContext).to(terminal_keybinding_contexts_1.TerminalSearchVisibleContext).inSingletonScope();
|
|
51
|
-
bind(terminal_widget_1.TerminalWidget).to(terminal_widget_impl_1.TerminalWidgetImpl).inTransientScope();
|
|
52
|
-
bind(terminal_watcher_1.TerminalWatcher).toSelf().inSingletonScope();
|
|
53
|
-
let terminalNum = 0;
|
|
54
|
-
bind(browser_1.WidgetFactory).toDynamicValue(ctx => ({
|
|
55
|
-
id: terminal_widget_impl_1.TERMINAL_WIDGET_FACTORY_ID,
|
|
56
|
-
createWidget: (options) => {
|
|
57
|
-
const child = new inversify_1.Container({ defaultScope: 'Singleton' });
|
|
58
|
-
child.parent = ctx.container;
|
|
59
|
-
const counter = terminalNum++;
|
|
60
|
-
const domId = options.id || 'terminal-' + counter;
|
|
61
|
-
const widgetOptions = Object.assign({ title: `${common_1.nls.localizeByDefault('Terminal')} ${counter}`, useServerTitle: true, destroyTermOnClose: true }, options);
|
|
62
|
-
child.bind(terminal_widget_1.TerminalWidgetOptions).toConstantValue(widgetOptions);
|
|
63
|
-
child.bind('terminal-dom-id').toConstantValue(domId);
|
|
64
|
-
child.bind(terminal_search_widget_1.TerminalSearchWidgetFactory).toDynamicValue(context => (0, terminal_search_container_1.createTerminalSearchFactory)(context.container));
|
|
65
|
-
return child.get(terminal_widget_1.TerminalWidget);
|
|
66
|
-
}
|
|
67
|
-
}));
|
|
68
|
-
bind(terminal_quick_open_service_1.TerminalQuickOpenService).toSelf().inSingletonScope();
|
|
69
|
-
bind(terminal_copy_on_selection_handler_1.TerminalCopyOnSelectionHandler).toSelf().inSingletonScope();
|
|
70
|
-
bind(terminal_quick_open_service_1.TerminalQuickOpenContribution).toSelf().inSingletonScope();
|
|
71
|
-
for (const identifier of [common_1.CommandContribution, quick_access_1.QuickAccessContribution]) {
|
|
72
|
-
bind(identifier).toService(terminal_quick_open_service_1.TerminalQuickOpenContribution);
|
|
73
|
-
}
|
|
74
|
-
bind(terminal_theme_service_1.TerminalThemeService).toSelf().inSingletonScope();
|
|
75
|
-
bind(terminal_frontend_contribution_1.TerminalFrontendContribution).toSelf().inSingletonScope();
|
|
76
|
-
bind(terminal_service_1.TerminalService).toService(terminal_frontend_contribution_1.TerminalFrontendContribution);
|
|
77
|
-
for (const identifier of [common_1.CommandContribution, common_1.MenuContribution, browser_1.KeybindingContribution, tab_bar_toolbar_1.TabBarToolbarContribution, color_application_contribution_1.ColorContribution]) {
|
|
78
|
-
bind(identifier).toService(terminal_frontend_contribution_1.TerminalFrontendContribution);
|
|
79
|
-
}
|
|
80
|
-
bind(terminal_protocol_1.ITerminalServer).toDynamicValue(ctx => {
|
|
81
|
-
const connection = ctx.container.get(browser_1.WebSocketConnectionProvider);
|
|
82
|
-
const terminalWatcher = ctx.container.get(terminal_watcher_1.TerminalWatcher);
|
|
83
|
-
return connection.createProxy(terminal_protocol_1.terminalPath, terminalWatcher.getTerminalClient());
|
|
84
|
-
}).inSingletonScope();
|
|
85
|
-
bind(shell_terminal_protocol_1.ShellTerminalServerProxy).toDynamicValue(ctx => {
|
|
86
|
-
const connection = ctx.container.get(browser_1.WebSocketConnectionProvider);
|
|
87
|
-
const terminalWatcher = ctx.container.get(terminal_watcher_1.TerminalWatcher);
|
|
88
|
-
return connection.createProxy(shell_terminal_protocol_1.shellTerminalPath, terminalWatcher.getTerminalClient());
|
|
89
|
-
}).inSingletonScope();
|
|
90
|
-
bind(shell_terminal_protocol_1.IShellTerminalServer).toService(shell_terminal_protocol_1.ShellTerminalServerProxy);
|
|
91
|
-
(0, terminal_common_module_1.createCommonBindings)(bind);
|
|
92
|
-
(0, core_1.bindContributionProvider)(bind, terminal_contribution_1.TerminalContribution);
|
|
93
|
-
// terminal link provider contribution point
|
|
94
|
-
(0, core_1.bindContributionProvider)(bind, terminal_link_provider_1.TerminalLinkProvider);
|
|
95
|
-
bind(terminal_link_provider_1.TerminalLinkProviderContribution).toSelf().inSingletonScope();
|
|
96
|
-
bind(terminal_contribution_1.TerminalContribution).toService(terminal_link_provider_1.TerminalLinkProviderContribution);
|
|
97
|
-
bind(terminal_link_provider_1.XtermLinkFactory).toFactory(terminal_link_provider_1.createXtermLinkFactory);
|
|
98
|
-
// default terminal link provider
|
|
99
|
-
bind(terminal_url_link_provider_1.UrlLinkProvider).toSelf().inSingletonScope();
|
|
100
|
-
bind(terminal_link_provider_1.TerminalLinkProvider).toService(terminal_url_link_provider_1.UrlLinkProvider);
|
|
101
|
-
bind(terminal_file_link_provider_1.FileLinkProvider).toSelf().inSingletonScope();
|
|
102
|
-
bind(terminal_link_provider_1.TerminalLinkProvider).toService(terminal_file_link_provider_1.FileLinkProvider);
|
|
103
|
-
bind(terminal_file_link_provider_1.FileDiffPreLinkProvider).toSelf().inSingletonScope();
|
|
104
|
-
bind(terminal_link_provider_1.TerminalLinkProvider).toService(terminal_file_link_provider_1.FileDiffPreLinkProvider);
|
|
105
|
-
bind(terminal_file_link_provider_1.FileDiffPostLinkProvider).toSelf().inSingletonScope();
|
|
106
|
-
bind(terminal_link_provider_1.TerminalLinkProvider).toService(terminal_file_link_provider_1.FileDiffPostLinkProvider);
|
|
107
|
-
bind(terminal_profile_service_1.ContributedTerminalProfileStore).to(terminal_profile_service_1.DefaultProfileStore).inSingletonScope();
|
|
108
|
-
bind(terminal_profile_service_1.UserTerminalProfileStore).to(terminal_profile_service_1.DefaultProfileStore).inSingletonScope();
|
|
109
|
-
bind(terminal_profile_service_1.TerminalProfileService).toDynamicValue(ctx => {
|
|
110
|
-
const userStore = ctx.container.get(terminal_profile_service_1.UserTerminalProfileStore);
|
|
111
|
-
const contributedStore = ctx.container.get(terminal_profile_service_1.ContributedTerminalProfileStore);
|
|
112
|
-
return new terminal_profile_service_1.DefaultTerminalProfileService(userStore, contributedStore);
|
|
113
|
-
}).inSingletonScope();
|
|
114
|
-
bind(browser_1.FrontendApplicationContribution).to(terminal_frontend_contribution_1.TerminalFrontendContribution);
|
|
115
|
-
});
|
|
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 WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
require("../../src/browser/style/terminal.css");
|
|
19
|
+
require("xterm/css/xterm.css");
|
|
20
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
21
|
+
const common_1 = require("@theia/core/lib/common");
|
|
22
|
+
const core_1 = require("@theia/core");
|
|
23
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
24
|
+
const tab_bar_toolbar_1 = require("@theia/core/lib/browser/shell/tab-bar-toolbar");
|
|
25
|
+
const terminal_frontend_contribution_1 = require("./terminal-frontend-contribution");
|
|
26
|
+
const terminal_widget_impl_1 = require("./terminal-widget-impl");
|
|
27
|
+
const terminal_widget_1 = require("./base/terminal-widget");
|
|
28
|
+
const terminal_protocol_1 = require("../common/terminal-protocol");
|
|
29
|
+
const terminal_watcher_1 = require("../common/terminal-watcher");
|
|
30
|
+
const shell_terminal_protocol_1 = require("../common/shell-terminal-protocol");
|
|
31
|
+
const terminal_keybinding_contexts_1 = require("./terminal-keybinding-contexts");
|
|
32
|
+
const terminal_common_module_1 = require("../common/terminal-common-module");
|
|
33
|
+
const terminal_service_1 = require("./base/terminal-service");
|
|
34
|
+
const terminal_preferences_1 = require("./terminal-preferences");
|
|
35
|
+
const terminal_contribution_1 = require("./terminal-contribution");
|
|
36
|
+
const terminal_search_widget_1 = require("./search/terminal-search-widget");
|
|
37
|
+
const terminal_quick_open_service_1 = require("./terminal-quick-open-service");
|
|
38
|
+
const terminal_search_container_1 = require("./search/terminal-search-container");
|
|
39
|
+
const terminal_copy_on_selection_handler_1 = require("./terminal-copy-on-selection-handler");
|
|
40
|
+
const color_application_contribution_1 = require("@theia/core/lib/browser/color-application-contribution");
|
|
41
|
+
const terminal_theme_service_1 = require("./terminal-theme-service");
|
|
42
|
+
const quick_access_1 = require("@theia/core/lib/browser/quick-input/quick-access");
|
|
43
|
+
const terminal_link_provider_1 = require("./terminal-link-provider");
|
|
44
|
+
const terminal_url_link_provider_1 = require("./terminal-url-link-provider");
|
|
45
|
+
const terminal_file_link_provider_1 = require("./terminal-file-link-provider");
|
|
46
|
+
const terminal_profile_service_1 = require("./terminal-profile-service");
|
|
47
|
+
exports.default = new inversify_1.ContainerModule(bind => {
|
|
48
|
+
(0, terminal_preferences_1.bindTerminalPreferences)(bind);
|
|
49
|
+
bind(browser_1.KeybindingContext).to(terminal_keybinding_contexts_1.TerminalActiveContext).inSingletonScope();
|
|
50
|
+
bind(browser_1.KeybindingContext).to(terminal_keybinding_contexts_1.TerminalSearchVisibleContext).inSingletonScope();
|
|
51
|
+
bind(terminal_widget_1.TerminalWidget).to(terminal_widget_impl_1.TerminalWidgetImpl).inTransientScope();
|
|
52
|
+
bind(terminal_watcher_1.TerminalWatcher).toSelf().inSingletonScope();
|
|
53
|
+
let terminalNum = 0;
|
|
54
|
+
bind(browser_1.WidgetFactory).toDynamicValue(ctx => ({
|
|
55
|
+
id: terminal_widget_impl_1.TERMINAL_WIDGET_FACTORY_ID,
|
|
56
|
+
createWidget: (options) => {
|
|
57
|
+
const child = new inversify_1.Container({ defaultScope: 'Singleton' });
|
|
58
|
+
child.parent = ctx.container;
|
|
59
|
+
const counter = terminalNum++;
|
|
60
|
+
const domId = options.id || 'terminal-' + counter;
|
|
61
|
+
const widgetOptions = Object.assign({ title: `${common_1.nls.localizeByDefault('Terminal')} ${counter}`, useServerTitle: true, destroyTermOnClose: true }, options);
|
|
62
|
+
child.bind(terminal_widget_1.TerminalWidgetOptions).toConstantValue(widgetOptions);
|
|
63
|
+
child.bind('terminal-dom-id').toConstantValue(domId);
|
|
64
|
+
child.bind(terminal_search_widget_1.TerminalSearchWidgetFactory).toDynamicValue(context => (0, terminal_search_container_1.createTerminalSearchFactory)(context.container));
|
|
65
|
+
return child.get(terminal_widget_1.TerminalWidget);
|
|
66
|
+
}
|
|
67
|
+
}));
|
|
68
|
+
bind(terminal_quick_open_service_1.TerminalQuickOpenService).toSelf().inSingletonScope();
|
|
69
|
+
bind(terminal_copy_on_selection_handler_1.TerminalCopyOnSelectionHandler).toSelf().inSingletonScope();
|
|
70
|
+
bind(terminal_quick_open_service_1.TerminalQuickOpenContribution).toSelf().inSingletonScope();
|
|
71
|
+
for (const identifier of [common_1.CommandContribution, quick_access_1.QuickAccessContribution]) {
|
|
72
|
+
bind(identifier).toService(terminal_quick_open_service_1.TerminalQuickOpenContribution);
|
|
73
|
+
}
|
|
74
|
+
bind(terminal_theme_service_1.TerminalThemeService).toSelf().inSingletonScope();
|
|
75
|
+
bind(terminal_frontend_contribution_1.TerminalFrontendContribution).toSelf().inSingletonScope();
|
|
76
|
+
bind(terminal_service_1.TerminalService).toService(terminal_frontend_contribution_1.TerminalFrontendContribution);
|
|
77
|
+
for (const identifier of [common_1.CommandContribution, common_1.MenuContribution, browser_1.KeybindingContribution, tab_bar_toolbar_1.TabBarToolbarContribution, color_application_contribution_1.ColorContribution]) {
|
|
78
|
+
bind(identifier).toService(terminal_frontend_contribution_1.TerminalFrontendContribution);
|
|
79
|
+
}
|
|
80
|
+
bind(terminal_protocol_1.ITerminalServer).toDynamicValue(ctx => {
|
|
81
|
+
const connection = ctx.container.get(browser_1.WebSocketConnectionProvider);
|
|
82
|
+
const terminalWatcher = ctx.container.get(terminal_watcher_1.TerminalWatcher);
|
|
83
|
+
return connection.createProxy(terminal_protocol_1.terminalPath, terminalWatcher.getTerminalClient());
|
|
84
|
+
}).inSingletonScope();
|
|
85
|
+
bind(shell_terminal_protocol_1.ShellTerminalServerProxy).toDynamicValue(ctx => {
|
|
86
|
+
const connection = ctx.container.get(browser_1.WebSocketConnectionProvider);
|
|
87
|
+
const terminalWatcher = ctx.container.get(terminal_watcher_1.TerminalWatcher);
|
|
88
|
+
return connection.createProxy(shell_terminal_protocol_1.shellTerminalPath, terminalWatcher.getTerminalClient());
|
|
89
|
+
}).inSingletonScope();
|
|
90
|
+
bind(shell_terminal_protocol_1.IShellTerminalServer).toService(shell_terminal_protocol_1.ShellTerminalServerProxy);
|
|
91
|
+
(0, terminal_common_module_1.createCommonBindings)(bind);
|
|
92
|
+
(0, core_1.bindContributionProvider)(bind, terminal_contribution_1.TerminalContribution);
|
|
93
|
+
// terminal link provider contribution point
|
|
94
|
+
(0, core_1.bindContributionProvider)(bind, terminal_link_provider_1.TerminalLinkProvider);
|
|
95
|
+
bind(terminal_link_provider_1.TerminalLinkProviderContribution).toSelf().inSingletonScope();
|
|
96
|
+
bind(terminal_contribution_1.TerminalContribution).toService(terminal_link_provider_1.TerminalLinkProviderContribution);
|
|
97
|
+
bind(terminal_link_provider_1.XtermLinkFactory).toFactory(terminal_link_provider_1.createXtermLinkFactory);
|
|
98
|
+
// default terminal link provider
|
|
99
|
+
bind(terminal_url_link_provider_1.UrlLinkProvider).toSelf().inSingletonScope();
|
|
100
|
+
bind(terminal_link_provider_1.TerminalLinkProvider).toService(terminal_url_link_provider_1.UrlLinkProvider);
|
|
101
|
+
bind(terminal_file_link_provider_1.FileLinkProvider).toSelf().inSingletonScope();
|
|
102
|
+
bind(terminal_link_provider_1.TerminalLinkProvider).toService(terminal_file_link_provider_1.FileLinkProvider);
|
|
103
|
+
bind(terminal_file_link_provider_1.FileDiffPreLinkProvider).toSelf().inSingletonScope();
|
|
104
|
+
bind(terminal_link_provider_1.TerminalLinkProvider).toService(terminal_file_link_provider_1.FileDiffPreLinkProvider);
|
|
105
|
+
bind(terminal_file_link_provider_1.FileDiffPostLinkProvider).toSelf().inSingletonScope();
|
|
106
|
+
bind(terminal_link_provider_1.TerminalLinkProvider).toService(terminal_file_link_provider_1.FileDiffPostLinkProvider);
|
|
107
|
+
bind(terminal_profile_service_1.ContributedTerminalProfileStore).to(terminal_profile_service_1.DefaultProfileStore).inSingletonScope();
|
|
108
|
+
bind(terminal_profile_service_1.UserTerminalProfileStore).to(terminal_profile_service_1.DefaultProfileStore).inSingletonScope();
|
|
109
|
+
bind(terminal_profile_service_1.TerminalProfileService).toDynamicValue(ctx => {
|
|
110
|
+
const userStore = ctx.container.get(terminal_profile_service_1.UserTerminalProfileStore);
|
|
111
|
+
const contributedStore = ctx.container.get(terminal_profile_service_1.ContributedTerminalProfileStore);
|
|
112
|
+
return new terminal_profile_service_1.DefaultTerminalProfileService(userStore, contributedStore);
|
|
113
|
+
}).inSingletonScope();
|
|
114
|
+
bind(browser_1.FrontendApplicationContribution).to(terminal_frontend_contribution_1.TerminalFrontendContribution);
|
|
115
|
+
});
|
|
116
116
|
//# sourceMappingURL=terminal-frontend-module.js.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { KeybindingContext, ApplicationShell } from '@theia/core/lib/browser';
|
|
2
|
-
export declare namespace TerminalKeybindingContexts {
|
|
3
|
-
const terminalActive = "terminalActive";
|
|
4
|
-
const terminalHideSearch = "hideSearch";
|
|
5
|
-
}
|
|
6
|
-
export declare class TerminalActiveContext implements KeybindingContext {
|
|
7
|
-
readonly id: string;
|
|
8
|
-
protected readonly shell: ApplicationShell;
|
|
9
|
-
isEnabled(): boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare class TerminalSearchVisibleContext implements KeybindingContext {
|
|
12
|
-
readonly id: string;
|
|
13
|
-
protected readonly shell: ApplicationShell;
|
|
14
|
-
isEnabled(): boolean;
|
|
15
|
-
}
|
|
1
|
+
import { KeybindingContext, ApplicationShell } from '@theia/core/lib/browser';
|
|
2
|
+
export declare namespace TerminalKeybindingContexts {
|
|
3
|
+
const terminalActive = "terminalActive";
|
|
4
|
+
const terminalHideSearch = "hideSearch";
|
|
5
|
+
}
|
|
6
|
+
export declare class TerminalActiveContext implements KeybindingContext {
|
|
7
|
+
readonly id: string;
|
|
8
|
+
protected readonly shell: ApplicationShell;
|
|
9
|
+
isEnabled(): boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare class TerminalSearchVisibleContext implements KeybindingContext {
|
|
12
|
+
readonly id: string;
|
|
13
|
+
protected readonly shell: ApplicationShell;
|
|
14
|
+
isEnabled(): boolean;
|
|
15
|
+
}
|
|
16
16
|
//# sourceMappingURL=terminal-keybinding-contexts.d.ts.map
|
|
@@ -1,72 +1,72 @@
|
|
|
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 WITH Classpath-exception-2.0
|
|
16
|
-
// *****************************************************************************
|
|
17
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
-
};
|
|
23
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
-
};
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.TerminalSearchVisibleContext = exports.TerminalActiveContext = exports.TerminalKeybindingContexts = void 0;
|
|
28
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
29
|
-
const browser_1 = require("@theia/core/lib/browser");
|
|
30
|
-
const terminal_widget_1 = require("./base/terminal-widget");
|
|
31
|
-
var TerminalKeybindingContexts;
|
|
32
|
-
(function (TerminalKeybindingContexts) {
|
|
33
|
-
TerminalKeybindingContexts.terminalActive = 'terminalActive';
|
|
34
|
-
TerminalKeybindingContexts.terminalHideSearch = 'hideSearch';
|
|
35
|
-
})(TerminalKeybindingContexts = exports.TerminalKeybindingContexts || (exports.TerminalKeybindingContexts = {}));
|
|
36
|
-
let TerminalActiveContext = class TerminalActiveContext {
|
|
37
|
-
constructor() {
|
|
38
|
-
this.id = TerminalKeybindingContexts.terminalActive;
|
|
39
|
-
}
|
|
40
|
-
isEnabled() {
|
|
41
|
-
return this.shell.activeWidget instanceof terminal_widget_1.TerminalWidget;
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
__decorate([
|
|
45
|
-
(0, inversify_1.inject)(browser_1.ApplicationShell),
|
|
46
|
-
__metadata("design:type", browser_1.ApplicationShell)
|
|
47
|
-
], TerminalActiveContext.prototype, "shell", void 0);
|
|
48
|
-
TerminalActiveContext = __decorate([
|
|
49
|
-
(0, inversify_1.injectable)()
|
|
50
|
-
], TerminalActiveContext);
|
|
51
|
-
exports.TerminalActiveContext = TerminalActiveContext;
|
|
52
|
-
let TerminalSearchVisibleContext = class TerminalSearchVisibleContext {
|
|
53
|
-
constructor() {
|
|
54
|
-
this.id = TerminalKeybindingContexts.terminalHideSearch;
|
|
55
|
-
}
|
|
56
|
-
isEnabled() {
|
|
57
|
-
if (!(this.shell.activeWidget instanceof terminal_widget_1.TerminalWidget)) {
|
|
58
|
-
return false;
|
|
59
|
-
}
|
|
60
|
-
const searchWidget = this.shell.activeWidget.getSearchBox();
|
|
61
|
-
return searchWidget.isVisible;
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
__decorate([
|
|
65
|
-
(0, inversify_1.inject)(browser_1.ApplicationShell),
|
|
66
|
-
__metadata("design:type", browser_1.ApplicationShell)
|
|
67
|
-
], TerminalSearchVisibleContext.prototype, "shell", void 0);
|
|
68
|
-
TerminalSearchVisibleContext = __decorate([
|
|
69
|
-
(0, inversify_1.injectable)()
|
|
70
|
-
], TerminalSearchVisibleContext);
|
|
71
|
-
exports.TerminalSearchVisibleContext = TerminalSearchVisibleContext;
|
|
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 WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.TerminalSearchVisibleContext = exports.TerminalActiveContext = exports.TerminalKeybindingContexts = void 0;
|
|
28
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
29
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
30
|
+
const terminal_widget_1 = require("./base/terminal-widget");
|
|
31
|
+
var TerminalKeybindingContexts;
|
|
32
|
+
(function (TerminalKeybindingContexts) {
|
|
33
|
+
TerminalKeybindingContexts.terminalActive = 'terminalActive';
|
|
34
|
+
TerminalKeybindingContexts.terminalHideSearch = 'hideSearch';
|
|
35
|
+
})(TerminalKeybindingContexts = exports.TerminalKeybindingContexts || (exports.TerminalKeybindingContexts = {}));
|
|
36
|
+
let TerminalActiveContext = class TerminalActiveContext {
|
|
37
|
+
constructor() {
|
|
38
|
+
this.id = TerminalKeybindingContexts.terminalActive;
|
|
39
|
+
}
|
|
40
|
+
isEnabled() {
|
|
41
|
+
return this.shell.activeWidget instanceof terminal_widget_1.TerminalWidget;
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, inversify_1.inject)(browser_1.ApplicationShell),
|
|
46
|
+
__metadata("design:type", browser_1.ApplicationShell)
|
|
47
|
+
], TerminalActiveContext.prototype, "shell", void 0);
|
|
48
|
+
TerminalActiveContext = __decorate([
|
|
49
|
+
(0, inversify_1.injectable)()
|
|
50
|
+
], TerminalActiveContext);
|
|
51
|
+
exports.TerminalActiveContext = TerminalActiveContext;
|
|
52
|
+
let TerminalSearchVisibleContext = class TerminalSearchVisibleContext {
|
|
53
|
+
constructor() {
|
|
54
|
+
this.id = TerminalKeybindingContexts.terminalHideSearch;
|
|
55
|
+
}
|
|
56
|
+
isEnabled() {
|
|
57
|
+
if (!(this.shell.activeWidget instanceof terminal_widget_1.TerminalWidget)) {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
const searchWidget = this.shell.activeWidget.getSearchBox();
|
|
61
|
+
return searchWidget.isVisible;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, inversify_1.inject)(browser_1.ApplicationShell),
|
|
66
|
+
__metadata("design:type", browser_1.ApplicationShell)
|
|
67
|
+
], TerminalSearchVisibleContext.prototype, "shell", void 0);
|
|
68
|
+
TerminalSearchVisibleContext = __decorate([
|
|
69
|
+
(0, inversify_1.injectable)()
|
|
70
|
+
], TerminalSearchVisibleContext);
|
|
71
|
+
exports.TerminalSearchVisibleContext = TerminalSearchVisibleContext;
|
|
72
72
|
//# sourceMappingURL=terminal-keybinding-contexts.js.map
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import type { IBufferRange, IBufferLine, Terminal } from 'xterm';
|
|
2
|
-
export declare const LinkContext: unique symbol;
|
|
3
|
-
export interface LinkContext {
|
|
4
|
-
text: string;
|
|
5
|
-
startLine: number;
|
|
6
|
-
lines: IBufferLine[];
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Mimics VS Code IRange
|
|
10
|
-
*/
|
|
11
|
-
interface TerminalRange {
|
|
12
|
-
readonly startLineNumber: number;
|
|
13
|
-
readonly startColumn: number;
|
|
14
|
-
readonly endLineNumber: number;
|
|
15
|
-
readonly endColumn: number;
|
|
16
|
-
}
|
|
17
|
-
export declare function getLinkContext(terminal: Terminal, line: number, maxLinkLength?: number): LinkContext;
|
|
18
|
-
/**
|
|
19
|
-
* Converts a possibly wrapped link's range (comprised of string indices) into a buffer range that plays nicely with xterm.js
|
|
20
|
-
*
|
|
21
|
-
* @param lines A single line (not the entire buffer)
|
|
22
|
-
* @param bufferWidth The number of columns in the terminal
|
|
23
|
-
* @param range The link range - string indices
|
|
24
|
-
* @param startLine The absolute y position (on the buffer) of the line
|
|
25
|
-
*/
|
|
26
|
-
export declare function convertLinkRangeToBuffer(lines: IBufferLine[], bufferWidth: number, range: TerminalRange, startLine: number): IBufferRange;
|
|
27
|
-
export {};
|
|
1
|
+
import type { IBufferRange, IBufferLine, Terminal } from 'xterm';
|
|
2
|
+
export declare const LinkContext: unique symbol;
|
|
3
|
+
export interface LinkContext {
|
|
4
|
+
text: string;
|
|
5
|
+
startLine: number;
|
|
6
|
+
lines: IBufferLine[];
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Mimics VS Code IRange
|
|
10
|
+
*/
|
|
11
|
+
interface TerminalRange {
|
|
12
|
+
readonly startLineNumber: number;
|
|
13
|
+
readonly startColumn: number;
|
|
14
|
+
readonly endLineNumber: number;
|
|
15
|
+
readonly endColumn: number;
|
|
16
|
+
}
|
|
17
|
+
export declare function getLinkContext(terminal: Terminal, line: number, maxLinkLength?: number): LinkContext;
|
|
18
|
+
/**
|
|
19
|
+
* Converts a possibly wrapped link's range (comprised of string indices) into a buffer range that plays nicely with xterm.js
|
|
20
|
+
*
|
|
21
|
+
* @param lines A single line (not the entire buffer)
|
|
22
|
+
* @param bufferWidth The number of columns in the terminal
|
|
23
|
+
* @param range The link range - string indices
|
|
24
|
+
* @param startLine The absolute y position (on the buffer) of the line
|
|
25
|
+
*/
|
|
26
|
+
export declare function convertLinkRangeToBuffer(lines: IBufferLine[], bufferWidth: number, range: TerminalRange, startLine: number): IBufferRange;
|
|
27
|
+
export {};
|
|
28
28
|
//# sourceMappingURL=terminal-link-helpers.d.ts.map
|