@theia/console 1.45.0 → 1.46.0-next.72
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 +30 -30
- package/lib/browser/ansi-console-item.d.ts +12 -12
- package/lib/browser/ansi-console-item.js +38 -38
- package/lib/browser/console-content-widget.d.ts +17 -17
- package/lib/browser/console-content-widget.js +93 -93
- package/lib/browser/console-contribution.d.ts +33 -33
- package/lib/browser/console-contribution.js +143 -143
- package/lib/browser/console-frontend-module.d.ts +4 -4
- package/lib/browser/console-frontend-module.js +31 -31
- package/lib/browser/console-history.d.ts +19 -19
- package/lib/browser/console-history.js +74 -74
- package/lib/browser/console-manager.d.ts +7 -7
- package/lib/browser/console-manager.js +48 -48
- package/lib/browser/console-session-manager.d.ts +31 -31
- package/lib/browser/console-session-manager.js +116 -116
- package/lib/browser/console-session.d.ts +27 -27
- package/lib/browser/console-session.js +56 -56
- package/lib/browser/console-widget.d.ts +67 -67
- package/lib/browser/console-widget.d.ts.map +1 -1
- package/lib/browser/console-widget.js +270 -271
- package/lib/browser/console-widget.js.map +1 -1
- package/lib/package.spec.js +25 -25
- package/package.json +6 -6
- package/src/browser/ansi-console-item.tsx +48 -48
- package/src/browser/console-content-widget.tsx +91 -91
- package/src/browser/console-contribution.ts +143 -143
- package/src/browser/console-frontend-module.ts +32 -32
- package/src/browser/console-history.ts +76 -76
- package/src/browser/console-manager.ts +37 -37
- package/src/browser/console-session-manager.ts +121 -121
- package/src/browser/console-session.ts +61 -61
- package/src/browser/console-widget.ts +298 -299
- package/src/browser/style/index.css +49 -49
- package/src/package.spec.ts +28 -28
|
@@ -1,144 +1,144 @@
|
|
|
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
|
-
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.ConsoleCommandHandler = exports.ConsoleContribution = exports.ConsoleContextMenu = exports.ConsoleCommands = void 0;
|
|
28
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
29
|
-
const browser_1 = require("@theia/core/lib/browser");
|
|
30
|
-
const console_manager_1 = require("./console-manager");
|
|
31
|
-
const console_content_widget_1 = require("./console-content-widget");
|
|
32
|
-
const nls_1 = require("@theia/core/lib/common/nls");
|
|
33
|
-
var ConsoleCommands;
|
|
34
|
-
(function (ConsoleCommands) {
|
|
35
|
-
ConsoleCommands.SELECT_ALL = {
|
|
36
|
-
id: 'console.selectAll'
|
|
37
|
-
};
|
|
38
|
-
ConsoleCommands.COLLAPSE_ALL = {
|
|
39
|
-
id: 'console.collapseAll'
|
|
40
|
-
};
|
|
41
|
-
ConsoleCommands.CLEAR = {
|
|
42
|
-
id: 'console.clear'
|
|
43
|
-
};
|
|
44
|
-
ConsoleCommands.EXECUTE = {
|
|
45
|
-
id: 'console.execute'
|
|
46
|
-
};
|
|
47
|
-
ConsoleCommands.NAVIGATE_BACK = {
|
|
48
|
-
id: 'console.navigatePrevious'
|
|
49
|
-
};
|
|
50
|
-
ConsoleCommands.NAVIGATE_FORWARD = {
|
|
51
|
-
id: 'console.navigateNext'
|
|
52
|
-
};
|
|
53
|
-
})(ConsoleCommands = exports.ConsoleCommands || (exports.ConsoleCommands = {}));
|
|
54
|
-
var ConsoleContextMenu;
|
|
55
|
-
(function (ConsoleContextMenu) {
|
|
56
|
-
ConsoleContextMenu.CLIPBOARD = [...console_content_widget_1.ConsoleContentWidget.CONTEXT_MENU, '1_clipboard'];
|
|
57
|
-
ConsoleContextMenu.CLEAR = [...console_content_widget_1.ConsoleContentWidget.CONTEXT_MENU, '2_clear'];
|
|
58
|
-
})(ConsoleContextMenu = exports.ConsoleContextMenu || (exports.ConsoleContextMenu = {}));
|
|
59
|
-
let ConsoleContribution = class ConsoleContribution {
|
|
60
|
-
initialize() { }
|
|
61
|
-
registerCommands(commands) {
|
|
62
|
-
commands.registerCommand(ConsoleCommands.SELECT_ALL, this.newCommandHandler(console => console.selectAll()));
|
|
63
|
-
commands.registerCommand(ConsoleCommands.COLLAPSE_ALL, this.newCommandHandler(console => console.collapseAll()));
|
|
64
|
-
commands.registerCommand(ConsoleCommands.CLEAR, this.newCommandHandler(console => console.clear()));
|
|
65
|
-
commands.registerCommand(ConsoleCommands.EXECUTE, this.newCommandHandler(console => console.execute()));
|
|
66
|
-
commands.registerCommand(ConsoleCommands.NAVIGATE_BACK, this.newCommandHandler(console => console.navigateBack()));
|
|
67
|
-
commands.registerCommand(ConsoleCommands.NAVIGATE_FORWARD, this.newCommandHandler(console => console.navigateForward()));
|
|
68
|
-
}
|
|
69
|
-
registerKeybindings(keybindings) {
|
|
70
|
-
keybindings.registerKeybinding({
|
|
71
|
-
command: ConsoleCommands.SELECT_ALL.id,
|
|
72
|
-
keybinding: 'ctrlcmd+a',
|
|
73
|
-
when: 'consoleContentFocus'
|
|
74
|
-
});
|
|
75
|
-
keybindings.registerKeybinding({
|
|
76
|
-
command: ConsoleCommands.EXECUTE.id,
|
|
77
|
-
keybinding: 'enter',
|
|
78
|
-
when: 'consoleInputFocus'
|
|
79
|
-
});
|
|
80
|
-
keybindings.registerKeybinding({
|
|
81
|
-
command: ConsoleCommands.NAVIGATE_BACK.id,
|
|
82
|
-
keybinding: 'up',
|
|
83
|
-
when: 'consoleInputFocus && consoleNavigationBackEnabled'
|
|
84
|
-
});
|
|
85
|
-
keybindings.registerKeybinding({
|
|
86
|
-
command: ConsoleCommands.NAVIGATE_FORWARD.id,
|
|
87
|
-
keybinding: 'down',
|
|
88
|
-
when: 'consoleInputFocus && consoleNavigationForwardEnabled'
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
registerMenus(menus) {
|
|
92
|
-
menus.registerMenuAction(ConsoleContextMenu.CLIPBOARD, {
|
|
93
|
-
commandId: browser_1.CommonCommands.COPY.id,
|
|
94
|
-
label: browser_1.CommonCommands.COPY.label,
|
|
95
|
-
order: 'a1',
|
|
96
|
-
});
|
|
97
|
-
menus.registerMenuAction(ConsoleContextMenu.CLIPBOARD, {
|
|
98
|
-
commandId: ConsoleCommands.SELECT_ALL.id,
|
|
99
|
-
label: browser_1.CommonCommands.SELECT_ALL.label,
|
|
100
|
-
order: 'a2'
|
|
101
|
-
});
|
|
102
|
-
menus.registerMenuAction(ConsoleContextMenu.CLIPBOARD, {
|
|
103
|
-
commandId: ConsoleCommands.COLLAPSE_ALL.id,
|
|
104
|
-
label: nls_1.nls.localizeByDefault('Collapse All'),
|
|
105
|
-
order: 'a3'
|
|
106
|
-
});
|
|
107
|
-
menus.registerMenuAction(ConsoleContextMenu.CLEAR, {
|
|
108
|
-
commandId: ConsoleCommands.CLEAR.id,
|
|
109
|
-
label: nls_1.nls.localizeByDefault('Clear Console')
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
newCommandHandler(execute) {
|
|
113
|
-
return new ConsoleCommandHandler(this.manager, execute);
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
__decorate([
|
|
117
|
-
(0, inversify_1.inject)(console_manager_1.ConsoleManager),
|
|
118
|
-
__metadata("design:type", console_manager_1.ConsoleManager)
|
|
119
|
-
], ConsoleContribution.prototype, "manager", void 0);
|
|
120
|
-
ConsoleContribution = __decorate([
|
|
121
|
-
(0, inversify_1.injectable)()
|
|
122
|
-
], ConsoleContribution);
|
|
123
|
-
exports.ConsoleContribution = ConsoleContribution;
|
|
124
|
-
class ConsoleCommandHandler {
|
|
125
|
-
constructor(manager, doExecute) {
|
|
126
|
-
this.manager = manager;
|
|
127
|
-
this.doExecute = doExecute;
|
|
128
|
-
}
|
|
129
|
-
isEnabled() {
|
|
130
|
-
return !!this.manager.currentConsole;
|
|
131
|
-
}
|
|
132
|
-
isVisible() {
|
|
133
|
-
return !!this.manager.currentConsole;
|
|
134
|
-
}
|
|
135
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
136
|
-
execute(...args) {
|
|
137
|
-
const { currentConsole } = this.manager;
|
|
138
|
-
if (currentConsole) {
|
|
139
|
-
return this.doExecute(currentConsole, ...args);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
exports.ConsoleCommandHandler = ConsoleCommandHandler;
|
|
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
|
+
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.ConsoleCommandHandler = exports.ConsoleContribution = exports.ConsoleContextMenu = exports.ConsoleCommands = void 0;
|
|
28
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
29
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
30
|
+
const console_manager_1 = require("./console-manager");
|
|
31
|
+
const console_content_widget_1 = require("./console-content-widget");
|
|
32
|
+
const nls_1 = require("@theia/core/lib/common/nls");
|
|
33
|
+
var ConsoleCommands;
|
|
34
|
+
(function (ConsoleCommands) {
|
|
35
|
+
ConsoleCommands.SELECT_ALL = {
|
|
36
|
+
id: 'console.selectAll'
|
|
37
|
+
};
|
|
38
|
+
ConsoleCommands.COLLAPSE_ALL = {
|
|
39
|
+
id: 'console.collapseAll'
|
|
40
|
+
};
|
|
41
|
+
ConsoleCommands.CLEAR = {
|
|
42
|
+
id: 'console.clear'
|
|
43
|
+
};
|
|
44
|
+
ConsoleCommands.EXECUTE = {
|
|
45
|
+
id: 'console.execute'
|
|
46
|
+
};
|
|
47
|
+
ConsoleCommands.NAVIGATE_BACK = {
|
|
48
|
+
id: 'console.navigatePrevious'
|
|
49
|
+
};
|
|
50
|
+
ConsoleCommands.NAVIGATE_FORWARD = {
|
|
51
|
+
id: 'console.navigateNext'
|
|
52
|
+
};
|
|
53
|
+
})(ConsoleCommands = exports.ConsoleCommands || (exports.ConsoleCommands = {}));
|
|
54
|
+
var ConsoleContextMenu;
|
|
55
|
+
(function (ConsoleContextMenu) {
|
|
56
|
+
ConsoleContextMenu.CLIPBOARD = [...console_content_widget_1.ConsoleContentWidget.CONTEXT_MENU, '1_clipboard'];
|
|
57
|
+
ConsoleContextMenu.CLEAR = [...console_content_widget_1.ConsoleContentWidget.CONTEXT_MENU, '2_clear'];
|
|
58
|
+
})(ConsoleContextMenu = exports.ConsoleContextMenu || (exports.ConsoleContextMenu = {}));
|
|
59
|
+
let ConsoleContribution = class ConsoleContribution {
|
|
60
|
+
initialize() { }
|
|
61
|
+
registerCommands(commands) {
|
|
62
|
+
commands.registerCommand(ConsoleCommands.SELECT_ALL, this.newCommandHandler(console => console.selectAll()));
|
|
63
|
+
commands.registerCommand(ConsoleCommands.COLLAPSE_ALL, this.newCommandHandler(console => console.collapseAll()));
|
|
64
|
+
commands.registerCommand(ConsoleCommands.CLEAR, this.newCommandHandler(console => console.clear()));
|
|
65
|
+
commands.registerCommand(ConsoleCommands.EXECUTE, this.newCommandHandler(console => console.execute()));
|
|
66
|
+
commands.registerCommand(ConsoleCommands.NAVIGATE_BACK, this.newCommandHandler(console => console.navigateBack()));
|
|
67
|
+
commands.registerCommand(ConsoleCommands.NAVIGATE_FORWARD, this.newCommandHandler(console => console.navigateForward()));
|
|
68
|
+
}
|
|
69
|
+
registerKeybindings(keybindings) {
|
|
70
|
+
keybindings.registerKeybinding({
|
|
71
|
+
command: ConsoleCommands.SELECT_ALL.id,
|
|
72
|
+
keybinding: 'ctrlcmd+a',
|
|
73
|
+
when: 'consoleContentFocus'
|
|
74
|
+
});
|
|
75
|
+
keybindings.registerKeybinding({
|
|
76
|
+
command: ConsoleCommands.EXECUTE.id,
|
|
77
|
+
keybinding: 'enter',
|
|
78
|
+
when: 'consoleInputFocus'
|
|
79
|
+
});
|
|
80
|
+
keybindings.registerKeybinding({
|
|
81
|
+
command: ConsoleCommands.NAVIGATE_BACK.id,
|
|
82
|
+
keybinding: 'up',
|
|
83
|
+
when: 'consoleInputFocus && consoleNavigationBackEnabled'
|
|
84
|
+
});
|
|
85
|
+
keybindings.registerKeybinding({
|
|
86
|
+
command: ConsoleCommands.NAVIGATE_FORWARD.id,
|
|
87
|
+
keybinding: 'down',
|
|
88
|
+
when: 'consoleInputFocus && consoleNavigationForwardEnabled'
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
registerMenus(menus) {
|
|
92
|
+
menus.registerMenuAction(ConsoleContextMenu.CLIPBOARD, {
|
|
93
|
+
commandId: browser_1.CommonCommands.COPY.id,
|
|
94
|
+
label: browser_1.CommonCommands.COPY.label,
|
|
95
|
+
order: 'a1',
|
|
96
|
+
});
|
|
97
|
+
menus.registerMenuAction(ConsoleContextMenu.CLIPBOARD, {
|
|
98
|
+
commandId: ConsoleCommands.SELECT_ALL.id,
|
|
99
|
+
label: browser_1.CommonCommands.SELECT_ALL.label,
|
|
100
|
+
order: 'a2'
|
|
101
|
+
});
|
|
102
|
+
menus.registerMenuAction(ConsoleContextMenu.CLIPBOARD, {
|
|
103
|
+
commandId: ConsoleCommands.COLLAPSE_ALL.id,
|
|
104
|
+
label: nls_1.nls.localizeByDefault('Collapse All'),
|
|
105
|
+
order: 'a3'
|
|
106
|
+
});
|
|
107
|
+
menus.registerMenuAction(ConsoleContextMenu.CLEAR, {
|
|
108
|
+
commandId: ConsoleCommands.CLEAR.id,
|
|
109
|
+
label: nls_1.nls.localizeByDefault('Clear Console')
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
newCommandHandler(execute) {
|
|
113
|
+
return new ConsoleCommandHandler(this.manager, execute);
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
__decorate([
|
|
117
|
+
(0, inversify_1.inject)(console_manager_1.ConsoleManager),
|
|
118
|
+
__metadata("design:type", console_manager_1.ConsoleManager)
|
|
119
|
+
], ConsoleContribution.prototype, "manager", void 0);
|
|
120
|
+
ConsoleContribution = __decorate([
|
|
121
|
+
(0, inversify_1.injectable)()
|
|
122
|
+
], ConsoleContribution);
|
|
123
|
+
exports.ConsoleContribution = ConsoleContribution;
|
|
124
|
+
class ConsoleCommandHandler {
|
|
125
|
+
constructor(manager, doExecute) {
|
|
126
|
+
this.manager = manager;
|
|
127
|
+
this.doExecute = doExecute;
|
|
128
|
+
}
|
|
129
|
+
isEnabled() {
|
|
130
|
+
return !!this.manager.currentConsole;
|
|
131
|
+
}
|
|
132
|
+
isVisible() {
|
|
133
|
+
return !!this.manager.currentConsole;
|
|
134
|
+
}
|
|
135
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
136
|
+
execute(...args) {
|
|
137
|
+
const { currentConsole } = this.manager;
|
|
138
|
+
if (currentConsole) {
|
|
139
|
+
return this.doExecute(currentConsole, ...args);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
exports.ConsoleCommandHandler = ConsoleCommandHandler;
|
|
144
144
|
//# sourceMappingURL=console-contribution.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ContainerModule } from '@theia/core/shared/inversify';
|
|
2
|
-
import '../../src/browser/style/index.css';
|
|
3
|
-
declare const _default: ContainerModule;
|
|
4
|
-
export default _default;
|
|
1
|
+
import { ContainerModule } from '@theia/core/shared/inversify';
|
|
2
|
+
import '../../src/browser/style/index.css';
|
|
3
|
+
declare const _default: ContainerModule;
|
|
4
|
+
export default _default;
|
|
5
5
|
//# sourceMappingURL=console-frontend-module.d.ts.map
|
|
@@ -1,32 +1,32 @@
|
|
|
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
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
19
|
-
const core_1 = require("@theia/core");
|
|
20
|
-
const browser_1 = require("@theia/core/lib/browser");
|
|
21
|
-
const console_contribution_1 = require("./console-contribution");
|
|
22
|
-
const console_manager_1 = require("./console-manager");
|
|
23
|
-
require("../../src/browser/style/index.css");
|
|
24
|
-
exports.default = new inversify_1.ContainerModule(bind => {
|
|
25
|
-
bind(console_manager_1.ConsoleManager).toSelf().inSingletonScope();
|
|
26
|
-
bind(console_contribution_1.ConsoleContribution).toSelf().inSingletonScope();
|
|
27
|
-
bind(browser_1.FrontendApplicationContribution).toService(console_contribution_1.ConsoleContribution);
|
|
28
|
-
bind(core_1.CommandContribution).toService(console_contribution_1.ConsoleContribution);
|
|
29
|
-
bind(browser_1.KeybindingContribution).toService(console_contribution_1.ConsoleContribution);
|
|
30
|
-
bind(core_1.MenuContribution).toService(console_contribution_1.ConsoleContribution);
|
|
31
|
-
});
|
|
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
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
19
|
+
const core_1 = require("@theia/core");
|
|
20
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
21
|
+
const console_contribution_1 = require("./console-contribution");
|
|
22
|
+
const console_manager_1 = require("./console-manager");
|
|
23
|
+
require("../../src/browser/style/index.css");
|
|
24
|
+
exports.default = new inversify_1.ContainerModule(bind => {
|
|
25
|
+
bind(console_manager_1.ConsoleManager).toSelf().inSingletonScope();
|
|
26
|
+
bind(console_contribution_1.ConsoleContribution).toSelf().inSingletonScope();
|
|
27
|
+
bind(browser_1.FrontendApplicationContribution).toService(console_contribution_1.ConsoleContribution);
|
|
28
|
+
bind(core_1.CommandContribution).toService(console_contribution_1.ConsoleContribution);
|
|
29
|
+
bind(browser_1.KeybindingContribution).toService(console_contribution_1.ConsoleContribution);
|
|
30
|
+
bind(core_1.MenuContribution).toService(console_contribution_1.ConsoleContribution);
|
|
31
|
+
});
|
|
32
32
|
//# sourceMappingURL=console-frontend-module.js.map
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export declare class ConsoleHistory {
|
|
2
|
-
static limit: number;
|
|
3
|
-
protected values: string[];
|
|
4
|
-
protected index: number;
|
|
5
|
-
push(value: string): void;
|
|
6
|
-
protected delete(value: string): void;
|
|
7
|
-
protected trim(): void;
|
|
8
|
-
get current(): string | undefined;
|
|
9
|
-
get previous(): string | undefined;
|
|
10
|
-
get next(): string | undefined;
|
|
11
|
-
store(): ConsoleHistory.Data;
|
|
12
|
-
restore(object: ConsoleHistory): void;
|
|
13
|
-
}
|
|
14
|
-
export declare namespace ConsoleHistory {
|
|
15
|
-
interface Data {
|
|
16
|
-
values: string[];
|
|
17
|
-
index: number;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
1
|
+
export declare class ConsoleHistory {
|
|
2
|
+
static limit: number;
|
|
3
|
+
protected values: string[];
|
|
4
|
+
protected index: number;
|
|
5
|
+
push(value: string): void;
|
|
6
|
+
protected delete(value: string): void;
|
|
7
|
+
protected trim(): void;
|
|
8
|
+
get current(): string | undefined;
|
|
9
|
+
get previous(): string | undefined;
|
|
10
|
+
get next(): string | undefined;
|
|
11
|
+
store(): ConsoleHistory.Data;
|
|
12
|
+
restore(object: ConsoleHistory): void;
|
|
13
|
+
}
|
|
14
|
+
export declare namespace ConsoleHistory {
|
|
15
|
+
interface Data {
|
|
16
|
+
values: string[];
|
|
17
|
+
index: number;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
20
|
//# sourceMappingURL=console-history.d.ts.map
|
|
@@ -1,75 +1,75 @@
|
|
|
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
|
-
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 ConsoleHistory_1;
|
|
24
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.ConsoleHistory = void 0;
|
|
26
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
27
|
-
let ConsoleHistory = ConsoleHistory_1 = class ConsoleHistory {
|
|
28
|
-
constructor() {
|
|
29
|
-
this.values = [];
|
|
30
|
-
this.index = -1;
|
|
31
|
-
}
|
|
32
|
-
push(value) {
|
|
33
|
-
this.delete(value);
|
|
34
|
-
this.values.push(value);
|
|
35
|
-
this.trim();
|
|
36
|
-
this.index = this.values.length;
|
|
37
|
-
}
|
|
38
|
-
delete(value) {
|
|
39
|
-
const index = this.values.indexOf(value);
|
|
40
|
-
if (index !== -1) {
|
|
41
|
-
this.values.splice(index, 1);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
trim() {
|
|
45
|
-
const index = this.values.length - ConsoleHistory_1.limit;
|
|
46
|
-
if (index > 0) {
|
|
47
|
-
this.values = this.values.slice(index);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
get current() {
|
|
51
|
-
return this.values[this.index];
|
|
52
|
-
}
|
|
53
|
-
get previous() {
|
|
54
|
-
this.index = Math.max(this.index - 1, -1);
|
|
55
|
-
return this.current;
|
|
56
|
-
}
|
|
57
|
-
get next() {
|
|
58
|
-
this.index = Math.min(this.index + 1, this.values.length);
|
|
59
|
-
return this.current;
|
|
60
|
-
}
|
|
61
|
-
store() {
|
|
62
|
-
const { values, index } = this;
|
|
63
|
-
return { values, index };
|
|
64
|
-
}
|
|
65
|
-
restore(object) {
|
|
66
|
-
this.values = object.values;
|
|
67
|
-
this.index = object.index;
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
ConsoleHistory.limit = 50;
|
|
71
|
-
ConsoleHistory = ConsoleHistory_1 = __decorate([
|
|
72
|
-
(0, inversify_1.injectable)()
|
|
73
|
-
], ConsoleHistory);
|
|
74
|
-
exports.ConsoleHistory = ConsoleHistory;
|
|
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
|
+
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 ConsoleHistory_1;
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.ConsoleHistory = void 0;
|
|
26
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
27
|
+
let ConsoleHistory = ConsoleHistory_1 = class ConsoleHistory {
|
|
28
|
+
constructor() {
|
|
29
|
+
this.values = [];
|
|
30
|
+
this.index = -1;
|
|
31
|
+
}
|
|
32
|
+
push(value) {
|
|
33
|
+
this.delete(value);
|
|
34
|
+
this.values.push(value);
|
|
35
|
+
this.trim();
|
|
36
|
+
this.index = this.values.length;
|
|
37
|
+
}
|
|
38
|
+
delete(value) {
|
|
39
|
+
const index = this.values.indexOf(value);
|
|
40
|
+
if (index !== -1) {
|
|
41
|
+
this.values.splice(index, 1);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
trim() {
|
|
45
|
+
const index = this.values.length - ConsoleHistory_1.limit;
|
|
46
|
+
if (index > 0) {
|
|
47
|
+
this.values = this.values.slice(index);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
get current() {
|
|
51
|
+
return this.values[this.index];
|
|
52
|
+
}
|
|
53
|
+
get previous() {
|
|
54
|
+
this.index = Math.max(this.index - 1, -1);
|
|
55
|
+
return this.current;
|
|
56
|
+
}
|
|
57
|
+
get next() {
|
|
58
|
+
this.index = Math.min(this.index + 1, this.values.length);
|
|
59
|
+
return this.current;
|
|
60
|
+
}
|
|
61
|
+
store() {
|
|
62
|
+
const { values, index } = this;
|
|
63
|
+
return { values, index };
|
|
64
|
+
}
|
|
65
|
+
restore(object) {
|
|
66
|
+
this.values = object.values;
|
|
67
|
+
this.index = object.index;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
ConsoleHistory.limit = 50;
|
|
71
|
+
ConsoleHistory = ConsoleHistory_1 = __decorate([
|
|
72
|
+
(0, inversify_1.injectable)()
|
|
73
|
+
], ConsoleHistory);
|
|
74
|
+
exports.ConsoleHistory = ConsoleHistory;
|
|
75
75
|
//# sourceMappingURL=console-history.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ApplicationShell } from '@theia/core/lib/browser';
|
|
2
|
-
import { ConsoleWidget } from './console-widget';
|
|
3
|
-
export declare class ConsoleManager {
|
|
4
|
-
protected readonly shell: ApplicationShell;
|
|
5
|
-
get activeConsole(): ConsoleWidget | undefined;
|
|
6
|
-
get currentConsole(): ConsoleWidget | undefined;
|
|
7
|
-
}
|
|
1
|
+
import { ApplicationShell } from '@theia/core/lib/browser';
|
|
2
|
+
import { ConsoleWidget } from './console-widget';
|
|
3
|
+
export declare class ConsoleManager {
|
|
4
|
+
protected readonly shell: ApplicationShell;
|
|
5
|
+
get activeConsole(): ConsoleWidget | undefined;
|
|
6
|
+
get currentConsole(): ConsoleWidget | undefined;
|
|
7
|
+
}
|
|
8
8
|
//# sourceMappingURL=console-manager.d.ts.map
|