@theia/console 1.67.0-next.56 → 1.67.0-next.86
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/lib/browser/ansi-console-item.d.ts +13 -0
- package/lib/browser/ansi-console-item.d.ts.map +1 -0
- package/lib/browser/ansi-console-item.js +39 -0
- package/lib/browser/ansi-console-item.js.map +1 -0
- package/lib/browser/console-content-widget.d.ts +12 -0
- package/lib/browser/console-content-widget.d.ts.map +1 -0
- package/lib/browser/console-content-widget.js +69 -0
- package/lib/browser/console-content-widget.js.map +1 -0
- package/lib/browser/console-contribution.d.ts +34 -0
- package/lib/browser/console-contribution.d.ts.map +1 -0
- package/lib/browser/console-contribution.js +136 -0
- package/lib/browser/console-contribution.js.map +1 -0
- package/lib/browser/console-frontend-module.d.ts +5 -0
- package/lib/browser/console-frontend-module.d.ts.map +1 -0
- package/lib/browser/console-frontend-module.js +32 -0
- package/lib/browser/console-frontend-module.js.map +1 -0
- package/lib/browser/console-history.d.ts +20 -0
- package/lib/browser/console-history.d.ts.map +1 -0
- package/lib/browser/console-history.js +70 -0
- package/lib/browser/console-history.js.map +1 -0
- package/lib/browser/console-manager.d.ts +8 -0
- package/lib/browser/console-manager.d.ts.map +1 -0
- package/lib/browser/console-manager.js +41 -0
- package/lib/browser/console-manager.js.map +1 -0
- package/lib/browser/console-session-manager.d.ts +32 -0
- package/lib/browser/console-session-manager.d.ts.map +1 -0
- package/lib/browser/console-session-manager.js +112 -0
- package/lib/browser/console-session-manager.js.map +1 -0
- package/lib/browser/console-session.d.ts +28 -0
- package/lib/browser/console-session.d.ts.map +1 -0
- package/lib/browser/console-session.js +52 -0
- package/lib/browser/console-session.js.map +1 -0
- package/lib/browser/console-widget.d.ts +78 -0
- package/lib/browser/console-widget.d.ts.map +1 -0
- package/lib/browser/console-widget.js +312 -0
- package/lib/browser/console-widget.js.map +1 -0
- package/lib/package.spec.d.ts +1 -0
- package/lib/package.spec.d.ts.map +1 -0
- package/lib/package.spec.js +26 -0
- package/lib/package.spec.js.map +1 -0
- package/package.json +5 -5
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as React from '@theia/core/shared/react';
|
|
3
|
+
import { ConsoleItem } from './console-session';
|
|
4
|
+
import { Severity } from '@theia/core/lib/common/severity';
|
|
5
|
+
export declare class AnsiConsoleItem implements ConsoleItem {
|
|
6
|
+
readonly content: string;
|
|
7
|
+
readonly severity?: Severity | undefined;
|
|
8
|
+
protected readonly htmlContent: string;
|
|
9
|
+
constructor(content: string, severity?: Severity | undefined);
|
|
10
|
+
get visible(): boolean;
|
|
11
|
+
render(): React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=ansi-console-item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ansi-console-item.d.ts","sourceRoot":"","sources":["../../src/browser/ansi-console-item.tsx"],"names":[],"mappings":";AAgBA,OAAO,KAAK,KAAK,MAAM,0BAA0B,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAG3D,qBAAa,eAAgB,YAAW,WAAW;aAK3B,OAAO,EAAE,MAAM;aACf,QAAQ,CAAC;IAJ7B,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;gBAGnB,OAAO,EAAE,MAAM,EACf,QAAQ,CAAC,sBAAU;IAQvC,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,MAAM,IAAI,KAAK,CAAC,SAAS;CAO5B"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2018 TypeFox and others.
|
|
4
|
+
//
|
|
5
|
+
// This program and the accompanying materials are made available under the
|
|
6
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
//
|
|
9
|
+
// This Source Code may also be made available under the following Secondary
|
|
10
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
// with the GNU Classpath Exception which is available at
|
|
13
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
//
|
|
15
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.AnsiConsoleItem = void 0;
|
|
19
|
+
const React = require("@theia/core/shared/react");
|
|
20
|
+
const DOMPurify = require("@theia/core/shared/dompurify");
|
|
21
|
+
const Anser = require("anser");
|
|
22
|
+
class AnsiConsoleItem {
|
|
23
|
+
constructor(content, severity) {
|
|
24
|
+
this.content = content;
|
|
25
|
+
this.severity = severity;
|
|
26
|
+
this.htmlContent = new Anser().ansiToHtml(this.content, {
|
|
27
|
+
use_classes: true,
|
|
28
|
+
remove_empty: true
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
get visible() {
|
|
32
|
+
return !!this.htmlContent;
|
|
33
|
+
}
|
|
34
|
+
render() {
|
|
35
|
+
return React.createElement("div", { className: 'theia-console-ansi-console-item', dangerouslySetInnerHTML: { __html: DOMPurify.sanitize(this.htmlContent) } });
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.AnsiConsoleItem = AnsiConsoleItem;
|
|
39
|
+
//# sourceMappingURL=ansi-console-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ansi-console-item.js","sourceRoot":"","sources":["../../src/browser/ansi-console-item.tsx"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;AAEhF,kDAAkD;AAClD,0DAA0D;AAG1D,+BAAgC;AAEhC,MAAa,eAAe;IAIxB,YACoB,OAAe,EACf,QAAmB;QADnB,YAAO,GAAP,OAAO,CAAQ;QACf,aAAQ,GAAR,QAAQ,CAAW;QAEnC,IAAI,CAAC,WAAW,GAAG,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE;YACpD,WAAW,EAAE,IAAI;YACjB,YAAY,EAAE,IAAI;SACrB,CAAC,CAAC;IACP,CAAC;IAED,IAAI,OAAO;QACP,OAAO,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC;IAC9B,CAAC;IAED,MAAM;QACF,OAAO,6BACH,SAAS,EAAC,iCAAiC,EAC3C,uBAAuB,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,GAC3E,CAAC;IACP,CAAC;CAEJ;AAzBD,0CAyBC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { interfaces, Container } from '@theia/core/shared/inversify';
|
|
2
|
+
import { MenuPath } from '@theia/core';
|
|
3
|
+
import { TreeProps } from '@theia/core/lib/browser/tree';
|
|
4
|
+
import { SourceTreeWidget, TreeElementNode } from '@theia/core/lib/browser/source-tree';
|
|
5
|
+
import { ConsoleItem } from './console-session';
|
|
6
|
+
export declare class ConsoleContentWidget extends SourceTreeWidget {
|
|
7
|
+
static CONTEXT_MENU: MenuPath;
|
|
8
|
+
static createContainer(parent: interfaces.Container, props?: Partial<TreeProps>): Container;
|
|
9
|
+
protected createTreeElementNodeClassNames(node: TreeElementNode): string[];
|
|
10
|
+
protected toClassName(item: ConsoleItem): string | undefined;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=console-content-widget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"console-content-widget.d.ts","sourceRoot":"","sources":["../../src/browser/console-content-widget.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAc,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACxF,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,qBACa,oBAAqB,SAAQ,gBAAgB;IAEtD,MAAM,CAAC,YAAY,EAAE,QAAQ,CAA4B;WAEzC,eAAe,CAAC,MAAM,EAAE,UAAU,CAAC,SAAS,EAAE,KAAK,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,SAAS;cAajF,+BAA+B,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM,EAAE;IAUnF,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,GAAG,SAAS;CAgB/D"}
|
|
@@ -0,0 +1,69 @@
|
|
|
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 ConsoleContentWidget_1;
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.ConsoleContentWidget = void 0;
|
|
20
|
+
const tslib_1 = require("tslib");
|
|
21
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
22
|
+
const source_tree_1 = require("@theia/core/lib/browser/source-tree");
|
|
23
|
+
const console_session_1 = require("./console-session");
|
|
24
|
+
const severity_1 = require("@theia/core/lib/common/severity");
|
|
25
|
+
let ConsoleContentWidget = ConsoleContentWidget_1 = class ConsoleContentWidget extends source_tree_1.SourceTreeWidget {
|
|
26
|
+
static createContainer(parent, props) {
|
|
27
|
+
const child = source_tree_1.SourceTreeWidget.createContainer(parent, {
|
|
28
|
+
contextMenuPath: ConsoleContentWidget_1.CONTEXT_MENU,
|
|
29
|
+
viewProps: {
|
|
30
|
+
followOutput: true
|
|
31
|
+
},
|
|
32
|
+
...props
|
|
33
|
+
});
|
|
34
|
+
child.unbind(source_tree_1.SourceTreeWidget);
|
|
35
|
+
child.bind(ConsoleContentWidget_1).toSelf();
|
|
36
|
+
return child;
|
|
37
|
+
}
|
|
38
|
+
createTreeElementNodeClassNames(node) {
|
|
39
|
+
const classNames = super.createTreeElementNodeClassNames(node);
|
|
40
|
+
if (node.element) {
|
|
41
|
+
const className = this.toClassName(node.element);
|
|
42
|
+
if (className) {
|
|
43
|
+
classNames.push(className);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return classNames;
|
|
47
|
+
}
|
|
48
|
+
toClassName(item) {
|
|
49
|
+
if (item.severity === severity_1.Severity.Error) {
|
|
50
|
+
return console_session_1.ConsoleItem.errorClassName;
|
|
51
|
+
}
|
|
52
|
+
if (item.severity === severity_1.Severity.Warning) {
|
|
53
|
+
return console_session_1.ConsoleItem.warningClassName;
|
|
54
|
+
}
|
|
55
|
+
if (item.severity === severity_1.Severity.Info) {
|
|
56
|
+
return console_session_1.ConsoleItem.infoClassName;
|
|
57
|
+
}
|
|
58
|
+
if (item.severity === severity_1.Severity.Log) {
|
|
59
|
+
return console_session_1.ConsoleItem.logClassName;
|
|
60
|
+
}
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
exports.ConsoleContentWidget = ConsoleContentWidget;
|
|
65
|
+
ConsoleContentWidget.CONTEXT_MENU = ['console-context-menu'];
|
|
66
|
+
exports.ConsoleContentWidget = ConsoleContentWidget = ConsoleContentWidget_1 = tslib_1.__decorate([
|
|
67
|
+
(0, inversify_1.injectable)()
|
|
68
|
+
], ConsoleContentWidget);
|
|
69
|
+
//# sourceMappingURL=console-content-widget.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"console-content-widget.js","sourceRoot":"","sources":["../../src/browser/console-content-widget.tsx"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;;AAEhF,4DAAiF;AAGjF,qEAAwF;AACxF,uDAAgD;AAChD,8DAA2D;AAGpD,IAAM,oBAAoB,4BAA1B,MAAM,oBAAqB,SAAQ,8BAAgB;IAItD,MAAM,CAAU,eAAe,CAAC,MAA4B,EAAE,KAA0B;QACpF,MAAM,KAAK,GAAG,8BAAgB,CAAC,eAAe,CAAC,MAAM,EAAE;YACnD,eAAe,EAAE,sBAAoB,CAAC,YAAY;YAClD,SAAS,EAAE;gBACP,YAAY,EAAE,IAAI;aACrB;YACD,GAAG,KAAK;SACX,CAAC,CAAC;QACH,KAAK,CAAC,MAAM,CAAC,8BAAgB,CAAC,CAAC;QAC/B,KAAK,CAAC,IAAI,CAAC,sBAAoB,CAAC,CAAC,MAAM,EAAE,CAAC;QAC1C,OAAO,KAAK,CAAC;IACjB,CAAC;IAEkB,+BAA+B,CAAC,IAAqB;QACpE,MAAM,UAAU,GAAG,KAAK,CAAC,+BAA+B,CAAC,IAAI,CAAC,CAAC;QAC/D,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACf,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,CAAE,IAAI,CAAC,OAAuB,CAAC,CAAC;YAClE,IAAI,SAAS,EAAE,CAAC;gBACZ,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YAC/B,CAAC;QACL,CAAC;QACD,OAAO,UAAU,CAAC;IACtB,CAAC;IACS,WAAW,CAAC,IAAiB;QACnC,IAAI,IAAI,CAAC,QAAQ,KAAK,mBAAQ,CAAC,KAAK,EAAE,CAAC;YACnC,OAAO,6BAAW,CAAC,cAAc,CAAC;QACtC,CAAC;QACD,IAAI,IAAI,CAAC,QAAQ,KAAK,mBAAQ,CAAC,OAAO,EAAE,CAAC;YACrC,OAAO,6BAAW,CAAC,gBAAgB,CAAC;QACxC,CAAC;QACD,IAAI,IAAI,CAAC,QAAQ,KAAK,mBAAQ,CAAC,IAAI,EAAE,CAAC;YAClC,OAAO,6BAAW,CAAC,aAAa,CAAC;QACrC,CAAC;QACD,IAAI,IAAI,CAAC,QAAQ,KAAK,mBAAQ,CAAC,GAAG,EAAE,CAAC;YACjC,OAAO,6BAAW,CAAC,YAAY,CAAC;QACpC,CAAC;QACD,OAAO,SAAS,CAAC;IACrB,CAAC;;AAzCQ,oDAAoB;AAEtB,iCAAY,GAAa,CAAC,sBAAsB,CAAC,AAArC,CAAsC;+BAFhD,oBAAoB;IADhC,IAAA,sBAAU,GAAE;GACA,oBAAoB,CA2ChC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Command, CommandContribution, CommandRegistry, MenuContribution, MenuModelRegistry, CommandHandler } from '@theia/core';
|
|
2
|
+
import { FrontendApplicationContribution, KeybindingContribution, KeybindingRegistry } from '@theia/core/lib/browser';
|
|
3
|
+
import { ConsoleManager } from './console-manager';
|
|
4
|
+
import { ConsoleWidget } from './console-widget';
|
|
5
|
+
export declare namespace ConsoleCommands {
|
|
6
|
+
const SELECT_ALL: Command;
|
|
7
|
+
const COLLAPSE_ALL: Command;
|
|
8
|
+
const CLEAR: Command;
|
|
9
|
+
const EXECUTE: Command;
|
|
10
|
+
const NAVIGATE_BACK: Command;
|
|
11
|
+
const NAVIGATE_FORWARD: Command;
|
|
12
|
+
}
|
|
13
|
+
export declare namespace ConsoleContextMenu {
|
|
14
|
+
const CLIPBOARD: string[];
|
|
15
|
+
const CLEAR: string[];
|
|
16
|
+
}
|
|
17
|
+
export declare class ConsoleContribution implements FrontendApplicationContribution, CommandContribution, KeybindingContribution, MenuContribution {
|
|
18
|
+
protected readonly manager: ConsoleManager;
|
|
19
|
+
initialize(): void;
|
|
20
|
+
registerCommands(commands: CommandRegistry): void;
|
|
21
|
+
registerKeybindings(keybindings: KeybindingRegistry): void;
|
|
22
|
+
registerMenus(menus: MenuModelRegistry): void;
|
|
23
|
+
protected newCommandHandler(execute: ConsoleExecuteFunction): ConsoleCommandHandler;
|
|
24
|
+
}
|
|
25
|
+
export type ConsoleExecuteFunction = (console: ConsoleWidget, ...args: any[]) => any;
|
|
26
|
+
export declare class ConsoleCommandHandler implements CommandHandler {
|
|
27
|
+
protected readonly manager: ConsoleManager;
|
|
28
|
+
protected readonly doExecute: ConsoleExecuteFunction;
|
|
29
|
+
constructor(manager: ConsoleManager, doExecute: ConsoleExecuteFunction);
|
|
30
|
+
isEnabled(): boolean;
|
|
31
|
+
isVisible(): boolean;
|
|
32
|
+
execute(...args: any[]): any;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=console-contribution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"console-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/console-contribution.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,OAAO,EAAE,mBAAmB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S,EAAE,sBAAsB;gBADjC,OAAO,EAAE,cAAc,EACvB,SAAS,EAAE,sBAAsB;IAGxD,SAAS,IAAI,OAAO;IAIpB,SAAS,IAAI,OAAO;IAKpB,OAAO,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,GAAG;CAO/B"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2018 TypeFox and others.
|
|
4
|
+
//
|
|
5
|
+
// This program and the accompanying materials are made available under the
|
|
6
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
//
|
|
9
|
+
// This Source Code may also be made available under the following Secondary
|
|
10
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
// with the GNU Classpath Exception which is available at
|
|
13
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
//
|
|
15
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.ConsoleCommandHandler = exports.ConsoleContribution = exports.ConsoleContextMenu = exports.ConsoleCommands = void 0;
|
|
19
|
+
const tslib_1 = require("tslib");
|
|
20
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
21
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
22
|
+
const console_manager_1 = require("./console-manager");
|
|
23
|
+
const console_content_widget_1 = require("./console-content-widget");
|
|
24
|
+
const nls_1 = require("@theia/core/lib/common/nls");
|
|
25
|
+
var ConsoleCommands;
|
|
26
|
+
(function (ConsoleCommands) {
|
|
27
|
+
ConsoleCommands.SELECT_ALL = {
|
|
28
|
+
id: 'console.selectAll'
|
|
29
|
+
};
|
|
30
|
+
ConsoleCommands.COLLAPSE_ALL = {
|
|
31
|
+
id: 'console.collapseAll'
|
|
32
|
+
};
|
|
33
|
+
ConsoleCommands.CLEAR = {
|
|
34
|
+
id: 'console.clear'
|
|
35
|
+
};
|
|
36
|
+
ConsoleCommands.EXECUTE = {
|
|
37
|
+
id: 'console.execute'
|
|
38
|
+
};
|
|
39
|
+
ConsoleCommands.NAVIGATE_BACK = {
|
|
40
|
+
id: 'console.navigatePrevious'
|
|
41
|
+
};
|
|
42
|
+
ConsoleCommands.NAVIGATE_FORWARD = {
|
|
43
|
+
id: 'console.navigateNext'
|
|
44
|
+
};
|
|
45
|
+
})(ConsoleCommands || (exports.ConsoleCommands = ConsoleCommands = {}));
|
|
46
|
+
var ConsoleContextMenu;
|
|
47
|
+
(function (ConsoleContextMenu) {
|
|
48
|
+
ConsoleContextMenu.CLIPBOARD = [...console_content_widget_1.ConsoleContentWidget.CONTEXT_MENU, '1_clipboard'];
|
|
49
|
+
ConsoleContextMenu.CLEAR = [...console_content_widget_1.ConsoleContentWidget.CONTEXT_MENU, '2_clear'];
|
|
50
|
+
})(ConsoleContextMenu || (exports.ConsoleContextMenu = ConsoleContextMenu = {}));
|
|
51
|
+
let ConsoleContribution = class ConsoleContribution {
|
|
52
|
+
initialize() { }
|
|
53
|
+
registerCommands(commands) {
|
|
54
|
+
commands.registerCommand(ConsoleCommands.SELECT_ALL, this.newCommandHandler(console => console.selectAll()));
|
|
55
|
+
commands.registerCommand(ConsoleCommands.COLLAPSE_ALL, this.newCommandHandler(console => console.collapseAll()));
|
|
56
|
+
commands.registerCommand(ConsoleCommands.CLEAR, this.newCommandHandler(console => console.clear()));
|
|
57
|
+
commands.registerCommand(ConsoleCommands.EXECUTE, this.newCommandHandler(console => console.execute()));
|
|
58
|
+
commands.registerCommand(ConsoleCommands.NAVIGATE_BACK, this.newCommandHandler(console => console.navigateBack()));
|
|
59
|
+
commands.registerCommand(ConsoleCommands.NAVIGATE_FORWARD, this.newCommandHandler(console => console.navigateForward()));
|
|
60
|
+
}
|
|
61
|
+
registerKeybindings(keybindings) {
|
|
62
|
+
keybindings.registerKeybinding({
|
|
63
|
+
command: ConsoleCommands.SELECT_ALL.id,
|
|
64
|
+
keybinding: 'ctrlcmd+a',
|
|
65
|
+
when: 'consoleContentFocus'
|
|
66
|
+
});
|
|
67
|
+
keybindings.registerKeybinding({
|
|
68
|
+
command: ConsoleCommands.EXECUTE.id,
|
|
69
|
+
keybinding: 'enter',
|
|
70
|
+
when: 'consoleInputFocus'
|
|
71
|
+
});
|
|
72
|
+
keybindings.registerKeybinding({
|
|
73
|
+
command: ConsoleCommands.NAVIGATE_BACK.id,
|
|
74
|
+
keybinding: 'up',
|
|
75
|
+
when: 'consoleInputFocus && consoleNavigationBackEnabled'
|
|
76
|
+
});
|
|
77
|
+
keybindings.registerKeybinding({
|
|
78
|
+
command: ConsoleCommands.NAVIGATE_FORWARD.id,
|
|
79
|
+
keybinding: 'down',
|
|
80
|
+
when: 'consoleInputFocus && consoleNavigationForwardEnabled'
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
registerMenus(menus) {
|
|
84
|
+
menus.registerMenuAction(ConsoleContextMenu.CLIPBOARD, {
|
|
85
|
+
commandId: browser_1.CommonCommands.COPY.id,
|
|
86
|
+
label: browser_1.CommonCommands.COPY.label,
|
|
87
|
+
order: 'a1',
|
|
88
|
+
});
|
|
89
|
+
menus.registerMenuAction(ConsoleContextMenu.CLIPBOARD, {
|
|
90
|
+
commandId: ConsoleCommands.SELECT_ALL.id,
|
|
91
|
+
label: browser_1.CommonCommands.SELECT_ALL.label,
|
|
92
|
+
order: 'a2'
|
|
93
|
+
});
|
|
94
|
+
menus.registerMenuAction(ConsoleContextMenu.CLIPBOARD, {
|
|
95
|
+
commandId: ConsoleCommands.COLLAPSE_ALL.id,
|
|
96
|
+
label: nls_1.nls.localizeByDefault('Collapse All'),
|
|
97
|
+
order: 'a3'
|
|
98
|
+
});
|
|
99
|
+
menus.registerMenuAction(ConsoleContextMenu.CLEAR, {
|
|
100
|
+
commandId: ConsoleCommands.CLEAR.id,
|
|
101
|
+
label: nls_1.nls.localizeByDefault('Clear Console')
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
newCommandHandler(execute) {
|
|
105
|
+
return new ConsoleCommandHandler(this.manager, execute);
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
exports.ConsoleContribution = ConsoleContribution;
|
|
109
|
+
tslib_1.__decorate([
|
|
110
|
+
(0, inversify_1.inject)(console_manager_1.ConsoleManager),
|
|
111
|
+
tslib_1.__metadata("design:type", console_manager_1.ConsoleManager)
|
|
112
|
+
], ConsoleContribution.prototype, "manager", void 0);
|
|
113
|
+
exports.ConsoleContribution = ConsoleContribution = tslib_1.__decorate([
|
|
114
|
+
(0, inversify_1.injectable)()
|
|
115
|
+
], ConsoleContribution);
|
|
116
|
+
class ConsoleCommandHandler {
|
|
117
|
+
constructor(manager, doExecute) {
|
|
118
|
+
this.manager = manager;
|
|
119
|
+
this.doExecute = doExecute;
|
|
120
|
+
}
|
|
121
|
+
isEnabled() {
|
|
122
|
+
return !!this.manager.currentConsole;
|
|
123
|
+
}
|
|
124
|
+
isVisible() {
|
|
125
|
+
return !!this.manager.currentConsole;
|
|
126
|
+
}
|
|
127
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
128
|
+
execute(...args) {
|
|
129
|
+
const { currentConsole } = this.manager;
|
|
130
|
+
if (currentConsole) {
|
|
131
|
+
return this.doExecute(currentConsole, ...args);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
exports.ConsoleCommandHandler = ConsoleCommandHandler;
|
|
136
|
+
//# sourceMappingURL=console-contribution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"console-contribution.js","sourceRoot":"","sources":["../../src/browser/console-contribution.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AA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,OAAuB,EACvB,SAAiC;QADjC,YAAO,GAAP,OAAO,CAAgB;QACvB,cAAS,GAAT,SAAS,CAAwB;IACpD,CAAC;IAEL,SAAS;QACL,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC;IACzC,CAAC;IAED,SAAS;QACL,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC;IACzC,CAAC;IAED,8DAA8D;IAC9D,OAAO,CAAC,GAAG,IAAW;QAClB,MAAM,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;QACxC,IAAI,cAAc,EAAE,CAAC;YACjB,OAAO,IAAI,CAAC,SAAS,CAAC,cAAc,EAAE,GAAG,IAAI,CAAC,CAAC;QACnD,CAAC;IACL,CAAC;CAEJ;AAvBD,sDAuBC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"console-frontend-module.d.ts","sourceRoot":"","sources":["../../src/browser/console-frontend-module.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAM/D,OAAO,mCAAmC,CAAC;;AAE3C,wBAOG"}
|
|
@@ -0,0 +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
|
+
});
|
|
32
|
+
//# sourceMappingURL=console-frontend-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"console-frontend-module.js","sourceRoot":"","sources":["../../src/browser/console-frontend-module.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;AAEhF,4DAA+D;AAC/D,sCAAoE;AACpE,qDAAkG;AAClG,iEAA6D;AAC7D,uDAAmD;AAEnD,6CAA2C;AAE3C,kBAAe,IAAI,2BAAe,CAAC,IAAI,CAAC,EAAE;IACtC,IAAI,CAAC,gCAAc,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACjD,IAAI,CAAC,0CAAmB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACtD,IAAI,CAAC,yCAA+B,CAAC,CAAC,SAAS,CAAC,0CAAmB,CAAC,CAAC;IACrE,IAAI,CAAC,0BAAmB,CAAC,CAAC,SAAS,CAAC,0CAAmB,CAAC,CAAC;IACzD,IAAI,CAAC,gCAAsB,CAAC,CAAC,SAAS,CAAC,0CAAmB,CAAC,CAAC;IAC5D,IAAI,CAAC,uBAAgB,CAAC,CAAC,SAAS,CAAC,0CAAmB,CAAC,CAAC;AAC1D,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +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
|
+
}
|
|
20
|
+
//# sourceMappingURL=console-history.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"console-history.d.ts","sourceRoot":"","sources":["../../src/browser/console-history.ts"],"names":[],"mappings":"AAkBA,qBACa,cAAc;IAEvB,MAAM,CAAC,KAAK,SAAM;IAElB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,CAAM;IAChC,SAAS,CAAC,KAAK,SAAM;IAErB,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAMzB,SAAS,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAMrC,SAAS,CAAC,IAAI,IAAI,IAAI;IAOtB,IAAI,OAAO,IAAI,MAAM,GAAG,SAAS,CAEhC;IAED,IAAI,QAAQ,IAAI,MAAM,GAAG,SAAS,CAGjC;IAED,IAAI,IAAI,IAAI,MAAM,GAAG,SAAS,CAG7B;IAED,KAAK,IAAI,cAAc,CAAC,IAAI;IAK5B,OAAO,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI;CAKxC;AACD,yBAAiB,cAAc,CAAC;IAC5B,UAAiB,IAAI;QACjB,MAAM,EAAE,MAAM,EAAE,CAAC;QACjB,KAAK,EAAE,MAAM,CAAA;KAChB;CACJ"}
|
|
@@ -0,0 +1,70 @@
|
|
|
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 ConsoleHistory_1;
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.ConsoleHistory = void 0;
|
|
20
|
+
const tslib_1 = require("tslib");
|
|
21
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
22
|
+
let ConsoleHistory = ConsoleHistory_1 = class ConsoleHistory {
|
|
23
|
+
constructor() {
|
|
24
|
+
this.values = [];
|
|
25
|
+
this.index = -1;
|
|
26
|
+
}
|
|
27
|
+
push(value) {
|
|
28
|
+
this.delete(value);
|
|
29
|
+
this.values.push(value);
|
|
30
|
+
this.trim();
|
|
31
|
+
this.index = this.values.length;
|
|
32
|
+
}
|
|
33
|
+
delete(value) {
|
|
34
|
+
const index = this.values.indexOf(value);
|
|
35
|
+
if (index !== -1) {
|
|
36
|
+
this.values.splice(index, 1);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
trim() {
|
|
40
|
+
const index = this.values.length - ConsoleHistory_1.limit;
|
|
41
|
+
if (index > 0) {
|
|
42
|
+
this.values = this.values.slice(index);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
get current() {
|
|
46
|
+
return this.values[this.index];
|
|
47
|
+
}
|
|
48
|
+
get previous() {
|
|
49
|
+
this.index = Math.max(this.index - 1, -1);
|
|
50
|
+
return this.current;
|
|
51
|
+
}
|
|
52
|
+
get next() {
|
|
53
|
+
this.index = Math.min(this.index + 1, this.values.length);
|
|
54
|
+
return this.current;
|
|
55
|
+
}
|
|
56
|
+
store() {
|
|
57
|
+
const { values, index } = this;
|
|
58
|
+
return { values, index };
|
|
59
|
+
}
|
|
60
|
+
restore(object) {
|
|
61
|
+
this.values = object.values;
|
|
62
|
+
this.index = object.index;
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
exports.ConsoleHistory = ConsoleHistory;
|
|
66
|
+
ConsoleHistory.limit = 50;
|
|
67
|
+
exports.ConsoleHistory = ConsoleHistory = ConsoleHistory_1 = tslib_1.__decorate([
|
|
68
|
+
(0, inversify_1.injectable)()
|
|
69
|
+
], ConsoleHistory);
|
|
70
|
+
//# sourceMappingURL=console-history.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"console-history.js","sourceRoot":"","sources":["../../src/browser/console-history.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EA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KAAK,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAC1C,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,IAAI,IAAI;QACJ,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,KAAK;QACD,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;QAC/B,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAC7B,CAAC;IAED,OAAO,CAAC,MAAsB;QAC1B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;IAC9B,CAAC;;AAhDQ,wCAAc;AAEhB,oBAAK,GAAG,EAAE,AAAL,CAAM;yBAFT,cAAc;IAD1B,IAAA,sBAAU,GAAE;GACA,cAAc,CAkD1B"}
|
|
@@ -0,0 +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
|
+
}
|
|
8
|
+
//# sourceMappingURL=console-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"console-manager.d.ts","sourceRoot":"","sources":["../../src/browser/console-manager.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,qBACa,cAAc;IAGvB,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAC;IAE3C,IAAI,aAAa,IAAI,aAAa,GAAG,SAAS,CAG7C;IAED,IAAI,cAAc,IAAI,aAAa,GAAG,SAAS,CAG9C;CAEJ"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2018 TypeFox and others.
|
|
4
|
+
//
|
|
5
|
+
// This program and the accompanying materials are made available under the
|
|
6
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
//
|
|
9
|
+
// This Source Code may also be made available under the following Secondary
|
|
10
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
// with the GNU Classpath Exception which is available at
|
|
13
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
//
|
|
15
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.ConsoleManager = void 0;
|
|
19
|
+
const tslib_1 = require("tslib");
|
|
20
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
21
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
22
|
+
const console_widget_1 = require("./console-widget");
|
|
23
|
+
let ConsoleManager = class ConsoleManager {
|
|
24
|
+
get activeConsole() {
|
|
25
|
+
const widget = this.shell.activeWidget;
|
|
26
|
+
return widget instanceof console_widget_1.ConsoleWidget ? widget : undefined;
|
|
27
|
+
}
|
|
28
|
+
get currentConsole() {
|
|
29
|
+
const widget = this.shell.currentWidget;
|
|
30
|
+
return widget instanceof console_widget_1.ConsoleWidget ? widget : undefined;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
exports.ConsoleManager = ConsoleManager;
|
|
34
|
+
tslib_1.__decorate([
|
|
35
|
+
(0, inversify_1.inject)(browser_1.ApplicationShell),
|
|
36
|
+
tslib_1.__metadata("design:type", browser_1.ApplicationShell)
|
|
37
|
+
], ConsoleManager.prototype, "shell", void 0);
|
|
38
|
+
exports.ConsoleManager = ConsoleManager = tslib_1.__decorate([
|
|
39
|
+
(0, inversify_1.injectable)()
|
|
40
|
+
], ConsoleManager);
|
|
41
|
+
//# sourceMappingURL=console-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"console-manager.js","sourceRoot":"","sources":["../../src/browser/console-manager.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAEhF,4DAAkE;AAClE,qDAA2D;AAC3D,qDAAiD;AAG1C,IAAM,cAAc,GAApB,MAAM,cAAc;IAKvB,IAAI,aAAa;QACb,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC;QACvC,OAAO,MAAM,YAAY,8BAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;IAChE,CAAC;IAED,IAAI,cAAc;QACd,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC;QACxC,OAAO,MAAM,YAAY,8BAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;IAChE,CAAC;CAEJ,CAAA;AAfY,wCAAc;AAGJ;IADlB,IAAA,kBAAM,EAAC,0BAAgB,CAAC;sCACC,0BAAgB;6CAAC;yBAHlC,cAAc;IAD1B,IAAA,sBAAU,GAAE;GACA,cAAc,CAe1B"}
|
|
@@ -0,0 +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
|
+
}
|
|
32
|
+
//# sourceMappingURL=console-session-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"console-session-manager.d.ts","sourceRoot":"","sources":["../../src/browser/console-session-manager.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAE3D,qBACa,qBAAsB,YAAW,UAAU;IAEpD,SAAS,CAAC,QAAQ,CAAC,QAAQ,8BAAqC;IAChE,SAAS,CAAC,gBAAgB,EAAE,cAAc,GAAG,SAAS,CAAC;IACvD,SAAS,CAAC,SAAS,EAAE,QAAQ,GAAG,SAAS,CAAC;IAE1C,SAAS,CAAC,QAAQ,CAAC,mBAAmB,0BAAiC;IACvE,SAAS,CAAC,QAAQ,CAAC,qBAAqB,0BAAiC;IACzE,SAAS,CAAC,QAAQ,CAAC,sBAAsB,0BAAiC;IAC1E,SAAS,CAAC,QAAQ,CAAC,uBAAuB,0BAAiC;IAC3E,SAAS,CAAC,QAAQ,CAAC,6BAA6B,sCAA6C;IAC7F,SAAS,CAAC,QAAQ,CAAC,sBAAsB,gBAAuB;IAEhE,IAAI,eAAe,IAAI,KAAK,CAAC,cAAc,CAAC,CAE3C;IACD,IAAI,kBAAkB,IAAI,KAAK,CAAC,cAAc,CAAC,CAE9C;IACD,IAAI,gBAAgB,IAAI,KAAK,CAAC,cAAc,CAAC,CAE5C;IACD,IAAI,gBAAgB,IAAI,KAAK,CAAC,cAAc,CAAC,CAE5C;IACD,IAAI,0BAA0B,IAAI,KAAK,CAAC,cAAc,GAAG,SAAS,CAAC,CAElE;IACD,IAAI,mBAAmB,IAAI,KAAK,CAAC,IAAI,CAAC,CAErC;IAED,SAAS,CAAC,QAAQ,CAAC,SAAS,uBAA8B;IAC1D,SAAS,CAAC,QAAQ,C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