@theia/timeline 1.45.0 → 1.46.0-next.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -30
- package/lib/browser/timeline-context-key-service.d.ts +7 -7
- package/lib/browser/timeline-context-key-service.js +51 -51
- package/lib/browser/timeline-contribution.d.ts +17 -17
- package/lib/browser/timeline-contribution.js +128 -128
- package/lib/browser/timeline-empty-widget.d.ts +8 -8
- package/lib/browser/timeline-empty-widget.js +48 -48
- package/lib/browser/timeline-frontend-module.d.ts +5 -5
- package/lib/browser/timeline-frontend-module.js +68 -68
- package/lib/browser/timeline-service.d.ts +25 -25
- package/lib/browser/timeline-service.js +110 -110
- package/lib/browser/timeline-tree-model.d.ts +10 -10
- package/lib/browser/timeline-tree-model.js +68 -68
- package/lib/browser/timeline-tree-widget.d.ts +36 -36
- package/lib/browser/timeline-tree-widget.js +128 -128
- package/lib/browser/timeline-widget.d.ts +29 -29
- package/lib/browser/timeline-widget.js +194 -194
- package/lib/common/timeline-model.d.ts +56 -56
- package/lib/common/timeline-model.js +17 -17
- package/lib/package.spec.js +25 -25
- package/package.json +5 -5
- package/src/browser/style/index.css +49 -49
- package/src/browser/timeline-context-key-service.ts +36 -36
- package/src/browser/timeline-contribution.ts +112 -112
- package/src/browser/timeline-empty-widget.tsx +40 -40
- package/src/browser/timeline-frontend-module.ts +71 -71
- package/src/browser/timeline-service.ts +124 -124
- package/src/browser/timeline-tree-model.ts +72 -72
- package/src/browser/timeline-tree-widget.tsx +120 -120
- package/src/browser/timeline-widget.tsx +179 -179
- package/src/common/timeline-model.ts +84 -84
- package/src/package.spec.ts +29 -29
package/README.md
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
<div align='center'>
|
|
2
|
-
|
|
3
|
-
<br />
|
|
4
|
-
|
|
5
|
-
<img src='https://raw.githubusercontent.com/eclipse-theia/theia/master/logo/theia.svg?sanitize=true' alt='theia-ext-logo' width='100px' />
|
|
6
|
-
|
|
7
|
-
<h2>THEIA - TIMELINE EXTENSION</h2>
|
|
8
|
-
|
|
9
|
-
<hr />
|
|
10
|
-
|
|
11
|
-
</div>
|
|
12
|
-
|
|
13
|
-
## Description
|
|
14
|
-
|
|
15
|
-
The `@theia/timeline` extension adds Timeline view for visualizing time-series events.
|
|
16
|
-
|
|
17
|
-
## Additional Information
|
|
18
|
-
|
|
19
|
-
- [Theia - GitHub](https://github.com/eclipse-theia/theia)
|
|
20
|
-
- [Theia - Website](https://theia-ide.org/)
|
|
21
|
-
- [VS Code Timeline Documentation](https://code.visualstudio.com/updates/v1_44#_timeline-view)
|
|
22
|
-
|
|
23
|
-
## License
|
|
24
|
-
|
|
25
|
-
- [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/)
|
|
26
|
-
- [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
|
|
27
|
-
|
|
28
|
-
## Trademark
|
|
29
|
-
"Theia" is a trademark of the Eclipse Foundation
|
|
30
|
-
https://www.eclipse.org/theia
|
|
1
|
+
<div align='center'>
|
|
2
|
+
|
|
3
|
+
<br />
|
|
4
|
+
|
|
5
|
+
<img src='https://raw.githubusercontent.com/eclipse-theia/theia/master/logo/theia.svg?sanitize=true' alt='theia-ext-logo' width='100px' />
|
|
6
|
+
|
|
7
|
+
<h2>THEIA - TIMELINE EXTENSION</h2>
|
|
8
|
+
|
|
9
|
+
<hr />
|
|
10
|
+
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
## Description
|
|
14
|
+
|
|
15
|
+
The `@theia/timeline` extension adds Timeline view for visualizing time-series events.
|
|
16
|
+
|
|
17
|
+
## Additional Information
|
|
18
|
+
|
|
19
|
+
- [Theia - GitHub](https://github.com/eclipse-theia/theia)
|
|
20
|
+
- [Theia - Website](https://theia-ide.org/)
|
|
21
|
+
- [VS Code Timeline Documentation](https://code.visualstudio.com/updates/v1_44#_timeline-view)
|
|
22
|
+
|
|
23
|
+
## License
|
|
24
|
+
|
|
25
|
+
- [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/)
|
|
26
|
+
- [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
|
|
27
|
+
|
|
28
|
+
## Trademark
|
|
29
|
+
"Theia" is a trademark of the Eclipse Foundation
|
|
30
|
+
https://www.eclipse.org/theia
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ContextKeyService, ContextKey } from '@theia/core/lib/browser/context-key-service';
|
|
2
|
-
export declare class TimelineContextKeyService {
|
|
3
|
-
protected readonly contextKeyService: ContextKeyService;
|
|
4
|
-
protected _timelineItem: ContextKey<string | undefined>;
|
|
5
|
-
get timelineItem(): ContextKey<string | undefined>;
|
|
6
|
-
protected init(): void;
|
|
7
|
-
}
|
|
1
|
+
import { ContextKeyService, ContextKey } from '@theia/core/lib/browser/context-key-service';
|
|
2
|
+
export declare class TimelineContextKeyService {
|
|
3
|
+
protected readonly contextKeyService: ContextKeyService;
|
|
4
|
+
protected _timelineItem: ContextKey<string | undefined>;
|
|
5
|
+
get timelineItem(): ContextKey<string | undefined>;
|
|
6
|
+
protected init(): void;
|
|
7
|
+
}
|
|
8
8
|
//# sourceMappingURL=timeline-context-key-service.d.ts.map
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2020 RedHat and others.
|
|
4
|
-
//
|
|
5
|
-
// This program and the accompanying materials are made available under the
|
|
6
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
-
//
|
|
9
|
-
// This Source Code may also be made available under the following Secondary
|
|
10
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
-
// with the GNU Classpath Exception which is available at
|
|
13
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
-
//
|
|
15
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
-
// *****************************************************************************
|
|
17
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
-
};
|
|
23
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
-
};
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.TimelineContextKeyService = void 0;
|
|
28
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
29
|
-
const context_key_service_1 = require("@theia/core/lib/browser/context-key-service");
|
|
30
|
-
let TimelineContextKeyService = class TimelineContextKeyService {
|
|
31
|
-
get timelineItem() {
|
|
32
|
-
return this._timelineItem;
|
|
33
|
-
}
|
|
34
|
-
init() {
|
|
35
|
-
this._timelineItem = this.contextKeyService.createKey('timelineItem', undefined);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
__decorate([
|
|
39
|
-
(0, inversify_1.inject)(context_key_service_1.ContextKeyService),
|
|
40
|
-
__metadata("design:type", Object)
|
|
41
|
-
], TimelineContextKeyService.prototype, "contextKeyService", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, inversify_1.postConstruct)(),
|
|
44
|
-
__metadata("design:type", Function),
|
|
45
|
-
__metadata("design:paramtypes", []),
|
|
46
|
-
__metadata("design:returntype", void 0)
|
|
47
|
-
], TimelineContextKeyService.prototype, "init", null);
|
|
48
|
-
TimelineContextKeyService = __decorate([
|
|
49
|
-
(0, inversify_1.injectable)()
|
|
50
|
-
], TimelineContextKeyService);
|
|
51
|
-
exports.TimelineContextKeyService = TimelineContextKeyService;
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2020 RedHat and others.
|
|
4
|
+
//
|
|
5
|
+
// This program and the accompanying materials are made available under the
|
|
6
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
//
|
|
9
|
+
// This Source Code may also be made available under the following Secondary
|
|
10
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
// with the GNU Classpath Exception which is available at
|
|
13
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
//
|
|
15
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.TimelineContextKeyService = void 0;
|
|
28
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
29
|
+
const context_key_service_1 = require("@theia/core/lib/browser/context-key-service");
|
|
30
|
+
let TimelineContextKeyService = class TimelineContextKeyService {
|
|
31
|
+
get timelineItem() {
|
|
32
|
+
return this._timelineItem;
|
|
33
|
+
}
|
|
34
|
+
init() {
|
|
35
|
+
this._timelineItem = this.contextKeyService.createKey('timelineItem', undefined);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, inversify_1.inject)(context_key_service_1.ContextKeyService),
|
|
40
|
+
__metadata("design:type", Object)
|
|
41
|
+
], TimelineContextKeyService.prototype, "contextKeyService", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, inversify_1.postConstruct)(),
|
|
44
|
+
__metadata("design:type", Function),
|
|
45
|
+
__metadata("design:paramtypes", []),
|
|
46
|
+
__metadata("design:returntype", void 0)
|
|
47
|
+
], TimelineContextKeyService.prototype, "init", null);
|
|
48
|
+
TimelineContextKeyService = __decorate([
|
|
49
|
+
(0, inversify_1.injectable)()
|
|
50
|
+
], TimelineContextKeyService);
|
|
51
|
+
exports.TimelineContextKeyService = TimelineContextKeyService;
|
|
52
52
|
//# sourceMappingURL=timeline-context-key-service.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { WidgetManager, ApplicationShell } from '@theia/core/lib/browser';
|
|
2
|
-
import { TimelineService } from './timeline-service';
|
|
3
|
-
import { CommandContribution, CommandRegistry } from '@theia/core/lib/common';
|
|
4
|
-
import { TabBarToolbarContribution, TabBarToolbarRegistry } from '@theia/core/lib/browser/shell/tab-bar-toolbar';
|
|
5
|
-
export declare class TimelineContribution implements CommandContribution, TabBarToolbarContribution {
|
|
6
|
-
protected readonly widgetManager: WidgetManager;
|
|
7
|
-
protected readonly timelineService: TimelineService;
|
|
8
|
-
protected readonly commandRegistry: CommandRegistry;
|
|
9
|
-
protected readonly tabBarToolbar: TabBarToolbarRegistry;
|
|
10
|
-
protected readonly shell: ApplicationShell;
|
|
11
|
-
/** @deprecated @since 1.28.0. Import from timeline-tree-model instead */
|
|
12
|
-
static readonly LOAD_MORE_COMMAND: import("@theia/core/lib/common").Command;
|
|
13
|
-
private readonly toolbarItem;
|
|
14
|
-
registerToolbarItems(registry: TabBarToolbarRegistry): void;
|
|
15
|
-
registerCommands(commands: CommandRegistry): void;
|
|
16
|
-
private checkWidget;
|
|
17
|
-
}
|
|
1
|
+
import { WidgetManager, ApplicationShell } from '@theia/core/lib/browser';
|
|
2
|
+
import { TimelineService } from './timeline-service';
|
|
3
|
+
import { CommandContribution, CommandRegistry } from '@theia/core/lib/common';
|
|
4
|
+
import { TabBarToolbarContribution, TabBarToolbarRegistry } from '@theia/core/lib/browser/shell/tab-bar-toolbar';
|
|
5
|
+
export declare class TimelineContribution implements CommandContribution, TabBarToolbarContribution {
|
|
6
|
+
protected readonly widgetManager: WidgetManager;
|
|
7
|
+
protected readonly timelineService: TimelineService;
|
|
8
|
+
protected readonly commandRegistry: CommandRegistry;
|
|
9
|
+
protected readonly tabBarToolbar: TabBarToolbarRegistry;
|
|
10
|
+
protected readonly shell: ApplicationShell;
|
|
11
|
+
/** @deprecated @since 1.28.0. Import from timeline-tree-model instead */
|
|
12
|
+
static readonly LOAD_MORE_COMMAND: import("@theia/core/lib/common").Command;
|
|
13
|
+
private readonly toolbarItem;
|
|
14
|
+
registerToolbarItems(registry: TabBarToolbarRegistry): void;
|
|
15
|
+
registerCommands(commands: CommandRegistry): void;
|
|
16
|
+
private checkWidget;
|
|
17
|
+
}
|
|
18
18
|
//# sourceMappingURL=timeline-contribution.d.ts.map
|
|
@@ -1,129 +1,129 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2020 RedHat and others.
|
|
4
|
-
//
|
|
5
|
-
// This program and the accompanying materials are made available under the
|
|
6
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
-
//
|
|
9
|
-
// This Source Code may also be made available under the following Secondary
|
|
10
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
-
// with the GNU Classpath Exception which is available at
|
|
13
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
-
//
|
|
15
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
-
// *****************************************************************************
|
|
17
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
-
};
|
|
23
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
-
};
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.TimelineContribution = void 0;
|
|
28
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
29
|
-
const browser_1 = require("@theia/core/lib/browser");
|
|
30
|
-
const browser_2 = require("@theia/navigator/lib/browser");
|
|
31
|
-
const timeline_widget_1 = require("./timeline-widget");
|
|
32
|
-
const timeline_service_1 = require("./timeline-service");
|
|
33
|
-
const common_1 = require("@theia/core/lib/common");
|
|
34
|
-
const tab_bar_toolbar_1 = require("@theia/core/lib/browser/shell/tab-bar-toolbar");
|
|
35
|
-
const algorithm_1 = require("@theia/core/shared/@phosphor/algorithm");
|
|
36
|
-
const timeline_tree_model_1 = require("./timeline-tree-model");
|
|
37
|
-
let TimelineContribution = class TimelineContribution {
|
|
38
|
-
constructor() {
|
|
39
|
-
this.toolbarItem = {
|
|
40
|
-
id: 'timeline-refresh-toolbar-item',
|
|
41
|
-
command: 'timeline-refresh',
|
|
42
|
-
tooltip: 'Refresh',
|
|
43
|
-
icon: (0, browser_1.codicon)('refresh')
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
registerToolbarItems(registry) {
|
|
47
|
-
registry.registerItem(this.toolbarItem);
|
|
48
|
-
}
|
|
49
|
-
registerCommands(commands) {
|
|
50
|
-
const attachTimeline = async (explorer) => {
|
|
51
|
-
const timeline = await this.widgetManager.getOrCreateWidget(timeline_widget_1.TimelineWidget.ID);
|
|
52
|
-
if (explorer instanceof browser_1.ViewContainer && explorer.getTrackableWidgets().indexOf(timeline) === -1) {
|
|
53
|
-
explorer.addWidget(timeline, { initiallyCollapsed: true });
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
this.widgetManager.onWillCreateWidget(async (event) => {
|
|
57
|
-
if (event.widget.id === browser_2.EXPLORER_VIEW_CONTAINER_ID && this.timelineService.getSources().length > 0) {
|
|
58
|
-
event.waitUntil(attachTimeline(event.widget));
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
this.timelineService.onDidChangeProviders(async (event) => {
|
|
62
|
-
const explorer = await this.widgetManager.getWidget(browser_2.EXPLORER_VIEW_CONTAINER_ID);
|
|
63
|
-
if (explorer && event.added && event.added.length > 0) {
|
|
64
|
-
attachTimeline(explorer);
|
|
65
|
-
}
|
|
66
|
-
else if (event.removed && this.timelineService.getSources().length === 0) {
|
|
67
|
-
const timeline = await this.widgetManager.getWidget(timeline_widget_1.TimelineWidget.ID);
|
|
68
|
-
if (timeline) {
|
|
69
|
-
timeline.close();
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
commands.registerCommand(timeline_tree_model_1.LOAD_MORE_COMMAND, {
|
|
74
|
-
execute: async () => {
|
|
75
|
-
const widget = (0, algorithm_1.toArray)(this.shell.mainPanel.widgets()).find(w => browser_1.Navigatable.is(w) && w.isVisible && !w.isHidden);
|
|
76
|
-
if (browser_1.Navigatable.is(widget)) {
|
|
77
|
-
const uri = widget.getResourceUri();
|
|
78
|
-
const timeline = await this.widgetManager.getWidget(timeline_widget_1.TimelineWidget.ID);
|
|
79
|
-
if (uri && timeline) {
|
|
80
|
-
timeline.loadTimeline(uri, false);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
commands.registerCommand({ id: this.toolbarItem.command }, {
|
|
86
|
-
execute: widget => this.checkWidget(widget, async () => {
|
|
87
|
-
const timeline = await this.widgetManager.getWidget(timeline_widget_1.TimelineWidget.ID);
|
|
88
|
-
if (timeline) {
|
|
89
|
-
timeline.update();
|
|
90
|
-
}
|
|
91
|
-
}),
|
|
92
|
-
isEnabled: widget => this.checkWidget(widget, () => true),
|
|
93
|
-
isVisible: widget => this.checkWidget(widget, () => true)
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
checkWidget(widget, cb) {
|
|
97
|
-
if (widget instanceof timeline_widget_1.TimelineWidget && widget.id === timeline_widget_1.TimelineWidget.ID) {
|
|
98
|
-
return cb();
|
|
99
|
-
}
|
|
100
|
-
return false;
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
/** @deprecated @since 1.28.0. Import from timeline-tree-model instead */
|
|
104
|
-
TimelineContribution.LOAD_MORE_COMMAND = timeline_tree_model_1.LOAD_MORE_COMMAND;
|
|
105
|
-
__decorate([
|
|
106
|
-
(0, inversify_1.inject)(browser_1.WidgetManager),
|
|
107
|
-
__metadata("design:type", browser_1.WidgetManager)
|
|
108
|
-
], TimelineContribution.prototype, "widgetManager", void 0);
|
|
109
|
-
__decorate([
|
|
110
|
-
(0, inversify_1.inject)(timeline_service_1.TimelineService),
|
|
111
|
-
__metadata("design:type", timeline_service_1.TimelineService)
|
|
112
|
-
], TimelineContribution.prototype, "timelineService", void 0);
|
|
113
|
-
__decorate([
|
|
114
|
-
(0, inversify_1.inject)(common_1.CommandRegistry),
|
|
115
|
-
__metadata("design:type", common_1.CommandRegistry)
|
|
116
|
-
], TimelineContribution.prototype, "commandRegistry", void 0);
|
|
117
|
-
__decorate([
|
|
118
|
-
(0, inversify_1.inject)(tab_bar_toolbar_1.TabBarToolbarRegistry),
|
|
119
|
-
__metadata("design:type", tab_bar_toolbar_1.TabBarToolbarRegistry)
|
|
120
|
-
], TimelineContribution.prototype, "tabBarToolbar", void 0);
|
|
121
|
-
__decorate([
|
|
122
|
-
(0, inversify_1.inject)(browser_1.ApplicationShell),
|
|
123
|
-
__metadata("design:type", browser_1.ApplicationShell)
|
|
124
|
-
], TimelineContribution.prototype, "shell", void 0);
|
|
125
|
-
TimelineContribution = __decorate([
|
|
126
|
-
(0, inversify_1.injectable)()
|
|
127
|
-
], TimelineContribution);
|
|
128
|
-
exports.TimelineContribution = TimelineContribution;
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2020 RedHat and others.
|
|
4
|
+
//
|
|
5
|
+
// This program and the accompanying materials are made available under the
|
|
6
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
//
|
|
9
|
+
// This Source Code may also be made available under the following Secondary
|
|
10
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
// with the GNU Classpath Exception which is available at
|
|
13
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
//
|
|
15
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.TimelineContribution = void 0;
|
|
28
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
29
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
30
|
+
const browser_2 = require("@theia/navigator/lib/browser");
|
|
31
|
+
const timeline_widget_1 = require("./timeline-widget");
|
|
32
|
+
const timeline_service_1 = require("./timeline-service");
|
|
33
|
+
const common_1 = require("@theia/core/lib/common");
|
|
34
|
+
const tab_bar_toolbar_1 = require("@theia/core/lib/browser/shell/tab-bar-toolbar");
|
|
35
|
+
const algorithm_1 = require("@theia/core/shared/@phosphor/algorithm");
|
|
36
|
+
const timeline_tree_model_1 = require("./timeline-tree-model");
|
|
37
|
+
let TimelineContribution = class TimelineContribution {
|
|
38
|
+
constructor() {
|
|
39
|
+
this.toolbarItem = {
|
|
40
|
+
id: 'timeline-refresh-toolbar-item',
|
|
41
|
+
command: 'timeline-refresh',
|
|
42
|
+
tooltip: 'Refresh',
|
|
43
|
+
icon: (0, browser_1.codicon)('refresh')
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
registerToolbarItems(registry) {
|
|
47
|
+
registry.registerItem(this.toolbarItem);
|
|
48
|
+
}
|
|
49
|
+
registerCommands(commands) {
|
|
50
|
+
const attachTimeline = async (explorer) => {
|
|
51
|
+
const timeline = await this.widgetManager.getOrCreateWidget(timeline_widget_1.TimelineWidget.ID);
|
|
52
|
+
if (explorer instanceof browser_1.ViewContainer && explorer.getTrackableWidgets().indexOf(timeline) === -1) {
|
|
53
|
+
explorer.addWidget(timeline, { initiallyCollapsed: true });
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
this.widgetManager.onWillCreateWidget(async (event) => {
|
|
57
|
+
if (event.widget.id === browser_2.EXPLORER_VIEW_CONTAINER_ID && this.timelineService.getSources().length > 0) {
|
|
58
|
+
event.waitUntil(attachTimeline(event.widget));
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
this.timelineService.onDidChangeProviders(async (event) => {
|
|
62
|
+
const explorer = await this.widgetManager.getWidget(browser_2.EXPLORER_VIEW_CONTAINER_ID);
|
|
63
|
+
if (explorer && event.added && event.added.length > 0) {
|
|
64
|
+
attachTimeline(explorer);
|
|
65
|
+
}
|
|
66
|
+
else if (event.removed && this.timelineService.getSources().length === 0) {
|
|
67
|
+
const timeline = await this.widgetManager.getWidget(timeline_widget_1.TimelineWidget.ID);
|
|
68
|
+
if (timeline) {
|
|
69
|
+
timeline.close();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
commands.registerCommand(timeline_tree_model_1.LOAD_MORE_COMMAND, {
|
|
74
|
+
execute: async () => {
|
|
75
|
+
const widget = (0, algorithm_1.toArray)(this.shell.mainPanel.widgets()).find(w => browser_1.Navigatable.is(w) && w.isVisible && !w.isHidden);
|
|
76
|
+
if (browser_1.Navigatable.is(widget)) {
|
|
77
|
+
const uri = widget.getResourceUri();
|
|
78
|
+
const timeline = await this.widgetManager.getWidget(timeline_widget_1.TimelineWidget.ID);
|
|
79
|
+
if (uri && timeline) {
|
|
80
|
+
timeline.loadTimeline(uri, false);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
commands.registerCommand({ id: this.toolbarItem.command }, {
|
|
86
|
+
execute: widget => this.checkWidget(widget, async () => {
|
|
87
|
+
const timeline = await this.widgetManager.getWidget(timeline_widget_1.TimelineWidget.ID);
|
|
88
|
+
if (timeline) {
|
|
89
|
+
timeline.update();
|
|
90
|
+
}
|
|
91
|
+
}),
|
|
92
|
+
isEnabled: widget => this.checkWidget(widget, () => true),
|
|
93
|
+
isVisible: widget => this.checkWidget(widget, () => true)
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
checkWidget(widget, cb) {
|
|
97
|
+
if (widget instanceof timeline_widget_1.TimelineWidget && widget.id === timeline_widget_1.TimelineWidget.ID) {
|
|
98
|
+
return cb();
|
|
99
|
+
}
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
/** @deprecated @since 1.28.0. Import from timeline-tree-model instead */
|
|
104
|
+
TimelineContribution.LOAD_MORE_COMMAND = timeline_tree_model_1.LOAD_MORE_COMMAND;
|
|
105
|
+
__decorate([
|
|
106
|
+
(0, inversify_1.inject)(browser_1.WidgetManager),
|
|
107
|
+
__metadata("design:type", browser_1.WidgetManager)
|
|
108
|
+
], TimelineContribution.prototype, "widgetManager", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, inversify_1.inject)(timeline_service_1.TimelineService),
|
|
111
|
+
__metadata("design:type", timeline_service_1.TimelineService)
|
|
112
|
+
], TimelineContribution.prototype, "timelineService", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
(0, inversify_1.inject)(common_1.CommandRegistry),
|
|
115
|
+
__metadata("design:type", common_1.CommandRegistry)
|
|
116
|
+
], TimelineContribution.prototype, "commandRegistry", void 0);
|
|
117
|
+
__decorate([
|
|
118
|
+
(0, inversify_1.inject)(tab_bar_toolbar_1.TabBarToolbarRegistry),
|
|
119
|
+
__metadata("design:type", tab_bar_toolbar_1.TabBarToolbarRegistry)
|
|
120
|
+
], TimelineContribution.prototype, "tabBarToolbar", void 0);
|
|
121
|
+
__decorate([
|
|
122
|
+
(0, inversify_1.inject)(browser_1.ApplicationShell),
|
|
123
|
+
__metadata("design:type", browser_1.ApplicationShell)
|
|
124
|
+
], TimelineContribution.prototype, "shell", void 0);
|
|
125
|
+
TimelineContribution = __decorate([
|
|
126
|
+
(0, inversify_1.injectable)()
|
|
127
|
+
], TimelineContribution);
|
|
128
|
+
exports.TimelineContribution = TimelineContribution;
|
|
129
129
|
//# sourceMappingURL=timeline-contribution.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ReactWidget } from '@theia/core/lib/browser';
|
|
3
|
-
import * as React from '@theia/core/shared/react';
|
|
4
|
-
export declare class TimelineEmptyWidget extends ReactWidget {
|
|
5
|
-
static ID: string;
|
|
6
|
-
constructor();
|
|
7
|
-
protected render(): React.ReactNode;
|
|
8
|
-
}
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ReactWidget } from '@theia/core/lib/browser';
|
|
3
|
+
import * as React from '@theia/core/shared/react';
|
|
4
|
+
export declare class TimelineEmptyWidget extends ReactWidget {
|
|
5
|
+
static ID: string;
|
|
6
|
+
constructor();
|
|
7
|
+
protected render(): React.ReactNode;
|
|
8
|
+
}
|
|
9
9
|
//# sourceMappingURL=timeline-empty-widget.d.ts.map
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2020 RedHat and others.
|
|
4
|
-
//
|
|
5
|
-
// This program and the accompanying materials are made available under the
|
|
6
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
-
//
|
|
9
|
-
// This Source Code may also be made available under the following Secondary
|
|
10
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
-
// with the GNU Classpath Exception which is available at
|
|
13
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
-
//
|
|
15
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
-
// *****************************************************************************
|
|
17
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
-
};
|
|
23
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
-
};
|
|
26
|
-
var TimelineEmptyWidget_1;
|
|
27
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.TimelineEmptyWidget = void 0;
|
|
29
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
30
|
-
const browser_1 = require("@theia/core/lib/browser");
|
|
31
|
-
const alert_message_1 = require("@theia/core/lib/browser/widgets/alert-message");
|
|
32
|
-
const React = require("@theia/core/shared/react");
|
|
33
|
-
let TimelineEmptyWidget = TimelineEmptyWidget_1 = class TimelineEmptyWidget extends browser_1.ReactWidget {
|
|
34
|
-
constructor() {
|
|
35
|
-
super();
|
|
36
|
-
this.addClass('theia-timeline-empty');
|
|
37
|
-
this.id = TimelineEmptyWidget_1.ID;
|
|
38
|
-
}
|
|
39
|
-
render() {
|
|
40
|
-
return React.createElement(alert_message_1.AlertMessage, { type: 'WARNING', header: 'The active editor cannot provide timeline information.' });
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
TimelineEmptyWidget.ID = 'timeline-empty-widget';
|
|
44
|
-
TimelineEmptyWidget = TimelineEmptyWidget_1 = __decorate([
|
|
45
|
-
(0, inversify_1.injectable)(),
|
|
46
|
-
__metadata("design:paramtypes", [])
|
|
47
|
-
], TimelineEmptyWidget);
|
|
48
|
-
exports.TimelineEmptyWidget = TimelineEmptyWidget;
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2020 RedHat and others.
|
|
4
|
+
//
|
|
5
|
+
// This program and the accompanying materials are made available under the
|
|
6
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
//
|
|
9
|
+
// This Source Code may also be made available under the following Secondary
|
|
10
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
// with the GNU Classpath Exception which is available at
|
|
13
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
//
|
|
15
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
26
|
+
var TimelineEmptyWidget_1;
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.TimelineEmptyWidget = void 0;
|
|
29
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
30
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
31
|
+
const alert_message_1 = require("@theia/core/lib/browser/widgets/alert-message");
|
|
32
|
+
const React = require("@theia/core/shared/react");
|
|
33
|
+
let TimelineEmptyWidget = TimelineEmptyWidget_1 = class TimelineEmptyWidget extends browser_1.ReactWidget {
|
|
34
|
+
constructor() {
|
|
35
|
+
super();
|
|
36
|
+
this.addClass('theia-timeline-empty');
|
|
37
|
+
this.id = TimelineEmptyWidget_1.ID;
|
|
38
|
+
}
|
|
39
|
+
render() {
|
|
40
|
+
return React.createElement(alert_message_1.AlertMessage, { type: 'WARNING', header: 'The active editor cannot provide timeline information.' });
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
TimelineEmptyWidget.ID = 'timeline-empty-widget';
|
|
44
|
+
TimelineEmptyWidget = TimelineEmptyWidget_1 = __decorate([
|
|
45
|
+
(0, inversify_1.injectable)(),
|
|
46
|
+
__metadata("design:paramtypes", [])
|
|
47
|
+
], TimelineEmptyWidget);
|
|
48
|
+
exports.TimelineEmptyWidget = TimelineEmptyWidget;
|
|
49
49
|
//# sourceMappingURL=timeline-empty-widget.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Container, ContainerModule, interfaces } from '@theia/core/shared/inversify';
|
|
2
|
-
import '../../src/browser/style/index.css';
|
|
3
|
-
declare const _default: ContainerModule;
|
|
4
|
-
export default _default;
|
|
5
|
-
export declare function createTimelineTreeContainer(parent: interfaces.Container): Container;
|
|
1
|
+
import { Container, ContainerModule, interfaces } from '@theia/core/shared/inversify';
|
|
2
|
+
import '../../src/browser/style/index.css';
|
|
3
|
+
declare const _default: ContainerModule;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare function createTimelineTreeContainer(parent: interfaces.Container): Container;
|
|
6
6
|
//# sourceMappingURL=timeline-frontend-module.d.ts.map
|