@theia/console 1.56.0 → 1.57.0-next.112
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 +2 -1
- package/lib/browser/console-content-widget.d.ts +0 -6
- package/lib/browser/console-content-widget.d.ts.map +1 -1
- package/lib/browser/console-content-widget.js +3 -23
- package/lib/browser/console-content-widget.js.map +1 -1
- package/package.json +6 -6
- package/src/browser/console-content-widget.tsx +4 -27
package/README.md
CHANGED
|
@@ -26,5 +26,6 @@ The `@theia/console` extension contributes a `console` widget which is used to e
|
|
|
26
26
|
- [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
|
|
27
27
|
|
|
28
28
|
## Trademark
|
|
29
|
+
|
|
29
30
|
"Theia" is a trademark of the Eclipse Foundation
|
|
30
|
-
https://www.eclipse.org/theia
|
|
31
|
+
<https://www.eclipse.org/theia>
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Message } from '@theia/core/shared/@phosphor/messaging';
|
|
2
1
|
import { interfaces, Container } from '@theia/core/shared/inversify';
|
|
3
2
|
import { MenuPath } from '@theia/core';
|
|
4
3
|
import { TreeProps } from '@theia/core/lib/browser/tree';
|
|
@@ -6,12 +5,7 @@ import { SourceTreeWidget, TreeElementNode } from '@theia/core/lib/browser/sourc
|
|
|
6
5
|
import { ConsoleItem } from './console-session';
|
|
7
6
|
export declare class ConsoleContentWidget extends SourceTreeWidget {
|
|
8
7
|
static CONTEXT_MENU: MenuPath;
|
|
9
|
-
protected _shouldScrollToEnd: boolean;
|
|
10
|
-
protected set shouldScrollToEnd(shouldScrollToEnd: boolean);
|
|
11
|
-
protected get shouldScrollToEnd(): boolean;
|
|
12
8
|
static createContainer(parent: interfaces.Container, props?: Partial<TreeProps>): Container;
|
|
13
|
-
protected onAfterAttach(msg: Message): void;
|
|
14
|
-
protected revealLastOutputIfNeeded(): void;
|
|
15
9
|
protected createTreeElementNodeClassNames(node: TreeElementNode): string[];
|
|
16
10
|
protected toClassName(item: ConsoleItem): string | undefined;
|
|
17
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console-content-widget.d.ts","sourceRoot":"","sources":["../../src/browser/console-content-widget.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,
|
|
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"}
|
|
@@ -23,38 +23,18 @@ const source_tree_1 = require("@theia/core/lib/browser/source-tree");
|
|
|
23
23
|
const console_session_1 = require("./console-session");
|
|
24
24
|
const severity_1 = require("@theia/core/lib/common/severity");
|
|
25
25
|
let ConsoleContentWidget = ConsoleContentWidget_1 = class ConsoleContentWidget extends source_tree_1.SourceTreeWidget {
|
|
26
|
-
constructor() {
|
|
27
|
-
super(...arguments);
|
|
28
|
-
this._shouldScrollToEnd = true;
|
|
29
|
-
}
|
|
30
|
-
set shouldScrollToEnd(shouldScrollToEnd) {
|
|
31
|
-
this._shouldScrollToEnd = shouldScrollToEnd;
|
|
32
|
-
this.shouldScrollToRow = this._shouldScrollToEnd;
|
|
33
|
-
}
|
|
34
|
-
get shouldScrollToEnd() {
|
|
35
|
-
return this._shouldScrollToEnd;
|
|
36
|
-
}
|
|
37
26
|
static createContainer(parent, props) {
|
|
38
27
|
const child = source_tree_1.SourceTreeWidget.createContainer(parent, {
|
|
39
28
|
contextMenuPath: ConsoleContentWidget_1.CONTEXT_MENU,
|
|
29
|
+
viewProps: {
|
|
30
|
+
followOutput: true
|
|
31
|
+
},
|
|
40
32
|
...props
|
|
41
33
|
});
|
|
42
34
|
child.unbind(source_tree_1.SourceTreeWidget);
|
|
43
35
|
child.bind(ConsoleContentWidget_1).toSelf();
|
|
44
36
|
return child;
|
|
45
37
|
}
|
|
46
|
-
onAfterAttach(msg) {
|
|
47
|
-
super.onAfterAttach(msg);
|
|
48
|
-
this.toDisposeOnDetach.push(this.onScrollUp(() => this.shouldScrollToEnd = false));
|
|
49
|
-
this.toDisposeOnDetach.push(this.onScrollYReachEnd(() => this.shouldScrollToEnd = true));
|
|
50
|
-
this.toDisposeOnDetach.push(this.model.onChanged(() => this.revealLastOutputIfNeeded()));
|
|
51
|
-
}
|
|
52
|
-
revealLastOutputIfNeeded() {
|
|
53
|
-
const { root } = this.model;
|
|
54
|
-
if (this.shouldScrollToEnd && source_tree_1.TreeSourceNode.is(root)) {
|
|
55
|
-
this.model.selectNode(root.children[root.children.length - 1]);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
38
|
createTreeElementNodeClassNames(node) {
|
|
59
39
|
const classNames = super.createTreeElementNodeClassNames(node);
|
|
60
40
|
if (node.element) {
|
|
@@ -1 +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;;;;;
|
|
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"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/console",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.57.0-next.112+f4778c273",
|
|
4
4
|
"description": "Theia - Console Extension",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@theia/core": "1.
|
|
7
|
-
"@theia/monaco": "1.
|
|
8
|
-
"@theia/monaco-editor-core": "1.
|
|
6
|
+
"@theia/core": "1.57.0-next.112+f4778c273",
|
|
7
|
+
"@theia/monaco": "1.57.0-next.112+f4778c273",
|
|
8
|
+
"@theia/monaco-editor-core": "1.96.302",
|
|
9
9
|
"anser": "^2.0.1",
|
|
10
10
|
"tslib": "^2.6.2"
|
|
11
11
|
},
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
"watch": "theiaext watch"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@theia/ext-scripts": "1.
|
|
45
|
+
"@theia/ext-scripts": "1.58.0"
|
|
46
46
|
},
|
|
47
47
|
"nyc": {
|
|
48
48
|
"extends": "../../configs/nyc.json"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "f4778c2737bb75613f0e1f99da8996bad91f6e17"
|
|
51
51
|
}
|
|
@@ -14,11 +14,10 @@
|
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
|
-
import { Message } from '@theia/core/shared/@phosphor/messaging';
|
|
18
17
|
import { interfaces, Container, injectable } from '@theia/core/shared/inversify';
|
|
19
18
|
import { MenuPath } from '@theia/core';
|
|
20
19
|
import { TreeProps } from '@theia/core/lib/browser/tree';
|
|
21
|
-
import { SourceTreeWidget,
|
|
20
|
+
import { SourceTreeWidget, TreeElementNode } from '@theia/core/lib/browser/source-tree';
|
|
22
21
|
import { ConsoleItem } from './console-session';
|
|
23
22
|
import { Severity } from '@theia/core/lib/common/severity';
|
|
24
23
|
|
|
@@ -27,20 +26,12 @@ export class ConsoleContentWidget extends SourceTreeWidget {
|
|
|
27
26
|
|
|
28
27
|
static CONTEXT_MENU: MenuPath = ['console-context-menu'];
|
|
29
28
|
|
|
30
|
-
protected _shouldScrollToEnd = true;
|
|
31
|
-
|
|
32
|
-
protected set shouldScrollToEnd(shouldScrollToEnd: boolean) {
|
|
33
|
-
this._shouldScrollToEnd = shouldScrollToEnd;
|
|
34
|
-
this.shouldScrollToRow = this._shouldScrollToEnd;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
protected get shouldScrollToEnd(): boolean {
|
|
38
|
-
return this._shouldScrollToEnd;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
29
|
static override createContainer(parent: interfaces.Container, props?: Partial<TreeProps>): Container {
|
|
42
30
|
const child = SourceTreeWidget.createContainer(parent, {
|
|
43
31
|
contextMenuPath: ConsoleContentWidget.CONTEXT_MENU,
|
|
32
|
+
viewProps: {
|
|
33
|
+
followOutput: true
|
|
34
|
+
},
|
|
44
35
|
...props
|
|
45
36
|
});
|
|
46
37
|
child.unbind(SourceTreeWidget);
|
|
@@ -48,20 +39,6 @@ export class ConsoleContentWidget extends SourceTreeWidget {
|
|
|
48
39
|
return child;
|
|
49
40
|
}
|
|
50
41
|
|
|
51
|
-
protected override onAfterAttach(msg: Message): void {
|
|
52
|
-
super.onAfterAttach(msg);
|
|
53
|
-
this.toDisposeOnDetach.push(this.onScrollUp(() => this.shouldScrollToEnd = false));
|
|
54
|
-
this.toDisposeOnDetach.push(this.onScrollYReachEnd(() => this.shouldScrollToEnd = true));
|
|
55
|
-
this.toDisposeOnDetach.push(this.model.onChanged(() => this.revealLastOutputIfNeeded()));
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
protected revealLastOutputIfNeeded(): void {
|
|
59
|
-
const { root } = this.model;
|
|
60
|
-
if (this.shouldScrollToEnd && TreeSourceNode.is(root)) {
|
|
61
|
-
this.model.selectNode(root.children[root.children.length - 1]);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
42
|
protected override createTreeElementNodeClassNames(node: TreeElementNode): string[] {
|
|
66
43
|
const classNames = super.createTreeElementNodeClassNames(node);
|
|
67
44
|
if (node.element) {
|