@theia/typehierarchy 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/index.d.ts +4 -4
- package/lib/browser/index.js +31 -31
- package/lib/browser/tree/typehierarchy-tree-container.d.ts +3 -3
- package/lib/browser/tree/typehierarchy-tree-container.js +34 -34
- package/lib/browser/tree/typehierarchy-tree-model.d.ts +16 -16
- package/lib/browser/tree/typehierarchy-tree-model.js +92 -92
- package/lib/browser/tree/typehierarchy-tree-widget.d.ts +36 -36
- package/lib/browser/tree/typehierarchy-tree-widget.js +119 -119
- package/lib/browser/tree/typehierarchy-tree.d.ts +38 -38
- package/lib/browser/tree/typehierarchy-tree.js +174 -174
- package/lib/browser/tree/typehierarchy-tree.js.map +1 -1
- package/lib/browser/typehierarchy-contribution.d.ts +49 -49
- package/lib/browser/typehierarchy-contribution.js +172 -172
- package/lib/browser/typehierarchy-frontend-module.d.ts +4 -4
- package/lib/browser/typehierarchy-frontend-module.js +37 -37
- package/lib/browser/typehierarchy-provider.d.ts +104 -104
- package/lib/browser/typehierarchy-provider.js +46 -46
- package/lib/browser/typehierarchy-service.d.ts +28 -28
- package/lib/browser/typehierarchy-service.js +85 -85
- package/lib/browser/typehierarchy.d.ts +13 -13
- package/lib/browser/typehierarchy.js +17 -17
- package/lib/package.spec.js +25 -25
- package/package.json +5 -7
- package/src/browser/index.ts +20 -20
- package/src/browser/style/index.css +28 -28
- package/src/browser/tree/typehierarchy-tree-container.ts +35 -35
- package/src/browser/tree/typehierarchy-tree-model.ts +83 -83
- package/src/browser/tree/typehierarchy-tree-widget.tsx +108 -108
- package/src/browser/tree/typehierarchy-tree.ts +190 -190
- package/src/browser/typehierarchy-contribution.ts +175 -175
- package/src/browser/typehierarchy-frontend-module.ts +38 -38
- package/src/browser/typehierarchy-provider.ts +163 -163
- package/src/browser/typehierarchy-service.ts +89 -89
- package/src/browser/typehierarchy.ts +31 -31
- package/src/package.spec.ts +29 -29
|
@@ -1,120 +1,120 @@
|
|
|
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
|
-
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 __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
27
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
28
|
-
};
|
|
29
|
-
var TypeHierarchyTreeWidget_1;
|
|
30
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
-
exports.TypeHierarchyTreeWidget = void 0;
|
|
32
|
-
const React = require("@theia/core/shared/react");
|
|
33
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
34
|
-
const widgets_1 = require("@theia/core/shared/@phosphor/widgets");
|
|
35
|
-
const uri_1 = require("@theia/core/lib/common/uri");
|
|
36
|
-
const vscode_languageserver_protocol_1 = require("@theia/core/shared/vscode-languageserver-protocol");
|
|
37
|
-
const editor_manager_1 = require("@theia/editor/lib/browser/editor-manager");
|
|
38
|
-
const context_menu_renderer_1 = require("@theia/core/lib/browser/context-menu-renderer");
|
|
39
|
-
const tree_widget_1 = require("@theia/core/lib/browser/tree/tree-widget");
|
|
40
|
-
const typehierarchy_tree_model_1 = require("./typehierarchy-tree-model");
|
|
41
|
-
const typehierarchy_tree_1 = require("./typehierarchy-tree");
|
|
42
|
-
const browser_1 = require("@theia/core/lib/browser");
|
|
43
|
-
const nls_1 = require("@theia/core/lib/common/nls");
|
|
44
|
-
let TypeHierarchyTreeWidget = TypeHierarchyTreeWidget_1 = class TypeHierarchyTreeWidget extends tree_widget_1.TreeWidget {
|
|
45
|
-
constructor(props, model, contextMenuRenderer) {
|
|
46
|
-
super(props, model, contextMenuRenderer);
|
|
47
|
-
this.model = model;
|
|
48
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
49
|
-
this.icons = new Map(Array.from(Object.keys(vscode_languageserver_protocol_1.SymbolKind)).map(key => [vscode_languageserver_protocol_1.SymbolKind[key], key.toLocaleLowerCase()]));
|
|
50
|
-
this.id = TypeHierarchyTreeWidget_1.WIDGET_ID;
|
|
51
|
-
this.title.label = TypeHierarchyTreeWidget_1.WIDGET_LABEL;
|
|
52
|
-
this.title.caption = TypeHierarchyTreeWidget_1.WIDGET_LABEL;
|
|
53
|
-
this.addClass(TypeHierarchyTreeWidget_1.Styles.TYPE_HIERARCHY_TREE_CLASS);
|
|
54
|
-
this.title.closable = true;
|
|
55
|
-
this.title.iconClass = (0, browser_1.codicon)('type-hierarchy');
|
|
56
|
-
this.toDispose.push(this.model.onSelectionChanged(selection => {
|
|
57
|
-
const node = selection[0];
|
|
58
|
-
if (node) {
|
|
59
|
-
this.openEditor(node, true);
|
|
60
|
-
}
|
|
61
|
-
}));
|
|
62
|
-
this.toDispose.push(this.model.onOpenNode(node => this.openEditor(node)));
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Initializes the widget with the new input.
|
|
66
|
-
*/
|
|
67
|
-
async initialize(options) {
|
|
68
|
-
await this.model.initialize(options);
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* See: `TreeWidget#renderIcon`.
|
|
72
|
-
*/
|
|
73
|
-
renderIcon(node) {
|
|
74
|
-
if (typehierarchy_tree_1.TypeHierarchyTree.Node.is(node)) {
|
|
75
|
-
return React.createElement("div", { className: 'symbol-icon-center codicon codicon-symbol-' + this.icons.get(node.item.kind) || 'unknown' });
|
|
76
|
-
}
|
|
77
|
-
return undefined;
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Opens up the node in the editor. On demand (`keepFocus`) it reveals the location in the editor.
|
|
81
|
-
*/
|
|
82
|
-
async openEditor(node, keepFocus = false) {
|
|
83
|
-
if (typehierarchy_tree_1.TypeHierarchyTree.Node.is(node)) {
|
|
84
|
-
const { selectionRange, uri } = node.item;
|
|
85
|
-
const editorWidget = await this.editorManager.open(new uri_1.default(uri), {
|
|
86
|
-
mode: keepFocus ? 'reveal' : 'activate',
|
|
87
|
-
selection: vscode_languageserver_protocol_1.Range.create(selectionRange.start, selectionRange.end)
|
|
88
|
-
});
|
|
89
|
-
if (editorWidget.parent instanceof widgets_1.DockPanel) {
|
|
90
|
-
editorWidget.parent.selectWidget(editorWidget);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
__decorate([
|
|
96
|
-
(0, inversify_1.inject)(editor_manager_1.EditorManager),
|
|
97
|
-
__metadata("design:type", editor_manager_1.EditorManager)
|
|
98
|
-
], TypeHierarchyTreeWidget.prototype, "editorManager", void 0);
|
|
99
|
-
TypeHierarchyTreeWidget = TypeHierarchyTreeWidget_1 = __decorate([
|
|
100
|
-
(0, inversify_1.injectable)(),
|
|
101
|
-
__param(0, (0, inversify_1.inject)(tree_widget_1.TreeProps)),
|
|
102
|
-
__param(1, (0, inversify_1.inject)(typehierarchy_tree_model_1.TypeHierarchyTreeModel)),
|
|
103
|
-
__param(2, (0, inversify_1.inject)(context_menu_renderer_1.ContextMenuRenderer)),
|
|
104
|
-
__metadata("design:paramtypes", [Object, typehierarchy_tree_model_1.TypeHierarchyTreeModel,
|
|
105
|
-
context_menu_renderer_1.ContextMenuRenderer])
|
|
106
|
-
], TypeHierarchyTreeWidget);
|
|
107
|
-
exports.TypeHierarchyTreeWidget = TypeHierarchyTreeWidget;
|
|
108
|
-
(function (TypeHierarchyTreeWidget) {
|
|
109
|
-
TypeHierarchyTreeWidget.WIDGET_ID = 'theia-typehierarchy';
|
|
110
|
-
TypeHierarchyTreeWidget.WIDGET_LABEL = nls_1.nls.localizeByDefault('Type Hierarchy');
|
|
111
|
-
/**
|
|
112
|
-
* CSS styles for the `Type Hierarchy` widget.
|
|
113
|
-
*/
|
|
114
|
-
let Styles;
|
|
115
|
-
(function (Styles) {
|
|
116
|
-
Styles.TYPE_HIERARCHY_TREE_CLASS = 'theia-type-hierarchy-tree';
|
|
117
|
-
})(Styles = TypeHierarchyTreeWidget.Styles || (TypeHierarchyTreeWidget.Styles = {}));
|
|
118
|
-
})(TypeHierarchyTreeWidget = exports.TypeHierarchyTreeWidget || (exports.TypeHierarchyTreeWidget = {}));
|
|
119
|
-
exports.TypeHierarchyTreeWidget = TypeHierarchyTreeWidget;
|
|
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
|
+
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 __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
27
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
28
|
+
};
|
|
29
|
+
var TypeHierarchyTreeWidget_1;
|
|
30
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.TypeHierarchyTreeWidget = void 0;
|
|
32
|
+
const React = require("@theia/core/shared/react");
|
|
33
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
34
|
+
const widgets_1 = require("@theia/core/shared/@phosphor/widgets");
|
|
35
|
+
const uri_1 = require("@theia/core/lib/common/uri");
|
|
36
|
+
const vscode_languageserver_protocol_1 = require("@theia/core/shared/vscode-languageserver-protocol");
|
|
37
|
+
const editor_manager_1 = require("@theia/editor/lib/browser/editor-manager");
|
|
38
|
+
const context_menu_renderer_1 = require("@theia/core/lib/browser/context-menu-renderer");
|
|
39
|
+
const tree_widget_1 = require("@theia/core/lib/browser/tree/tree-widget");
|
|
40
|
+
const typehierarchy_tree_model_1 = require("./typehierarchy-tree-model");
|
|
41
|
+
const typehierarchy_tree_1 = require("./typehierarchy-tree");
|
|
42
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
43
|
+
const nls_1 = require("@theia/core/lib/common/nls");
|
|
44
|
+
let TypeHierarchyTreeWidget = TypeHierarchyTreeWidget_1 = class TypeHierarchyTreeWidget extends tree_widget_1.TreeWidget {
|
|
45
|
+
constructor(props, model, contextMenuRenderer) {
|
|
46
|
+
super(props, model, contextMenuRenderer);
|
|
47
|
+
this.model = model;
|
|
48
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
49
|
+
this.icons = new Map(Array.from(Object.keys(vscode_languageserver_protocol_1.SymbolKind)).map(key => [vscode_languageserver_protocol_1.SymbolKind[key], key.toLocaleLowerCase()]));
|
|
50
|
+
this.id = TypeHierarchyTreeWidget_1.WIDGET_ID;
|
|
51
|
+
this.title.label = TypeHierarchyTreeWidget_1.WIDGET_LABEL;
|
|
52
|
+
this.title.caption = TypeHierarchyTreeWidget_1.WIDGET_LABEL;
|
|
53
|
+
this.addClass(TypeHierarchyTreeWidget_1.Styles.TYPE_HIERARCHY_TREE_CLASS);
|
|
54
|
+
this.title.closable = true;
|
|
55
|
+
this.title.iconClass = (0, browser_1.codicon)('type-hierarchy');
|
|
56
|
+
this.toDispose.push(this.model.onSelectionChanged(selection => {
|
|
57
|
+
const node = selection[0];
|
|
58
|
+
if (node) {
|
|
59
|
+
this.openEditor(node, true);
|
|
60
|
+
}
|
|
61
|
+
}));
|
|
62
|
+
this.toDispose.push(this.model.onOpenNode(node => this.openEditor(node)));
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Initializes the widget with the new input.
|
|
66
|
+
*/
|
|
67
|
+
async initialize(options) {
|
|
68
|
+
await this.model.initialize(options);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* See: `TreeWidget#renderIcon`.
|
|
72
|
+
*/
|
|
73
|
+
renderIcon(node) {
|
|
74
|
+
if (typehierarchy_tree_1.TypeHierarchyTree.Node.is(node)) {
|
|
75
|
+
return React.createElement("div", { className: 'symbol-icon-center codicon codicon-symbol-' + this.icons.get(node.item.kind) || 'unknown' });
|
|
76
|
+
}
|
|
77
|
+
return undefined;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Opens up the node in the editor. On demand (`keepFocus`) it reveals the location in the editor.
|
|
81
|
+
*/
|
|
82
|
+
async openEditor(node, keepFocus = false) {
|
|
83
|
+
if (typehierarchy_tree_1.TypeHierarchyTree.Node.is(node)) {
|
|
84
|
+
const { selectionRange, uri } = node.item;
|
|
85
|
+
const editorWidget = await this.editorManager.open(new uri_1.default(uri), {
|
|
86
|
+
mode: keepFocus ? 'reveal' : 'activate',
|
|
87
|
+
selection: vscode_languageserver_protocol_1.Range.create(selectionRange.start, selectionRange.end)
|
|
88
|
+
});
|
|
89
|
+
if (editorWidget.parent instanceof widgets_1.DockPanel) {
|
|
90
|
+
editorWidget.parent.selectWidget(editorWidget);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, inversify_1.inject)(editor_manager_1.EditorManager),
|
|
97
|
+
__metadata("design:type", editor_manager_1.EditorManager)
|
|
98
|
+
], TypeHierarchyTreeWidget.prototype, "editorManager", void 0);
|
|
99
|
+
TypeHierarchyTreeWidget = TypeHierarchyTreeWidget_1 = __decorate([
|
|
100
|
+
(0, inversify_1.injectable)(),
|
|
101
|
+
__param(0, (0, inversify_1.inject)(tree_widget_1.TreeProps)),
|
|
102
|
+
__param(1, (0, inversify_1.inject)(typehierarchy_tree_model_1.TypeHierarchyTreeModel)),
|
|
103
|
+
__param(2, (0, inversify_1.inject)(context_menu_renderer_1.ContextMenuRenderer)),
|
|
104
|
+
__metadata("design:paramtypes", [Object, typehierarchy_tree_model_1.TypeHierarchyTreeModel,
|
|
105
|
+
context_menu_renderer_1.ContextMenuRenderer])
|
|
106
|
+
], TypeHierarchyTreeWidget);
|
|
107
|
+
exports.TypeHierarchyTreeWidget = TypeHierarchyTreeWidget;
|
|
108
|
+
(function (TypeHierarchyTreeWidget) {
|
|
109
|
+
TypeHierarchyTreeWidget.WIDGET_ID = 'theia-typehierarchy';
|
|
110
|
+
TypeHierarchyTreeWidget.WIDGET_LABEL = nls_1.nls.localizeByDefault('Type Hierarchy');
|
|
111
|
+
/**
|
|
112
|
+
* CSS styles for the `Type Hierarchy` widget.
|
|
113
|
+
*/
|
|
114
|
+
let Styles;
|
|
115
|
+
(function (Styles) {
|
|
116
|
+
Styles.TYPE_HIERARCHY_TREE_CLASS = 'theia-type-hierarchy-tree';
|
|
117
|
+
})(Styles = TypeHierarchyTreeWidget.Styles || (TypeHierarchyTreeWidget.Styles = {}));
|
|
118
|
+
})(TypeHierarchyTreeWidget = exports.TypeHierarchyTreeWidget || (exports.TypeHierarchyTreeWidget = {}));
|
|
119
|
+
exports.TypeHierarchyTreeWidget = TypeHierarchyTreeWidget;
|
|
120
120
|
//# sourceMappingURL=typehierarchy-tree-widget.js.map
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { Location } from '@theia/editor/lib/browser/editor';
|
|
2
|
-
import { DecoratedTreeNode } from '@theia/core/lib/browser/tree/tree-decorator';
|
|
3
|
-
import { TreeImpl, TreeNode, CompositeTreeNode, ExpandableTreeNode, SelectableTreeNode } from '@theia/core/lib/browser/tree';
|
|
4
|
-
import { TypeHierarchyProvider, TypeHierarchyDirection, TypeHierarchyItem } from '../typehierarchy-provider';
|
|
5
|
-
export declare class TypeHierarchyTree extends TreeImpl {
|
|
6
|
-
provider: TypeHierarchyProvider | undefined;
|
|
7
|
-
resolveChildren(parent: CompositeTreeNode): Promise<TreeNode[]>;
|
|
8
|
-
/**
|
|
9
|
-
* Returns with the direction of the type hierarchy attached to the root node. `undefined` if the root is not set.
|
|
10
|
-
*/
|
|
11
|
-
protected get direction(): TypeHierarchyDirection | undefined;
|
|
12
|
-
/**
|
|
13
|
-
* Makes sure, the node and its children are resolved. Resolves it on demand.
|
|
14
|
-
*/
|
|
15
|
-
protected ensureResolved(node: TypeHierarchyTree.Node): Promise<void>;
|
|
16
|
-
}
|
|
17
|
-
export declare namespace TypeHierarchyTree {
|
|
18
|
-
interface InitOptions {
|
|
19
|
-
readonly direction: TypeHierarchyDirection;
|
|
20
|
-
readonly location: Location | undefined;
|
|
21
|
-
readonly languageId: string | undefined;
|
|
22
|
-
}
|
|
23
|
-
interface RootNode extends Node {
|
|
24
|
-
readonly direction: TypeHierarchyDirection;
|
|
25
|
-
}
|
|
26
|
-
namespace RootNode {
|
|
27
|
-
function is(node: TreeNode | undefined): node is RootNode;
|
|
28
|
-
function create(item: TypeHierarchyItem, direction: TypeHierarchyDirection): RootNode;
|
|
29
|
-
}
|
|
30
|
-
interface Node extends CompositeTreeNode, ExpandableTreeNode, SelectableTreeNode, DecoratedTreeNode {
|
|
31
|
-
readonly item: TypeHierarchyItem;
|
|
32
|
-
resolved: boolean;
|
|
33
|
-
}
|
|
34
|
-
namespace Node {
|
|
35
|
-
function is(node: TreeNode | undefined): node is Node;
|
|
36
|
-
function create(item: TypeHierarchyItem, direction: TypeHierarchyDirection, resolved?: boolean): Node;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
1
|
+
import { Location } from '@theia/editor/lib/browser/editor';
|
|
2
|
+
import { DecoratedTreeNode } from '@theia/core/lib/browser/tree/tree-decorator';
|
|
3
|
+
import { TreeImpl, TreeNode, CompositeTreeNode, ExpandableTreeNode, SelectableTreeNode } from '@theia/core/lib/browser/tree';
|
|
4
|
+
import { TypeHierarchyProvider, TypeHierarchyDirection, TypeHierarchyItem } from '../typehierarchy-provider';
|
|
5
|
+
export declare class TypeHierarchyTree extends TreeImpl {
|
|
6
|
+
provider: TypeHierarchyProvider | undefined;
|
|
7
|
+
resolveChildren(parent: CompositeTreeNode): Promise<TreeNode[]>;
|
|
8
|
+
/**
|
|
9
|
+
* Returns with the direction of the type hierarchy attached to the root node. `undefined` if the root is not set.
|
|
10
|
+
*/
|
|
11
|
+
protected get direction(): TypeHierarchyDirection | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Makes sure, the node and its children are resolved. Resolves it on demand.
|
|
14
|
+
*/
|
|
15
|
+
protected ensureResolved(node: TypeHierarchyTree.Node): Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
export declare namespace TypeHierarchyTree {
|
|
18
|
+
interface InitOptions {
|
|
19
|
+
readonly direction: TypeHierarchyDirection;
|
|
20
|
+
readonly location: Location | undefined;
|
|
21
|
+
readonly languageId: string | undefined;
|
|
22
|
+
}
|
|
23
|
+
interface RootNode extends Node {
|
|
24
|
+
readonly direction: TypeHierarchyDirection;
|
|
25
|
+
}
|
|
26
|
+
namespace RootNode {
|
|
27
|
+
function is(node: TreeNode | undefined): node is RootNode;
|
|
28
|
+
function create(item: TypeHierarchyItem, direction: TypeHierarchyDirection): RootNode;
|
|
29
|
+
}
|
|
30
|
+
interface Node extends CompositeTreeNode, ExpandableTreeNode, SelectableTreeNode, DecoratedTreeNode {
|
|
31
|
+
readonly item: TypeHierarchyItem;
|
|
32
|
+
resolved: boolean;
|
|
33
|
+
}
|
|
34
|
+
namespace Node {
|
|
35
|
+
function is(node: TreeNode | undefined): node is Node;
|
|
36
|
+
function create(item: TypeHierarchyItem, direction: TypeHierarchyDirection, resolved?: boolean): Node;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
39
|
//# sourceMappingURL=typehierarchy-tree.d.ts.map
|