@theia/outline-view 1.48.1 → 1.48.2

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.
Files changed (29) hide show
  1. package/README.md +30 -30
  2. package/lib/browser/index.d.ts +2 -2
  3. package/lib/browser/index.js +20 -20
  4. package/lib/browser/outline-breadcrumbs-contribution.d.ts +57 -57
  5. package/lib/browser/outline-breadcrumbs-contribution.js +214 -214
  6. package/lib/browser/outline-decorator-service.d.ts +13 -13
  7. package/lib/browser/outline-decorator-service.js +42 -42
  8. package/lib/browser/outline-view-contribution.d.ts +36 -36
  9. package/lib/browser/outline-view-contribution.js +125 -125
  10. package/lib/browser/outline-view-frontend-module.d.ts +4 -4
  11. package/lib/browser/outline-view-frontend-module.js +68 -68
  12. package/lib/browser/outline-view-service.d.ts +26 -26
  13. package/lib/browser/outline-view-service.js +78 -78
  14. package/lib/browser/outline-view-tree-model.d.ts +19 -19
  15. package/lib/browser/outline-view-tree-model.js +76 -76
  16. package/lib/browser/outline-view-widget.d.ts +76 -76
  17. package/lib/browser/outline-view-widget.js +184 -184
  18. package/lib/package.spec.js +25 -25
  19. package/package.json +4 -4
  20. package/src/browser/index.ts +18 -18
  21. package/src/browser/outline-breadcrumbs-contribution.tsx +229 -229
  22. package/src/browser/outline-decorator-service.ts +36 -36
  23. package/src/browser/outline-view-contribution.ts +132 -132
  24. package/src/browser/outline-view-frontend-module.ts +84 -84
  25. package/src/browser/outline-view-service.ts +82 -82
  26. package/src/browser/outline-view-tree-model.ts +77 -77
  27. package/src/browser/outline-view-widget.tsx +212 -212
  28. package/src/browser/styles/index.css +24 -24
  29. package/src/package.spec.ts +28 -28
@@ -1,215 +1,215 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2019 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.OutlineBreadcrumb = exports.OutlineBreadcrumbsContribution = exports.BreadcrumbPopupOutlineView = exports.OUTLINE_BREADCRUMB_CONTAINER_CLASS = exports.BreadcrumbPopupOutlineViewFactory = exports.OutlineBreadcrumbType = 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 outline_view_service_1 = require("./outline-view-service");
23
- const outline_view_widget_1 = require("./outline-view-widget");
24
- const common_1 = require("@theia/core/lib/common");
25
- exports.OutlineBreadcrumbType = Symbol('OutlineBreadcrumb');
26
- exports.BreadcrumbPopupOutlineViewFactory = Symbol('BreadcrumbPopupOutlineViewFactory');
27
- exports.OUTLINE_BREADCRUMB_CONTAINER_CLASS = 'outline-element';
28
- class BreadcrumbPopupOutlineView extends outline_view_widget_1.OutlineViewWidget {
29
- tapNode(node) {
30
- if (common_1.UriSelection.is(node) && outline_view_widget_1.OutlineSymbolInformationNode.hasRange(node)) {
31
- (0, browser_1.open)(this.openerService, node.uri, { selection: node.range });
32
- }
33
- else {
34
- super.tapNode(node);
35
- }
36
- }
37
- cloneState(roots) {
38
- const nodes = this.reconcileTreeState(roots);
39
- const root = this.getRoot(nodes);
40
- this.model.root = this.inflateFromStorage(this.deflateForStorage(root));
41
- }
42
- }
43
- (0, tslib_1.__decorate)([
44
- (0, inversify_1.inject)(browser_1.OpenerService),
45
- (0, tslib_1.__metadata)("design:type", Object)
46
- ], BreadcrumbPopupOutlineView.prototype, "openerService", void 0);
47
- exports.BreadcrumbPopupOutlineView = BreadcrumbPopupOutlineView;
48
- let OutlineBreadcrumbsContribution = class OutlineBreadcrumbsContribution {
49
- constructor() {
50
- this.type = exports.OutlineBreadcrumbType;
51
- this.priority = 200;
52
- this.currentUri = undefined;
53
- this.currentBreadcrumbs = [];
54
- this.roots = [];
55
- this.onDidChangeBreadcrumbsEmitter = new common_1.Emitter();
56
- }
57
- get onDidChangeBreadcrumbs() {
58
- return this.onDidChangeBreadcrumbsEmitter.event;
59
- }
60
- init() {
61
- this.outlineView = this.outlineFactory();
62
- this.outlineView.node.style.height = 'auto';
63
- this.outlineView.node.style.maxHeight = '200px';
64
- this.outlineViewService.onDidChangeOutline(roots => {
65
- if (roots.length > 0) {
66
- this.roots = roots;
67
- const first = roots[0];
68
- if (common_1.UriSelection.is(first)) {
69
- this.updateOutlineItems(first.uri, this.findSelectedNode(roots));
70
- }
71
- }
72
- else {
73
- this.currentBreadcrumbs = [];
74
- this.roots = [];
75
- }
76
- });
77
- this.outlineViewService.onDidSelect(node => {
78
- if (common_1.UriSelection.is(node)) {
79
- this.updateOutlineItems(node.uri, node);
80
- }
81
- });
82
- }
83
- async updateOutlineItems(uri, selectedNode) {
84
- this.currentUri = uri;
85
- const outlinePath = this.toOutlinePath(selectedNode);
86
- if (outlinePath && selectedNode) {
87
- this.currentBreadcrumbs = outlinePath.map((node, index) => new OutlineBreadcrumb(node, uri, index.toString(), this.labelProvider.getName(node), 'symbol-icon-center codicon codicon-symbol-' + node.iconClass, exports.OUTLINE_BREADCRUMB_CONTAINER_CLASS));
88
- if (selectedNode.children && selectedNode.children.length > 0) {
89
- this.currentBreadcrumbs.push(new OutlineBreadcrumb(selectedNode.children, uri, this.currentBreadcrumbs.length.toString(), '…', '', exports.OUTLINE_BREADCRUMB_CONTAINER_CLASS));
90
- }
91
- }
92
- else {
93
- this.currentBreadcrumbs = [];
94
- if (this.roots) {
95
- this.currentBreadcrumbs.push(new OutlineBreadcrumb(this.roots, uri, this.currentBreadcrumbs.length.toString(), '…', '', exports.OUTLINE_BREADCRUMB_CONTAINER_CLASS));
96
- }
97
- }
98
- this.onDidChangeBreadcrumbsEmitter.fire(uri);
99
- }
100
- async computeBreadcrumbs(uri) {
101
- if (this.currentUri && uri.toString() === this.currentUri.toString()) {
102
- return this.currentBreadcrumbs;
103
- }
104
- return [];
105
- }
106
- async attachPopupContent(breadcrumb, parent) {
107
- if (!OutlineBreadcrumb.is(breadcrumb)) {
108
- return undefined;
109
- }
110
- const node = Array.isArray(breadcrumb.node) ? breadcrumb.node[0] : breadcrumb.node;
111
- if (!node.parent) {
112
- return undefined;
113
- }
114
- const siblings = node.parent.children.filter((child) => outline_view_widget_1.OutlineSymbolInformationNode.is(child));
115
- const toDisposeOnHide = new common_1.DisposableCollection();
116
- this.outlineView.cloneState(siblings);
117
- this.outlineView.model.selectNode(node);
118
- this.outlineView.model.collapseAll();
119
- browser_1.Widget.attach(this.outlineView, parent);
120
- this.outlineView.activate();
121
- toDisposeOnHide.pushAll([
122
- this.outlineView.model.onExpansionChanged(expandedNode => browser_1.SelectableTreeNode.is(expandedNode) && this.outlineView.model.selectNode(expandedNode)),
123
- common_1.Disposable.create(() => {
124
- this.outlineView.model.root = undefined;
125
- browser_1.Widget.detach(this.outlineView);
126
- }),
127
- ]);
128
- return toDisposeOnHide;
129
- }
130
- /**
131
- * Returns the path of the given outline node.
132
- */
133
- toOutlinePath(node, path = []) {
134
- if (!node) {
135
- return undefined;
136
- }
137
- if (node.id === 'outline-view-root') {
138
- return path;
139
- }
140
- if (node.parent) {
141
- return this.toOutlinePath(node.parent, [node, ...path]);
142
- }
143
- else {
144
- return [node, ...path];
145
- }
146
- }
147
- /**
148
- * Find the node that is selected. Returns after the first match.
149
- */
150
- findSelectedNode(roots) {
151
- const result = roots.find(node => node.selected);
152
- if (result) {
153
- return result;
154
- }
155
- for (const node of roots) {
156
- const result2 = this.findSelectedNode(node.children.map(child => child));
157
- if (result2) {
158
- return result2;
159
- }
160
- }
161
- }
162
- };
163
- (0, tslib_1.__decorate)([
164
- (0, inversify_1.inject)(browser_1.LabelProvider),
165
- (0, tslib_1.__metadata)("design:type", browser_1.LabelProvider)
166
- ], OutlineBreadcrumbsContribution.prototype, "labelProvider", void 0);
167
- (0, tslib_1.__decorate)([
168
- (0, inversify_1.inject)(outline_view_service_1.OutlineViewService),
169
- (0, tslib_1.__metadata)("design:type", outline_view_service_1.OutlineViewService)
170
- ], OutlineBreadcrumbsContribution.prototype, "outlineViewService", void 0);
171
- (0, tslib_1.__decorate)([
172
- (0, inversify_1.inject)(browser_1.BreadcrumbsService),
173
- (0, tslib_1.__metadata)("design:type", browser_1.BreadcrumbsService)
174
- ], OutlineBreadcrumbsContribution.prototype, "breadcrumbsService", void 0);
175
- (0, tslib_1.__decorate)([
176
- (0, inversify_1.inject)(exports.BreadcrumbPopupOutlineViewFactory),
177
- (0, tslib_1.__metadata)("design:type", Function)
178
- ], OutlineBreadcrumbsContribution.prototype, "outlineFactory", void 0);
179
- (0, tslib_1.__decorate)([
180
- (0, inversify_1.postConstruct)(),
181
- (0, tslib_1.__metadata)("design:type", Function),
182
- (0, tslib_1.__metadata)("design:paramtypes", []),
183
- (0, tslib_1.__metadata)("design:returntype", void 0)
184
- ], OutlineBreadcrumbsContribution.prototype, "init", null);
185
- OutlineBreadcrumbsContribution = (0, tslib_1.__decorate)([
186
- (0, inversify_1.injectable)()
187
- ], OutlineBreadcrumbsContribution);
188
- exports.OutlineBreadcrumbsContribution = OutlineBreadcrumbsContribution;
189
- class OutlineBreadcrumb {
190
- constructor(node, uri, index, label, iconClass, containerClass) {
191
- this.node = node;
192
- this.uri = uri;
193
- this.index = index;
194
- this.label = label;
195
- this.iconClass = iconClass;
196
- this.containerClass = containerClass;
197
- }
198
- get id() {
199
- return this.type.toString() + '_' + this.uri.toString() + '_' + this.index;
200
- }
201
- get type() {
202
- return exports.OutlineBreadcrumbType;
203
- }
204
- get longLabel() {
205
- return this.label;
206
- }
207
- }
208
- exports.OutlineBreadcrumb = OutlineBreadcrumb;
209
- (function (OutlineBreadcrumb) {
210
- function is(breadcrumb) {
211
- return 'node' in breadcrumb && 'uri' in breadcrumb;
212
- }
213
- OutlineBreadcrumb.is = is;
214
- })(OutlineBreadcrumb = exports.OutlineBreadcrumb || (exports.OutlineBreadcrumb = {}));
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2019 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.OutlineBreadcrumb = exports.OutlineBreadcrumbsContribution = exports.BreadcrumbPopupOutlineView = exports.OUTLINE_BREADCRUMB_CONTAINER_CLASS = exports.BreadcrumbPopupOutlineViewFactory = exports.OutlineBreadcrumbType = 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 outline_view_service_1 = require("./outline-view-service");
23
+ const outline_view_widget_1 = require("./outline-view-widget");
24
+ const common_1 = require("@theia/core/lib/common");
25
+ exports.OutlineBreadcrumbType = Symbol('OutlineBreadcrumb');
26
+ exports.BreadcrumbPopupOutlineViewFactory = Symbol('BreadcrumbPopupOutlineViewFactory');
27
+ exports.OUTLINE_BREADCRUMB_CONTAINER_CLASS = 'outline-element';
28
+ class BreadcrumbPopupOutlineView extends outline_view_widget_1.OutlineViewWidget {
29
+ tapNode(node) {
30
+ if (common_1.UriSelection.is(node) && outline_view_widget_1.OutlineSymbolInformationNode.hasRange(node)) {
31
+ (0, browser_1.open)(this.openerService, node.uri, { selection: node.range });
32
+ }
33
+ else {
34
+ super.tapNode(node);
35
+ }
36
+ }
37
+ cloneState(roots) {
38
+ const nodes = this.reconcileTreeState(roots);
39
+ const root = this.getRoot(nodes);
40
+ this.model.root = this.inflateFromStorage(this.deflateForStorage(root));
41
+ }
42
+ }
43
+ (0, tslib_1.__decorate)([
44
+ (0, inversify_1.inject)(browser_1.OpenerService),
45
+ (0, tslib_1.__metadata)("design:type", Object)
46
+ ], BreadcrumbPopupOutlineView.prototype, "openerService", void 0);
47
+ exports.BreadcrumbPopupOutlineView = BreadcrumbPopupOutlineView;
48
+ let OutlineBreadcrumbsContribution = class OutlineBreadcrumbsContribution {
49
+ constructor() {
50
+ this.type = exports.OutlineBreadcrumbType;
51
+ this.priority = 200;
52
+ this.currentUri = undefined;
53
+ this.currentBreadcrumbs = [];
54
+ this.roots = [];
55
+ this.onDidChangeBreadcrumbsEmitter = new common_1.Emitter();
56
+ }
57
+ get onDidChangeBreadcrumbs() {
58
+ return this.onDidChangeBreadcrumbsEmitter.event;
59
+ }
60
+ init() {
61
+ this.outlineView = this.outlineFactory();
62
+ this.outlineView.node.style.height = 'auto';
63
+ this.outlineView.node.style.maxHeight = '200px';
64
+ this.outlineViewService.onDidChangeOutline(roots => {
65
+ if (roots.length > 0) {
66
+ this.roots = roots;
67
+ const first = roots[0];
68
+ if (common_1.UriSelection.is(first)) {
69
+ this.updateOutlineItems(first.uri, this.findSelectedNode(roots));
70
+ }
71
+ }
72
+ else {
73
+ this.currentBreadcrumbs = [];
74
+ this.roots = [];
75
+ }
76
+ });
77
+ this.outlineViewService.onDidSelect(node => {
78
+ if (common_1.UriSelection.is(node)) {
79
+ this.updateOutlineItems(node.uri, node);
80
+ }
81
+ });
82
+ }
83
+ async updateOutlineItems(uri, selectedNode) {
84
+ this.currentUri = uri;
85
+ const outlinePath = this.toOutlinePath(selectedNode);
86
+ if (outlinePath && selectedNode) {
87
+ this.currentBreadcrumbs = outlinePath.map((node, index) => new OutlineBreadcrumb(node, uri, index.toString(), this.labelProvider.getName(node), 'symbol-icon-center codicon codicon-symbol-' + node.iconClass, exports.OUTLINE_BREADCRUMB_CONTAINER_CLASS));
88
+ if (selectedNode.children && selectedNode.children.length > 0) {
89
+ this.currentBreadcrumbs.push(new OutlineBreadcrumb(selectedNode.children, uri, this.currentBreadcrumbs.length.toString(), '…', '', exports.OUTLINE_BREADCRUMB_CONTAINER_CLASS));
90
+ }
91
+ }
92
+ else {
93
+ this.currentBreadcrumbs = [];
94
+ if (this.roots) {
95
+ this.currentBreadcrumbs.push(new OutlineBreadcrumb(this.roots, uri, this.currentBreadcrumbs.length.toString(), '…', '', exports.OUTLINE_BREADCRUMB_CONTAINER_CLASS));
96
+ }
97
+ }
98
+ this.onDidChangeBreadcrumbsEmitter.fire(uri);
99
+ }
100
+ async computeBreadcrumbs(uri) {
101
+ if (this.currentUri && uri.toString() === this.currentUri.toString()) {
102
+ return this.currentBreadcrumbs;
103
+ }
104
+ return [];
105
+ }
106
+ async attachPopupContent(breadcrumb, parent) {
107
+ if (!OutlineBreadcrumb.is(breadcrumb)) {
108
+ return undefined;
109
+ }
110
+ const node = Array.isArray(breadcrumb.node) ? breadcrumb.node[0] : breadcrumb.node;
111
+ if (!node.parent) {
112
+ return undefined;
113
+ }
114
+ const siblings = node.parent.children.filter((child) => outline_view_widget_1.OutlineSymbolInformationNode.is(child));
115
+ const toDisposeOnHide = new common_1.DisposableCollection();
116
+ this.outlineView.cloneState(siblings);
117
+ this.outlineView.model.selectNode(node);
118
+ this.outlineView.model.collapseAll();
119
+ browser_1.Widget.attach(this.outlineView, parent);
120
+ this.outlineView.activate();
121
+ toDisposeOnHide.pushAll([
122
+ this.outlineView.model.onExpansionChanged(expandedNode => browser_1.SelectableTreeNode.is(expandedNode) && this.outlineView.model.selectNode(expandedNode)),
123
+ common_1.Disposable.create(() => {
124
+ this.outlineView.model.root = undefined;
125
+ browser_1.Widget.detach(this.outlineView);
126
+ }),
127
+ ]);
128
+ return toDisposeOnHide;
129
+ }
130
+ /**
131
+ * Returns the path of the given outline node.
132
+ */
133
+ toOutlinePath(node, path = []) {
134
+ if (!node) {
135
+ return undefined;
136
+ }
137
+ if (node.id === 'outline-view-root') {
138
+ return path;
139
+ }
140
+ if (node.parent) {
141
+ return this.toOutlinePath(node.parent, [node, ...path]);
142
+ }
143
+ else {
144
+ return [node, ...path];
145
+ }
146
+ }
147
+ /**
148
+ * Find the node that is selected. Returns after the first match.
149
+ */
150
+ findSelectedNode(roots) {
151
+ const result = roots.find(node => node.selected);
152
+ if (result) {
153
+ return result;
154
+ }
155
+ for (const node of roots) {
156
+ const result2 = this.findSelectedNode(node.children.map(child => child));
157
+ if (result2) {
158
+ return result2;
159
+ }
160
+ }
161
+ }
162
+ };
163
+ (0, tslib_1.__decorate)([
164
+ (0, inversify_1.inject)(browser_1.LabelProvider),
165
+ (0, tslib_1.__metadata)("design:type", browser_1.LabelProvider)
166
+ ], OutlineBreadcrumbsContribution.prototype, "labelProvider", void 0);
167
+ (0, tslib_1.__decorate)([
168
+ (0, inversify_1.inject)(outline_view_service_1.OutlineViewService),
169
+ (0, tslib_1.__metadata)("design:type", outline_view_service_1.OutlineViewService)
170
+ ], OutlineBreadcrumbsContribution.prototype, "outlineViewService", void 0);
171
+ (0, tslib_1.__decorate)([
172
+ (0, inversify_1.inject)(browser_1.BreadcrumbsService),
173
+ (0, tslib_1.__metadata)("design:type", browser_1.BreadcrumbsService)
174
+ ], OutlineBreadcrumbsContribution.prototype, "breadcrumbsService", void 0);
175
+ (0, tslib_1.__decorate)([
176
+ (0, inversify_1.inject)(exports.BreadcrumbPopupOutlineViewFactory),
177
+ (0, tslib_1.__metadata)("design:type", Function)
178
+ ], OutlineBreadcrumbsContribution.prototype, "outlineFactory", void 0);
179
+ (0, tslib_1.__decorate)([
180
+ (0, inversify_1.postConstruct)(),
181
+ (0, tslib_1.__metadata)("design:type", Function),
182
+ (0, tslib_1.__metadata)("design:paramtypes", []),
183
+ (0, tslib_1.__metadata)("design:returntype", void 0)
184
+ ], OutlineBreadcrumbsContribution.prototype, "init", null);
185
+ OutlineBreadcrumbsContribution = (0, tslib_1.__decorate)([
186
+ (0, inversify_1.injectable)()
187
+ ], OutlineBreadcrumbsContribution);
188
+ exports.OutlineBreadcrumbsContribution = OutlineBreadcrumbsContribution;
189
+ class OutlineBreadcrumb {
190
+ constructor(node, uri, index, label, iconClass, containerClass) {
191
+ this.node = node;
192
+ this.uri = uri;
193
+ this.index = index;
194
+ this.label = label;
195
+ this.iconClass = iconClass;
196
+ this.containerClass = containerClass;
197
+ }
198
+ get id() {
199
+ return this.type.toString() + '_' + this.uri.toString() + '_' + this.index;
200
+ }
201
+ get type() {
202
+ return exports.OutlineBreadcrumbType;
203
+ }
204
+ get longLabel() {
205
+ return this.label;
206
+ }
207
+ }
208
+ exports.OutlineBreadcrumb = OutlineBreadcrumb;
209
+ (function (OutlineBreadcrumb) {
210
+ function is(breadcrumb) {
211
+ return 'node' in breadcrumb && 'uri' in breadcrumb;
212
+ }
213
+ OutlineBreadcrumb.is = is;
214
+ })(OutlineBreadcrumb = exports.OutlineBreadcrumb || (exports.OutlineBreadcrumb = {}));
215
215
  //# sourceMappingURL=outline-breadcrumbs-contribution.js.map
@@ -1,14 +1,14 @@
1
- import { ContributionProvider } from '@theia/core/lib/common/contribution-provider';
2
- import { TreeDecorator, AbstractTreeDecoratorService } from '@theia/core/lib/browser/tree/tree-decorator';
3
- /**
4
- * Symbol for all decorators that would like to contribute into the outline.
5
- */
6
- export declare const OutlineTreeDecorator: unique symbol;
7
- /**
8
- * Decorator service for the outline.
9
- */
10
- export declare class OutlineDecoratorService extends AbstractTreeDecoratorService {
11
- protected readonly contributions: ContributionProvider<TreeDecorator>;
12
- constructor(contributions: ContributionProvider<TreeDecorator>);
13
- }
1
+ import { ContributionProvider } from '@theia/core/lib/common/contribution-provider';
2
+ import { TreeDecorator, AbstractTreeDecoratorService } from '@theia/core/lib/browser/tree/tree-decorator';
3
+ /**
4
+ * Symbol for all decorators that would like to contribute into the outline.
5
+ */
6
+ export declare const OutlineTreeDecorator: unique symbol;
7
+ /**
8
+ * Decorator service for the outline.
9
+ */
10
+ export declare class OutlineDecoratorService extends AbstractTreeDecoratorService {
11
+ protected readonly contributions: ContributionProvider<TreeDecorator>;
12
+ constructor(contributions: ContributionProvider<TreeDecorator>);
13
+ }
14
14
  //# sourceMappingURL=outline-decorator-service.d.ts.map
@@ -1,43 +1,43 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2018 Redhat, Ericsson 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.OutlineDecoratorService = exports.OutlineTreeDecorator = void 0;
19
- const tslib_1 = require("tslib");
20
- const inversify_1 = require("@theia/core/shared/inversify");
21
- const contribution_provider_1 = require("@theia/core/lib/common/contribution-provider");
22
- const tree_decorator_1 = require("@theia/core/lib/browser/tree/tree-decorator");
23
- /**
24
- * Symbol for all decorators that would like to contribute into the outline.
25
- */
26
- exports.OutlineTreeDecorator = Symbol('OutlineTreeDecorator');
27
- /**
28
- * Decorator service for the outline.
29
- */
30
- let OutlineDecoratorService = class OutlineDecoratorService extends tree_decorator_1.AbstractTreeDecoratorService {
31
- constructor(contributions) {
32
- super(contributions.getContributions());
33
- this.contributions = contributions;
34
- }
35
- };
36
- OutlineDecoratorService = (0, tslib_1.__decorate)([
37
- (0, inversify_1.injectable)(),
38
- (0, tslib_1.__param)(0, (0, inversify_1.inject)(contribution_provider_1.ContributionProvider)),
39
- (0, tslib_1.__param)(0, (0, inversify_1.named)(exports.OutlineTreeDecorator)),
40
- (0, tslib_1.__metadata)("design:paramtypes", [Object])
41
- ], OutlineDecoratorService);
42
- exports.OutlineDecoratorService = OutlineDecoratorService;
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2018 Redhat, Ericsson 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.OutlineDecoratorService = exports.OutlineTreeDecorator = void 0;
19
+ const tslib_1 = require("tslib");
20
+ const inversify_1 = require("@theia/core/shared/inversify");
21
+ const contribution_provider_1 = require("@theia/core/lib/common/contribution-provider");
22
+ const tree_decorator_1 = require("@theia/core/lib/browser/tree/tree-decorator");
23
+ /**
24
+ * Symbol for all decorators that would like to contribute into the outline.
25
+ */
26
+ exports.OutlineTreeDecorator = Symbol('OutlineTreeDecorator');
27
+ /**
28
+ * Decorator service for the outline.
29
+ */
30
+ let OutlineDecoratorService = class OutlineDecoratorService extends tree_decorator_1.AbstractTreeDecoratorService {
31
+ constructor(contributions) {
32
+ super(contributions.getContributions());
33
+ this.contributions = contributions;
34
+ }
35
+ };
36
+ OutlineDecoratorService = (0, tslib_1.__decorate)([
37
+ (0, inversify_1.injectable)(),
38
+ (0, tslib_1.__param)(0, (0, inversify_1.inject)(contribution_provider_1.ContributionProvider)),
39
+ (0, tslib_1.__param)(0, (0, inversify_1.named)(exports.OutlineTreeDecorator)),
40
+ (0, tslib_1.__metadata)("design:paramtypes", [Object])
41
+ ], OutlineDecoratorService);
42
+ exports.OutlineDecoratorService = OutlineDecoratorService;
43
43
  //# sourceMappingURL=outline-decorator-service.js.map
@@ -1,37 +1,37 @@
1
- import { AbstractViewContribution } from '@theia/core/lib/browser/shell/view-contribution';
2
- import { FrontendApplication } from '@theia/core/lib/browser/frontend-application';
3
- import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application-contribution';
4
- import { Command, CommandRegistry } from '@theia/core/lib/common/command';
5
- import { TabBarToolbarContribution, TabBarToolbarRegistry } from '@theia/core/lib/browser/shell/tab-bar-toolbar';
6
- import { Widget } from '@theia/core/lib/browser/widgets';
7
- import { OutlineViewWidget } from './outline-view-widget';
8
- export declare const OUTLINE_WIDGET_FACTORY_ID = "outline-view";
9
- /**
10
- * Collection of `outline-view` commands.
11
- */
12
- export declare namespace OutlineViewCommands {
13
- /**
14
- * Command which collapses all nodes from the `outline-view` tree.
15
- */
16
- const COLLAPSE_ALL: Command;
17
- /**
18
- * Command which expands all nodes from the `outline-view` tree.
19
- */
20
- const EXPAND_ALL: Command;
21
- }
22
- export declare class OutlineViewContribution extends AbstractViewContribution<OutlineViewWidget> implements FrontendApplicationContribution, TabBarToolbarContribution {
23
- constructor();
24
- initializeLayout(app: FrontendApplication): Promise<void>;
25
- registerCommands(commands: CommandRegistry): void;
26
- registerToolbarItems(toolbar: TabBarToolbarRegistry): Promise<void>;
27
- /**
28
- * Collapse all nodes in the outline view tree.
29
- */
30
- protected collapseAllItems(): Promise<void>;
31
- protected expandAllItems(): Promise<void>;
32
- /**
33
- * Determine if the current widget is the `outline-view`.
34
- */
35
- protected withWidget<T>(widget: Widget | undefined, cb: (widget: OutlineViewWidget) => T): T | false;
36
- }
1
+ import { AbstractViewContribution } from '@theia/core/lib/browser/shell/view-contribution';
2
+ import { FrontendApplication } from '@theia/core/lib/browser/frontend-application';
3
+ import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application-contribution';
4
+ import { Command, CommandRegistry } from '@theia/core/lib/common/command';
5
+ import { TabBarToolbarContribution, TabBarToolbarRegistry } from '@theia/core/lib/browser/shell/tab-bar-toolbar';
6
+ import { Widget } from '@theia/core/lib/browser/widgets';
7
+ import { OutlineViewWidget } from './outline-view-widget';
8
+ export declare const OUTLINE_WIDGET_FACTORY_ID = "outline-view";
9
+ /**
10
+ * Collection of `outline-view` commands.
11
+ */
12
+ export declare namespace OutlineViewCommands {
13
+ /**
14
+ * Command which collapses all nodes from the `outline-view` tree.
15
+ */
16
+ const COLLAPSE_ALL: Command;
17
+ /**
18
+ * Command which expands all nodes from the `outline-view` tree.
19
+ */
20
+ const EXPAND_ALL: Command;
21
+ }
22
+ export declare class OutlineViewContribution extends AbstractViewContribution<OutlineViewWidget> implements FrontendApplicationContribution, TabBarToolbarContribution {
23
+ constructor();
24
+ initializeLayout(app: FrontendApplication): Promise<void>;
25
+ registerCommands(commands: CommandRegistry): void;
26
+ registerToolbarItems(toolbar: TabBarToolbarRegistry): Promise<void>;
27
+ /**
28
+ * Collapse all nodes in the outline view tree.
29
+ */
30
+ protected collapseAllItems(): Promise<void>;
31
+ protected expandAllItems(): Promise<void>;
32
+ /**
33
+ * Determine if the current widget is the `outline-view`.
34
+ */
35
+ protected withWidget<T>(widget: Widget | undefined, cb: (widget: OutlineViewWidget) => T): T | false;
36
+ }
37
37
  //# sourceMappingURL=outline-view-contribution.d.ts.map