@theia/test 1.45.1 → 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/lib/browser/constants.d.ts +45 -45
- package/lib/browser/constants.js +17 -17
- package/lib/browser/test-service.d.ts +154 -154
- package/lib/browser/test-service.js +247 -247
- package/lib/browser/view/test-context-key-service.d.ts +7 -7
- package/lib/browser/view/test-context-key-service.js +51 -51
- package/lib/browser/view/test-execution-state-manager.d.ts +13 -13
- package/lib/browser/view/test-execution-state-manager.js +173 -173
- package/lib/browser/view/test-output-ui-model.d.ts +47 -47
- package/lib/browser/view/test-output-ui-model.js +151 -151
- package/lib/browser/view/test-output-view-contribution.d.ts +5 -5
- package/lib/browser/view/test-output-view-contribution.js +47 -47
- package/lib/browser/view/test-output-widget.d.ts +24 -24
- package/lib/browser/view/test-output-widget.js +158 -158
- package/lib/browser/view/test-result-view-contribution.d.ts +5 -5
- package/lib/browser/view/test-result-view-contribution.js +47 -47
- package/lib/browser/view/test-result-widget.d.ts +20 -20
- package/lib/browser/view/test-result-widget.js +108 -108
- package/lib/browser/view/test-run-view-contribution.d.ts +17 -17
- package/lib/browser/view/test-run-view-contribution.js +100 -100
- package/lib/browser/view/test-run-widget.d.ts +58 -58
- package/lib/browser/view/test-run-widget.js +310 -310
- package/lib/browser/view/test-tree-widget.d.ts +67 -67
- package/lib/browser/view/test-tree-widget.js +386 -386
- package/lib/browser/view/test-view-contribution.d.ts +45 -45
- package/lib/browser/view/test-view-contribution.js +288 -288
- package/lib/browser/view/test-view-frontend-module.d.ts +6 -6
- package/lib/browser/view/test-view-frontend-module.js +121 -121
- package/lib/common/collections.d.ts +46 -46
- package/lib/common/collections.js +210 -210
- package/lib/common/tree-delta.d.ts +51 -51
- package/lib/common/tree-delta.js +240 -240
- package/lib/common/tree-delta.spec.d.ts +1 -1
- package/lib/common/tree-delta.spec.js +139 -139
- package/package.json +8 -8
- package/src/browser/constants.ts +71 -71
- package/src/browser/style/index.css +41 -41
- package/src/browser/test-service.ts +355 -355
- package/src/browser/view/test-context-key-service.ts +36 -36
- package/src/browser/view/test-execution-state-manager.ts +147 -147
- package/src/browser/view/test-output-ui-model.ts +156 -156
- package/src/browser/view/test-output-view-contribution.ts +34 -34
- package/src/browser/view/test-output-widget.ts +148 -148
- package/src/browser/view/test-result-view-contribution.ts +34 -34
- package/src/browser/view/test-result-widget.ts +92 -92
- package/src/browser/view/test-run-view-contribution.ts +89 -89
- package/src/browser/view/test-run-widget.tsx +271 -271
- package/src/browser/view/test-tree-widget.tsx +360 -360
- package/src/browser/view/test-view-contribution.ts +300 -300
- package/src/browser/view/test-view-frontend-module.ts +134 -134
- package/src/common/collections.ts +223 -223
- package/src/common/tree-delta.spec.ts +166 -166
- package/src/common/tree-delta.ts +259 -259
|
@@ -1,122 +1,122 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2023 STMicroelectronics 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.createTestRunContainer = exports.createTestTreeContainer = void 0;
|
|
19
|
-
require("../../../src/browser/style/index.css");
|
|
20
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
21
|
-
const browser_1 = require("@theia/core/lib/browser");
|
|
22
|
-
const test_tree_widget_1 = require("./test-tree-widget");
|
|
23
|
-
const test_view_contribution_1 = require("./test-view-contribution");
|
|
24
|
-
const test_service_1 = require("../test-service");
|
|
25
|
-
const core_1 = require("@theia/core");
|
|
26
|
-
const tab_bar_toolbar_1 = require("@theia/core/lib/browser/shell/tab-bar-toolbar");
|
|
27
|
-
const test_execution_state_manager_1 = require("./test-execution-state-manager");
|
|
28
|
-
const test_result_widget_1 = require("./test-result-widget");
|
|
29
|
-
const test_output_widget_1 = require("./test-output-widget");
|
|
30
|
-
const test_output_view_contribution_1 = require("./test-output-view-contribution");
|
|
31
|
-
const test_output_ui_model_1 = require("./test-output-ui-model");
|
|
32
|
-
const test_run_widget_1 = require("./test-run-widget");
|
|
33
|
-
const test_result_view_contribution_1 = require("./test-result-view-contribution");
|
|
34
|
-
const test_run_view_contribution_1 = require("./test-run-view-contribution");
|
|
35
|
-
const test_context_key_service_1 = require("./test-context-key-service");
|
|
36
|
-
exports.default = new inversify_1.ContainerModule(bind => {
|
|
37
|
-
(0, core_1.bindContributionProvider)(bind, test_service_1.TestContribution);
|
|
38
|
-
bind(test_context_key_service_1.TestContextKeyService).toSelf().inSingletonScope();
|
|
39
|
-
bind(test_service_1.TestService).to(test_service_1.DefaultTestService).inSingletonScope();
|
|
40
|
-
bind(browser_1.WidgetFactory).toDynamicValue(({ container }) => ({
|
|
41
|
-
id: test_output_widget_1.TestOutputWidget.ID,
|
|
42
|
-
createWidget: () => container.get(test_output_widget_1.TestOutputWidget)
|
|
43
|
-
})).inSingletonScope();
|
|
44
|
-
bind(test_output_widget_1.TestOutputWidget).toSelf();
|
|
45
|
-
bind(browser_1.WidgetFactory).toDynamicValue(({ container }) => ({
|
|
46
|
-
id: test_result_widget_1.TestResultWidget.ID,
|
|
47
|
-
createWidget: () => container.get(test_result_widget_1.TestResultWidget)
|
|
48
|
-
})).inSingletonScope();
|
|
49
|
-
bind(test_result_widget_1.TestResultWidget).toSelf();
|
|
50
|
-
bind(test_tree_widget_1.TestTreeWidget).toDynamicValue(({ container }) => {
|
|
51
|
-
const child = createTestTreeContainer(container);
|
|
52
|
-
return child.get(test_tree_widget_1.TestTreeWidget);
|
|
53
|
-
});
|
|
54
|
-
bind(browser_1.WidgetFactory).toDynamicValue(({ container }) => ({
|
|
55
|
-
id: test_tree_widget_1.TestTreeWidget.ID,
|
|
56
|
-
createWidget: () => container.get(test_tree_widget_1.TestTreeWidget)
|
|
57
|
-
})).inSingletonScope();
|
|
58
|
-
bind(test_run_widget_1.TestRunTreeWidget).toDynamicValue(({ container }) => {
|
|
59
|
-
const child = createTestRunContainer(container);
|
|
60
|
-
return child.get(test_run_widget_1.TestRunTreeWidget);
|
|
61
|
-
});
|
|
62
|
-
bind(browser_1.WidgetFactory).toDynamicValue(({ container }) => ({
|
|
63
|
-
id: test_run_widget_1.TestRunTreeWidget.ID,
|
|
64
|
-
createWidget: () => container.get(test_run_widget_1.TestRunTreeWidget)
|
|
65
|
-
})).inSingletonScope();
|
|
66
|
-
bind(browser_1.WidgetFactory).toDynamicValue(({ container }) => ({
|
|
67
|
-
id: test_view_contribution_1.TEST_VIEW_CONTAINER_ID,
|
|
68
|
-
createWidget: async () => {
|
|
69
|
-
const viewContainer = container.get(browser_1.ViewContainer.Factory)({
|
|
70
|
-
id: test_view_contribution_1.TEST_VIEW_CONTAINER_ID,
|
|
71
|
-
progressLocationId: 'test'
|
|
72
|
-
});
|
|
73
|
-
viewContainer.setTitleOptions(test_view_contribution_1.TEST_VIEW_CONTAINER_TITLE_OPTIONS);
|
|
74
|
-
let widget = await container.get(browser_1.WidgetManager).getOrCreateWidget(test_tree_widget_1.TestTreeWidget.ID);
|
|
75
|
-
viewContainer.addWidget(widget, {
|
|
76
|
-
canHide: false,
|
|
77
|
-
initiallyCollapsed: false
|
|
78
|
-
});
|
|
79
|
-
widget = await container.get(browser_1.WidgetManager).getOrCreateWidget(test_run_widget_1.TestRunTreeWidget.ID);
|
|
80
|
-
viewContainer.addWidget(widget, {
|
|
81
|
-
canHide: true,
|
|
82
|
-
initiallyCollapsed: false,
|
|
83
|
-
});
|
|
84
|
-
return viewContainer;
|
|
85
|
-
}
|
|
86
|
-
})).inSingletonScope();
|
|
87
|
-
(0, browser_1.bindViewContribution)(bind, test_view_contribution_1.TestViewContribution);
|
|
88
|
-
(0, browser_1.bindViewContribution)(bind, test_run_view_contribution_1.TestRunViewContribution);
|
|
89
|
-
(0, browser_1.bindViewContribution)(bind, test_result_view_contribution_1.TestResultViewContribution);
|
|
90
|
-
(0, browser_1.bindViewContribution)(bind, test_output_view_contribution_1.TestOutputViewContribution);
|
|
91
|
-
bind(browser_1.FrontendApplicationContribution).toService(test_view_contribution_1.TestViewContribution);
|
|
92
|
-
bind(tab_bar_toolbar_1.TabBarToolbarContribution).toService(test_view_contribution_1.TestViewContribution);
|
|
93
|
-
bind(tab_bar_toolbar_1.TabBarToolbarContribution).toService(test_run_view_contribution_1.TestRunViewContribution);
|
|
94
|
-
bind(test_execution_state_manager_1.TestExecutionStateManager).toSelf().inSingletonScope();
|
|
95
|
-
bind(test_output_ui_model_1.TestOutputUIModel).toSelf().inSingletonScope();
|
|
96
|
-
});
|
|
97
|
-
function createTestTreeContainer(parent) {
|
|
98
|
-
return (0, browser_1.createTreeContainer)(parent, {
|
|
99
|
-
tree: test_tree_widget_1.TestTree,
|
|
100
|
-
props: {
|
|
101
|
-
virtualized: false,
|
|
102
|
-
search: true,
|
|
103
|
-
contextMenuPath: test_view_contribution_1.TEST_VIEW_CONTEXT_MENU
|
|
104
|
-
},
|
|
105
|
-
widget: test_tree_widget_1.TestTreeWidget,
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
exports.createTestTreeContainer = createTestTreeContainer;
|
|
109
|
-
function createTestRunContainer(parent) {
|
|
110
|
-
return (0, browser_1.createTreeContainer)(parent, {
|
|
111
|
-
tree: test_run_widget_1.TestRunTree,
|
|
112
|
-
props: {
|
|
113
|
-
virtualized: false,
|
|
114
|
-
search: true,
|
|
115
|
-
multiSelect: false,
|
|
116
|
-
contextMenuPath: test_run_view_contribution_1.TEST_RUNS_CONTEXT_MENU
|
|
117
|
-
},
|
|
118
|
-
widget: test_run_widget_1.TestRunTreeWidget
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
exports.createTestRunContainer = createTestRunContainer;
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2023 STMicroelectronics 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.createTestRunContainer = exports.createTestTreeContainer = void 0;
|
|
19
|
+
require("../../../src/browser/style/index.css");
|
|
20
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
21
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
22
|
+
const test_tree_widget_1 = require("./test-tree-widget");
|
|
23
|
+
const test_view_contribution_1 = require("./test-view-contribution");
|
|
24
|
+
const test_service_1 = require("../test-service");
|
|
25
|
+
const core_1 = require("@theia/core");
|
|
26
|
+
const tab_bar_toolbar_1 = require("@theia/core/lib/browser/shell/tab-bar-toolbar");
|
|
27
|
+
const test_execution_state_manager_1 = require("./test-execution-state-manager");
|
|
28
|
+
const test_result_widget_1 = require("./test-result-widget");
|
|
29
|
+
const test_output_widget_1 = require("./test-output-widget");
|
|
30
|
+
const test_output_view_contribution_1 = require("./test-output-view-contribution");
|
|
31
|
+
const test_output_ui_model_1 = require("./test-output-ui-model");
|
|
32
|
+
const test_run_widget_1 = require("./test-run-widget");
|
|
33
|
+
const test_result_view_contribution_1 = require("./test-result-view-contribution");
|
|
34
|
+
const test_run_view_contribution_1 = require("./test-run-view-contribution");
|
|
35
|
+
const test_context_key_service_1 = require("./test-context-key-service");
|
|
36
|
+
exports.default = new inversify_1.ContainerModule(bind => {
|
|
37
|
+
(0, core_1.bindContributionProvider)(bind, test_service_1.TestContribution);
|
|
38
|
+
bind(test_context_key_service_1.TestContextKeyService).toSelf().inSingletonScope();
|
|
39
|
+
bind(test_service_1.TestService).to(test_service_1.DefaultTestService).inSingletonScope();
|
|
40
|
+
bind(browser_1.WidgetFactory).toDynamicValue(({ container }) => ({
|
|
41
|
+
id: test_output_widget_1.TestOutputWidget.ID,
|
|
42
|
+
createWidget: () => container.get(test_output_widget_1.TestOutputWidget)
|
|
43
|
+
})).inSingletonScope();
|
|
44
|
+
bind(test_output_widget_1.TestOutputWidget).toSelf();
|
|
45
|
+
bind(browser_1.WidgetFactory).toDynamicValue(({ container }) => ({
|
|
46
|
+
id: test_result_widget_1.TestResultWidget.ID,
|
|
47
|
+
createWidget: () => container.get(test_result_widget_1.TestResultWidget)
|
|
48
|
+
})).inSingletonScope();
|
|
49
|
+
bind(test_result_widget_1.TestResultWidget).toSelf();
|
|
50
|
+
bind(test_tree_widget_1.TestTreeWidget).toDynamicValue(({ container }) => {
|
|
51
|
+
const child = createTestTreeContainer(container);
|
|
52
|
+
return child.get(test_tree_widget_1.TestTreeWidget);
|
|
53
|
+
});
|
|
54
|
+
bind(browser_1.WidgetFactory).toDynamicValue(({ container }) => ({
|
|
55
|
+
id: test_tree_widget_1.TestTreeWidget.ID,
|
|
56
|
+
createWidget: () => container.get(test_tree_widget_1.TestTreeWidget)
|
|
57
|
+
})).inSingletonScope();
|
|
58
|
+
bind(test_run_widget_1.TestRunTreeWidget).toDynamicValue(({ container }) => {
|
|
59
|
+
const child = createTestRunContainer(container);
|
|
60
|
+
return child.get(test_run_widget_1.TestRunTreeWidget);
|
|
61
|
+
});
|
|
62
|
+
bind(browser_1.WidgetFactory).toDynamicValue(({ container }) => ({
|
|
63
|
+
id: test_run_widget_1.TestRunTreeWidget.ID,
|
|
64
|
+
createWidget: () => container.get(test_run_widget_1.TestRunTreeWidget)
|
|
65
|
+
})).inSingletonScope();
|
|
66
|
+
bind(browser_1.WidgetFactory).toDynamicValue(({ container }) => ({
|
|
67
|
+
id: test_view_contribution_1.TEST_VIEW_CONTAINER_ID,
|
|
68
|
+
createWidget: async () => {
|
|
69
|
+
const viewContainer = container.get(browser_1.ViewContainer.Factory)({
|
|
70
|
+
id: test_view_contribution_1.TEST_VIEW_CONTAINER_ID,
|
|
71
|
+
progressLocationId: 'test'
|
|
72
|
+
});
|
|
73
|
+
viewContainer.setTitleOptions(test_view_contribution_1.TEST_VIEW_CONTAINER_TITLE_OPTIONS);
|
|
74
|
+
let widget = await container.get(browser_1.WidgetManager).getOrCreateWidget(test_tree_widget_1.TestTreeWidget.ID);
|
|
75
|
+
viewContainer.addWidget(widget, {
|
|
76
|
+
canHide: false,
|
|
77
|
+
initiallyCollapsed: false
|
|
78
|
+
});
|
|
79
|
+
widget = await container.get(browser_1.WidgetManager).getOrCreateWidget(test_run_widget_1.TestRunTreeWidget.ID);
|
|
80
|
+
viewContainer.addWidget(widget, {
|
|
81
|
+
canHide: true,
|
|
82
|
+
initiallyCollapsed: false,
|
|
83
|
+
});
|
|
84
|
+
return viewContainer;
|
|
85
|
+
}
|
|
86
|
+
})).inSingletonScope();
|
|
87
|
+
(0, browser_1.bindViewContribution)(bind, test_view_contribution_1.TestViewContribution);
|
|
88
|
+
(0, browser_1.bindViewContribution)(bind, test_run_view_contribution_1.TestRunViewContribution);
|
|
89
|
+
(0, browser_1.bindViewContribution)(bind, test_result_view_contribution_1.TestResultViewContribution);
|
|
90
|
+
(0, browser_1.bindViewContribution)(bind, test_output_view_contribution_1.TestOutputViewContribution);
|
|
91
|
+
bind(browser_1.FrontendApplicationContribution).toService(test_view_contribution_1.TestViewContribution);
|
|
92
|
+
bind(tab_bar_toolbar_1.TabBarToolbarContribution).toService(test_view_contribution_1.TestViewContribution);
|
|
93
|
+
bind(tab_bar_toolbar_1.TabBarToolbarContribution).toService(test_run_view_contribution_1.TestRunViewContribution);
|
|
94
|
+
bind(test_execution_state_manager_1.TestExecutionStateManager).toSelf().inSingletonScope();
|
|
95
|
+
bind(test_output_ui_model_1.TestOutputUIModel).toSelf().inSingletonScope();
|
|
96
|
+
});
|
|
97
|
+
function createTestTreeContainer(parent) {
|
|
98
|
+
return (0, browser_1.createTreeContainer)(parent, {
|
|
99
|
+
tree: test_tree_widget_1.TestTree,
|
|
100
|
+
props: {
|
|
101
|
+
virtualized: false,
|
|
102
|
+
search: true,
|
|
103
|
+
contextMenuPath: test_view_contribution_1.TEST_VIEW_CONTEXT_MENU
|
|
104
|
+
},
|
|
105
|
+
widget: test_tree_widget_1.TestTreeWidget,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
exports.createTestTreeContainer = createTestTreeContainer;
|
|
109
|
+
function createTestRunContainer(parent) {
|
|
110
|
+
return (0, browser_1.createTreeContainer)(parent, {
|
|
111
|
+
tree: test_run_widget_1.TestRunTree,
|
|
112
|
+
props: {
|
|
113
|
+
virtualized: false,
|
|
114
|
+
search: true,
|
|
115
|
+
multiSelect: false,
|
|
116
|
+
contextMenuPath: test_run_view_contribution_1.TEST_RUNS_CONTEXT_MENU
|
|
117
|
+
},
|
|
118
|
+
widget: test_run_widget_1.TestRunTreeWidget
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
exports.createTestRunContainer = createTestRunContainer;
|
|
122
122
|
//# sourceMappingURL=test-view-frontend-module.js.map
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { Event } from '@theia/core';
|
|
2
|
-
import { CollectionDelta, TreeDeltaBuilder } from './tree-delta';
|
|
3
|
-
export declare function observableProperty(observationFunction: string): (target: any, property: string) => any;
|
|
4
|
-
export declare class ChangeBatcher {
|
|
5
|
-
private emitBatch;
|
|
6
|
-
readonly timeoutMs: number;
|
|
7
|
-
private handle;
|
|
8
|
-
private startTime;
|
|
9
|
-
constructor(emitBatch: () => void, timeoutMs: number);
|
|
10
|
-
changeOccurred(): void;
|
|
11
|
-
flush(): void;
|
|
12
|
-
}
|
|
13
|
-
export declare class SimpleObservableCollection<V> {
|
|
14
|
-
private equals;
|
|
15
|
-
private _values;
|
|
16
|
-
constructor(equals?: (left: V, right: V) => boolean);
|
|
17
|
-
add(value: V): boolean;
|
|
18
|
-
remove(value: V): boolean;
|
|
19
|
-
private onChangeEmitter;
|
|
20
|
-
onChanged: Event<CollectionDelta<V, V>>;
|
|
21
|
-
get values(): readonly V[];
|
|
22
|
-
clear(): void;
|
|
23
|
-
}
|
|
24
|
-
declare abstract class AbstractIndexedCollection<K, T> {
|
|
25
|
-
private keys;
|
|
26
|
-
private _values;
|
|
27
|
-
abstract add(item: T): T | undefined;
|
|
28
|
-
get values(): readonly T[];
|
|
29
|
-
get size(): number;
|
|
30
|
-
has(key: K): boolean;
|
|
31
|
-
get(key: K): T | undefined;
|
|
32
|
-
protected doAdd(key: K, value: T): T | undefined;
|
|
33
|
-
remove(key: K): T | undefined;
|
|
34
|
-
}
|
|
35
|
-
export declare class TreeCollection<K, T, P> extends AbstractIndexedCollection<K, T> implements Iterable<[K, T]> {
|
|
36
|
-
protected readonly owner: T | P;
|
|
37
|
-
protected readonly pathOf: (v: T) => K[];
|
|
38
|
-
protected readonly deltaBuilder: (v: T | undefined) => TreeDeltaBuilder<K, T> | undefined;
|
|
39
|
-
constructor(owner: T | P, pathOf: (v: T) => K[], deltaBuilder: (v: T | undefined) => TreeDeltaBuilder<K, T> | undefined);
|
|
40
|
-
add(item: T): T | undefined;
|
|
41
|
-
remove(key: K): T | undefined;
|
|
42
|
-
entries(): Iterator<[K, T], unknown, undefined>;
|
|
43
|
-
[Symbol.iterator](): Iterator<[K, T], unknown, undefined>;
|
|
44
|
-
}
|
|
45
|
-
export declare function groupBy<K, T>(items: Iterable<T>, keyOf: (item: T) => K): Map<K, T[]>;
|
|
46
|
-
export {};
|
|
1
|
+
import { Event } from '@theia/core';
|
|
2
|
+
import { CollectionDelta, TreeDeltaBuilder } from './tree-delta';
|
|
3
|
+
export declare function observableProperty(observationFunction: string): (target: any, property: string) => any;
|
|
4
|
+
export declare class ChangeBatcher {
|
|
5
|
+
private emitBatch;
|
|
6
|
+
readonly timeoutMs: number;
|
|
7
|
+
private handle;
|
|
8
|
+
private startTime;
|
|
9
|
+
constructor(emitBatch: () => void, timeoutMs: number);
|
|
10
|
+
changeOccurred(): void;
|
|
11
|
+
flush(): void;
|
|
12
|
+
}
|
|
13
|
+
export declare class SimpleObservableCollection<V> {
|
|
14
|
+
private equals;
|
|
15
|
+
private _values;
|
|
16
|
+
constructor(equals?: (left: V, right: V) => boolean);
|
|
17
|
+
add(value: V): boolean;
|
|
18
|
+
remove(value: V): boolean;
|
|
19
|
+
private onChangeEmitter;
|
|
20
|
+
onChanged: Event<CollectionDelta<V, V>>;
|
|
21
|
+
get values(): readonly V[];
|
|
22
|
+
clear(): void;
|
|
23
|
+
}
|
|
24
|
+
declare abstract class AbstractIndexedCollection<K, T> {
|
|
25
|
+
private keys;
|
|
26
|
+
private _values;
|
|
27
|
+
abstract add(item: T): T | undefined;
|
|
28
|
+
get values(): readonly T[];
|
|
29
|
+
get size(): number;
|
|
30
|
+
has(key: K): boolean;
|
|
31
|
+
get(key: K): T | undefined;
|
|
32
|
+
protected doAdd(key: K, value: T): T | undefined;
|
|
33
|
+
remove(key: K): T | undefined;
|
|
34
|
+
}
|
|
35
|
+
export declare class TreeCollection<K, T, P> extends AbstractIndexedCollection<K, T> implements Iterable<[K, T]> {
|
|
36
|
+
protected readonly owner: T | P;
|
|
37
|
+
protected readonly pathOf: (v: T) => K[];
|
|
38
|
+
protected readonly deltaBuilder: (v: T | undefined) => TreeDeltaBuilder<K, T> | undefined;
|
|
39
|
+
constructor(owner: T | P, pathOf: (v: T) => K[], deltaBuilder: (v: T | undefined) => TreeDeltaBuilder<K, T> | undefined);
|
|
40
|
+
add(item: T): T | undefined;
|
|
41
|
+
remove(key: K): T | undefined;
|
|
42
|
+
entries(): Iterator<[K, T], unknown, undefined>;
|
|
43
|
+
[Symbol.iterator](): Iterator<[K, T], unknown, undefined>;
|
|
44
|
+
}
|
|
45
|
+
export declare function groupBy<K, T>(items: Iterable<T>, keyOf: (item: T) => K): Map<K, T[]>;
|
|
46
|
+
export {};
|
|
47
47
|
//# sourceMappingURL=collections.d.ts.map
|