@theia/console 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/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 +90 -90
- package/lib/browser/console-contribution.d.ts +33 -33
- package/lib/browser/console-contribution.js +144 -144
- package/lib/browser/console-frontend-module.d.ts +4 -4
- package/lib/browser/console-frontend-module.js +36 -36
- package/lib/browser/console-history.d.ts +19 -19
- package/lib/browser/console-history.js +74 -74
- package/lib/browser/console-keybinding-contexts.d.ts +39 -39
- package/lib/browser/console-keybinding-contexts.js +118 -118
- 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 +62 -62
- package/lib/browser/console-widget.js +247 -247
- package/lib/package.spec.js +25 -25
- package/package.json +5 -5
- package/src/browser/ansi-console-item.tsx +48 -48
- package/src/browser/console-content-widget.tsx +91 -91
- package/src/browser/console-contribution.ts +144 -144
- package/src/browser/console-frontend-module.ts +37 -37
- package/src/browser/console-history.ts +76 -76
- package/src/browser/console-keybinding-contexts.ts +107 -107
- 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 +273 -273
- package/src/browser/style/index.css +49 -49
- package/src/package.spec.ts +28 -28
|
@@ -1,119 +1,119 @@
|
|
|
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.ConsoleNavigationForwardEnabled = exports.ConsoleNavigationBackEnabled = exports.ConsoleContentFocusContext = exports.ConsoleInputFocusContext = exports.ConsoleKeybindingContexts = void 0;
|
|
28
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
29
|
-
const console_manager_1 = require("./console-manager");
|
|
30
|
-
var ConsoleKeybindingContexts;
|
|
31
|
-
(function (ConsoleKeybindingContexts) {
|
|
32
|
-
/**
|
|
33
|
-
* ID of a keybinding context that is enabled when the console content has the focus.
|
|
34
|
-
*/
|
|
35
|
-
ConsoleKeybindingContexts.consoleContentFocus = 'consoleContentFocus';
|
|
36
|
-
/**
|
|
37
|
-
* ID of a keybinding context that is enabled when the console input has the focus.
|
|
38
|
-
*/
|
|
39
|
-
ConsoleKeybindingContexts.consoleInputFocus = 'consoleInputFocus';
|
|
40
|
-
/**
|
|
41
|
-
* ID of a keybinding context that is enabled when the console history navigation back is enabled.
|
|
42
|
-
*/
|
|
43
|
-
ConsoleKeybindingContexts.consoleNavigationBackEnabled = 'consoleNavigationBackEnabled';
|
|
44
|
-
/**
|
|
45
|
-
* ID of a keybinding context that is enabled when the console history navigation forward is enabled.
|
|
46
|
-
*/
|
|
47
|
-
ConsoleKeybindingContexts.consoleNavigationForwardEnabled = 'consoleNavigationForwardEnabled';
|
|
48
|
-
})(ConsoleKeybindingContexts = exports.ConsoleKeybindingContexts || (exports.ConsoleKeybindingContexts = {}));
|
|
49
|
-
let ConsoleInputFocusContext = class ConsoleInputFocusContext {
|
|
50
|
-
constructor() {
|
|
51
|
-
this.id = ConsoleKeybindingContexts.consoleInputFocus;
|
|
52
|
-
}
|
|
53
|
-
isEnabled() {
|
|
54
|
-
const console = this.manager.activeConsole;
|
|
55
|
-
return !!console && this.isConsoleEnabled(console);
|
|
56
|
-
}
|
|
57
|
-
isConsoleEnabled(console) {
|
|
58
|
-
return console.hasInputFocus();
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
__decorate([
|
|
62
|
-
(0, inversify_1.inject)(console_manager_1.ConsoleManager),
|
|
63
|
-
__metadata("design:type", console_manager_1.ConsoleManager)
|
|
64
|
-
], ConsoleInputFocusContext.prototype, "manager", void 0);
|
|
65
|
-
ConsoleInputFocusContext = __decorate([
|
|
66
|
-
(0, inversify_1.injectable)()
|
|
67
|
-
], ConsoleInputFocusContext);
|
|
68
|
-
exports.ConsoleInputFocusContext = ConsoleInputFocusContext;
|
|
69
|
-
let ConsoleContentFocusContext = class ConsoleContentFocusContext extends ConsoleInputFocusContext {
|
|
70
|
-
constructor() {
|
|
71
|
-
super(...arguments);
|
|
72
|
-
this.id = ConsoleKeybindingContexts.consoleContentFocus;
|
|
73
|
-
}
|
|
74
|
-
isConsoleEnabled(console) {
|
|
75
|
-
return !console.input.isFocused();
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
ConsoleContentFocusContext = __decorate([
|
|
79
|
-
(0, inversify_1.injectable)()
|
|
80
|
-
], ConsoleContentFocusContext);
|
|
81
|
-
exports.ConsoleContentFocusContext = ConsoleContentFocusContext;
|
|
82
|
-
let ConsoleNavigationBackEnabled = class ConsoleNavigationBackEnabled extends ConsoleInputFocusContext {
|
|
83
|
-
constructor() {
|
|
84
|
-
super(...arguments);
|
|
85
|
-
this.id = ConsoleKeybindingContexts.consoleNavigationBackEnabled;
|
|
86
|
-
}
|
|
87
|
-
isConsoleEnabled(console) {
|
|
88
|
-
if (!super.isConsoleEnabled(console)) {
|
|
89
|
-
return false;
|
|
90
|
-
}
|
|
91
|
-
const editor = console.input.getControl();
|
|
92
|
-
return editor.getPosition().equals({ lineNumber: 1, column: 1 });
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
ConsoleNavigationBackEnabled = __decorate([
|
|
96
|
-
(0, inversify_1.injectable)()
|
|
97
|
-
], ConsoleNavigationBackEnabled);
|
|
98
|
-
exports.ConsoleNavigationBackEnabled = ConsoleNavigationBackEnabled;
|
|
99
|
-
let ConsoleNavigationForwardEnabled = class ConsoleNavigationForwardEnabled extends ConsoleInputFocusContext {
|
|
100
|
-
constructor() {
|
|
101
|
-
super(...arguments);
|
|
102
|
-
this.id = ConsoleKeybindingContexts.consoleNavigationForwardEnabled;
|
|
103
|
-
}
|
|
104
|
-
isConsoleEnabled(console) {
|
|
105
|
-
if (!super.isConsoleEnabled(console)) {
|
|
106
|
-
return false;
|
|
107
|
-
}
|
|
108
|
-
const editor = console.input.getControl();
|
|
109
|
-
const model = console.input.getControl().getModel();
|
|
110
|
-
const lineNumber = model.getLineCount();
|
|
111
|
-
const column = model.getLineMaxColumn(lineNumber);
|
|
112
|
-
return editor.getPosition().equals({ lineNumber, column });
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
ConsoleNavigationForwardEnabled = __decorate([
|
|
116
|
-
(0, inversify_1.injectable)()
|
|
117
|
-
], ConsoleNavigationForwardEnabled);
|
|
118
|
-
exports.ConsoleNavigationForwardEnabled = ConsoleNavigationForwardEnabled;
|
|
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.ConsoleNavigationForwardEnabled = exports.ConsoleNavigationBackEnabled = exports.ConsoleContentFocusContext = exports.ConsoleInputFocusContext = exports.ConsoleKeybindingContexts = void 0;
|
|
28
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
29
|
+
const console_manager_1 = require("./console-manager");
|
|
30
|
+
var ConsoleKeybindingContexts;
|
|
31
|
+
(function (ConsoleKeybindingContexts) {
|
|
32
|
+
/**
|
|
33
|
+
* ID of a keybinding context that is enabled when the console content has the focus.
|
|
34
|
+
*/
|
|
35
|
+
ConsoleKeybindingContexts.consoleContentFocus = 'consoleContentFocus';
|
|
36
|
+
/**
|
|
37
|
+
* ID of a keybinding context that is enabled when the console input has the focus.
|
|
38
|
+
*/
|
|
39
|
+
ConsoleKeybindingContexts.consoleInputFocus = 'consoleInputFocus';
|
|
40
|
+
/**
|
|
41
|
+
* ID of a keybinding context that is enabled when the console history navigation back is enabled.
|
|
42
|
+
*/
|
|
43
|
+
ConsoleKeybindingContexts.consoleNavigationBackEnabled = 'consoleNavigationBackEnabled';
|
|
44
|
+
/**
|
|
45
|
+
* ID of a keybinding context that is enabled when the console history navigation forward is enabled.
|
|
46
|
+
*/
|
|
47
|
+
ConsoleKeybindingContexts.consoleNavigationForwardEnabled = 'consoleNavigationForwardEnabled';
|
|
48
|
+
})(ConsoleKeybindingContexts = exports.ConsoleKeybindingContexts || (exports.ConsoleKeybindingContexts = {}));
|
|
49
|
+
let ConsoleInputFocusContext = class ConsoleInputFocusContext {
|
|
50
|
+
constructor() {
|
|
51
|
+
this.id = ConsoleKeybindingContexts.consoleInputFocus;
|
|
52
|
+
}
|
|
53
|
+
isEnabled() {
|
|
54
|
+
const console = this.manager.activeConsole;
|
|
55
|
+
return !!console && this.isConsoleEnabled(console);
|
|
56
|
+
}
|
|
57
|
+
isConsoleEnabled(console) {
|
|
58
|
+
return console.hasInputFocus();
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, inversify_1.inject)(console_manager_1.ConsoleManager),
|
|
63
|
+
__metadata("design:type", console_manager_1.ConsoleManager)
|
|
64
|
+
], ConsoleInputFocusContext.prototype, "manager", void 0);
|
|
65
|
+
ConsoleInputFocusContext = __decorate([
|
|
66
|
+
(0, inversify_1.injectable)()
|
|
67
|
+
], ConsoleInputFocusContext);
|
|
68
|
+
exports.ConsoleInputFocusContext = ConsoleInputFocusContext;
|
|
69
|
+
let ConsoleContentFocusContext = class ConsoleContentFocusContext extends ConsoleInputFocusContext {
|
|
70
|
+
constructor() {
|
|
71
|
+
super(...arguments);
|
|
72
|
+
this.id = ConsoleKeybindingContexts.consoleContentFocus;
|
|
73
|
+
}
|
|
74
|
+
isConsoleEnabled(console) {
|
|
75
|
+
return !console.input.isFocused();
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
ConsoleContentFocusContext = __decorate([
|
|
79
|
+
(0, inversify_1.injectable)()
|
|
80
|
+
], ConsoleContentFocusContext);
|
|
81
|
+
exports.ConsoleContentFocusContext = ConsoleContentFocusContext;
|
|
82
|
+
let ConsoleNavigationBackEnabled = class ConsoleNavigationBackEnabled extends ConsoleInputFocusContext {
|
|
83
|
+
constructor() {
|
|
84
|
+
super(...arguments);
|
|
85
|
+
this.id = ConsoleKeybindingContexts.consoleNavigationBackEnabled;
|
|
86
|
+
}
|
|
87
|
+
isConsoleEnabled(console) {
|
|
88
|
+
if (!super.isConsoleEnabled(console)) {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
const editor = console.input.getControl();
|
|
92
|
+
return editor.getPosition().equals({ lineNumber: 1, column: 1 });
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
ConsoleNavigationBackEnabled = __decorate([
|
|
96
|
+
(0, inversify_1.injectable)()
|
|
97
|
+
], ConsoleNavigationBackEnabled);
|
|
98
|
+
exports.ConsoleNavigationBackEnabled = ConsoleNavigationBackEnabled;
|
|
99
|
+
let ConsoleNavigationForwardEnabled = class ConsoleNavigationForwardEnabled extends ConsoleInputFocusContext {
|
|
100
|
+
constructor() {
|
|
101
|
+
super(...arguments);
|
|
102
|
+
this.id = ConsoleKeybindingContexts.consoleNavigationForwardEnabled;
|
|
103
|
+
}
|
|
104
|
+
isConsoleEnabled(console) {
|
|
105
|
+
if (!super.isConsoleEnabled(console)) {
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
const editor = console.input.getControl();
|
|
109
|
+
const model = console.input.getControl().getModel();
|
|
110
|
+
const lineNumber = model.getLineCount();
|
|
111
|
+
const column = model.getLineMaxColumn(lineNumber);
|
|
112
|
+
return editor.getPosition().equals({ lineNumber, column });
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
ConsoleNavigationForwardEnabled = __decorate([
|
|
116
|
+
(0, inversify_1.injectable)()
|
|
117
|
+
], ConsoleNavigationForwardEnabled);
|
|
118
|
+
exports.ConsoleNavigationForwardEnabled = ConsoleNavigationForwardEnabled;
|
|
119
119
|
//# sourceMappingURL=console-keybinding-contexts.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
|
|
@@ -1,49 +1,49 @@
|
|
|
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.ConsoleManager = void 0;
|
|
28
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
29
|
-
const browser_1 = require("@theia/core/lib/browser");
|
|
30
|
-
const console_widget_1 = require("./console-widget");
|
|
31
|
-
let ConsoleManager = class ConsoleManager {
|
|
32
|
-
get activeConsole() {
|
|
33
|
-
const widget = this.shell.activeWidget;
|
|
34
|
-
return widget instanceof console_widget_1.ConsoleWidget ? widget : undefined;
|
|
35
|
-
}
|
|
36
|
-
get currentConsole() {
|
|
37
|
-
const widget = this.shell.currentWidget;
|
|
38
|
-
return widget instanceof console_widget_1.ConsoleWidget ? widget : undefined;
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
__decorate([
|
|
42
|
-
(0, inversify_1.inject)(browser_1.ApplicationShell),
|
|
43
|
-
__metadata("design:type", browser_1.ApplicationShell)
|
|
44
|
-
], ConsoleManager.prototype, "shell", void 0);
|
|
45
|
-
ConsoleManager = __decorate([
|
|
46
|
-
(0, inversify_1.injectable)()
|
|
47
|
-
], ConsoleManager);
|
|
48
|
-
exports.ConsoleManager = ConsoleManager;
|
|
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.ConsoleManager = void 0;
|
|
28
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
29
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
30
|
+
const console_widget_1 = require("./console-widget");
|
|
31
|
+
let ConsoleManager = class ConsoleManager {
|
|
32
|
+
get activeConsole() {
|
|
33
|
+
const widget = this.shell.activeWidget;
|
|
34
|
+
return widget instanceof console_widget_1.ConsoleWidget ? widget : undefined;
|
|
35
|
+
}
|
|
36
|
+
get currentConsole() {
|
|
37
|
+
const widget = this.shell.currentWidget;
|
|
38
|
+
return widget instanceof console_widget_1.ConsoleWidget ? widget : undefined;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, inversify_1.inject)(browser_1.ApplicationShell),
|
|
43
|
+
__metadata("design:type", browser_1.ApplicationShell)
|
|
44
|
+
], ConsoleManager.prototype, "shell", void 0);
|
|
45
|
+
ConsoleManager = __decorate([
|
|
46
|
+
(0, inversify_1.injectable)()
|
|
47
|
+
], ConsoleManager);
|
|
48
|
+
exports.ConsoleManager = ConsoleManager;
|
|
49
49
|
//# sourceMappingURL=console-manager.js.map
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { Emitter, Event, Disposable, DisposableCollection } from '@theia/core';
|
|
2
|
-
import { ConsoleSession } from './console-session';
|
|
3
|
-
import { Severity } from '@theia/core/lib/common/severity';
|
|
4
|
-
export declare class ConsoleSessionManager implements Disposable {
|
|
5
|
-
protected readonly sessions: Map<string, ConsoleSession>;
|
|
6
|
-
protected _selectedSession: ConsoleSession | undefined;
|
|
7
|
-
protected _severity: Severity | undefined;
|
|
8
|
-
protected readonly sessionAddedEmitter: Emitter<ConsoleSession>;
|
|
9
|
-
protected readonly sessionDeletedEmitter: Emitter<ConsoleSession>;
|
|
10
|
-
protected readonly sessionWasShownEmitter: Emitter<ConsoleSession>;
|
|
11
|
-
protected readonly sessionWasHiddenEmitter: Emitter<ConsoleSession>;
|
|
12
|
-
protected readonly selectedSessionChangedEmitter: Emitter<ConsoleSession | undefined>;
|
|
13
|
-
protected readonly severityChangedEmitter: Emitter<void>;
|
|
14
|
-
get onDidAddSession(): Event<ConsoleSession>;
|
|
15
|
-
get onDidDeleteSession(): Event<ConsoleSession>;
|
|
16
|
-
get onDidShowSession(): Event<ConsoleSession>;
|
|
17
|
-
get onDidHideSession(): Event<ConsoleSession>;
|
|
18
|
-
get onDidChangeSelectedSession(): Event<ConsoleSession | undefined>;
|
|
19
|
-
get onDidChangeSeverity(): Event<void>;
|
|
20
|
-
protected readonly toDispose: DisposableCollection;
|
|
21
|
-
protected readonly toDisposeOnSessionDeletion: Map<string, Disposable>;
|
|
22
|
-
dispose(): void;
|
|
23
|
-
get severity(): Severity | undefined;
|
|
24
|
-
set severity(value: Severity | undefined);
|
|
25
|
-
get all(): ConsoleSession[];
|
|
26
|
-
get selectedSession(): ConsoleSession | undefined;
|
|
27
|
-
set selectedSession(session: ConsoleSession | undefined);
|
|
28
|
-
get(id: string): ConsoleSession | undefined;
|
|
29
|
-
add(session: ConsoleSession): void;
|
|
30
|
-
delete(id: string): void;
|
|
31
|
-
}
|
|
1
|
+
import { Emitter, Event, Disposable, DisposableCollection } from '@theia/core';
|
|
2
|
+
import { ConsoleSession } from './console-session';
|
|
3
|
+
import { Severity } from '@theia/core/lib/common/severity';
|
|
4
|
+
export declare class ConsoleSessionManager implements Disposable {
|
|
5
|
+
protected readonly sessions: Map<string, ConsoleSession>;
|
|
6
|
+
protected _selectedSession: ConsoleSession | undefined;
|
|
7
|
+
protected _severity: Severity | undefined;
|
|
8
|
+
protected readonly sessionAddedEmitter: Emitter<ConsoleSession>;
|
|
9
|
+
protected readonly sessionDeletedEmitter: Emitter<ConsoleSession>;
|
|
10
|
+
protected readonly sessionWasShownEmitter: Emitter<ConsoleSession>;
|
|
11
|
+
protected readonly sessionWasHiddenEmitter: Emitter<ConsoleSession>;
|
|
12
|
+
protected readonly selectedSessionChangedEmitter: Emitter<ConsoleSession | undefined>;
|
|
13
|
+
protected readonly severityChangedEmitter: Emitter<void>;
|
|
14
|
+
get onDidAddSession(): Event<ConsoleSession>;
|
|
15
|
+
get onDidDeleteSession(): Event<ConsoleSession>;
|
|
16
|
+
get onDidShowSession(): Event<ConsoleSession>;
|
|
17
|
+
get onDidHideSession(): Event<ConsoleSession>;
|
|
18
|
+
get onDidChangeSelectedSession(): Event<ConsoleSession | undefined>;
|
|
19
|
+
get onDidChangeSeverity(): Event<void>;
|
|
20
|
+
protected readonly toDispose: DisposableCollection;
|
|
21
|
+
protected readonly toDisposeOnSessionDeletion: Map<string, Disposable>;
|
|
22
|
+
dispose(): void;
|
|
23
|
+
get severity(): Severity | undefined;
|
|
24
|
+
set severity(value: Severity | undefined);
|
|
25
|
+
get all(): ConsoleSession[];
|
|
26
|
+
get selectedSession(): ConsoleSession | undefined;
|
|
27
|
+
set selectedSession(session: ConsoleSession | undefined);
|
|
28
|
+
get(id: string): ConsoleSession | undefined;
|
|
29
|
+
add(session: ConsoleSession): void;
|
|
30
|
+
delete(id: string): void;
|
|
31
|
+
}
|
|
32
32
|
//# sourceMappingURL=console-session-manager.d.ts.map
|