1 | "use strict";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | Object.defineProperty(exports, "__esModule", { value: true });
|
18 | exports.TreeSource = exports.CompositeTreeElement = void 0;
|
19 | const tslib_1 = require("tslib");
|
20 | const inversify_1 = require("inversify");
|
21 | const common_1 = require("../../common");
|
22 | var CompositeTreeElement;
|
23 | (function (CompositeTreeElement) {
|
24 | function is(element) {
|
25 | return (0, common_1.isObject)(element) && 'getElements' in element;
|
26 | }
|
27 | CompositeTreeElement.is = is;
|
28 | function hasElements(element) {
|
29 | return is(element) && element.hasElements !== false;
|
30 | }
|
31 | CompositeTreeElement.hasElements = hasElements;
|
32 | })(CompositeTreeElement = exports.CompositeTreeElement || (exports.CompositeTreeElement = {}));
|
33 | let TreeSource = class TreeSource {
|
34 | constructor(options = {}) {
|
35 | this.onDidChangeEmitter = new common_1.Emitter();
|
36 | this.onDidChange = this.onDidChangeEmitter.event;
|
37 | this.toDispose = new common_1.DisposableCollection(this.onDidChangeEmitter);
|
38 | this.id = options.id;
|
39 | this.placeholder = options.placeholder;
|
40 | }
|
41 | fireDidChange() {
|
42 | this.onDidChangeEmitter.fire(undefined);
|
43 | }
|
44 | dispose() {
|
45 | this.toDispose.dispose();
|
46 | }
|
47 | };
|
48 | TreeSource = (0, tslib_1.__decorate)([
|
49 | (0, inversify_1.injectable)(),
|
50 | (0, tslib_1.__param)(0, (0, inversify_1.unmanaged)()),
|
51 | (0, tslib_1.__metadata)("design:paramtypes", [Object])
|
52 | ], TreeSource);
|
53 | exports.TreeSource = TreeSource;
|
54 |
|
\ | No newline at end of file |