@theia/typehierarchy 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/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,175 +1,175 @@
|
|
|
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 TypeHierarchyTree_1;
|
|
24
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.TypeHierarchyTree = void 0;
|
|
26
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
27
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
28
|
-
const uuid_1 = require("uuid");
|
|
29
|
-
const uri_1 = require("@theia/core/lib/common/uri");
|
|
30
|
-
const editor_1 = require("@theia/editor/lib/browser/editor");
|
|
31
|
-
const tree_1 = require("@theia/core/lib/browser/tree");
|
|
32
|
-
let TypeHierarchyTree = TypeHierarchyTree_1 = class TypeHierarchyTree extends tree_1.TreeImpl {
|
|
33
|
-
async resolveChildren(parent) {
|
|
34
|
-
if (TypeHierarchyTree_1.Node.is(parent)) {
|
|
35
|
-
await this.ensureResolved(parent);
|
|
36
|
-
if (parent.children.length === 0) {
|
|
37
|
-
delete parent.children;
|
|
38
|
-
delete parent.expanded;
|
|
39
|
-
return [];
|
|
40
|
-
}
|
|
41
|
-
return parent.children.slice();
|
|
42
|
-
}
|
|
43
|
-
return [];
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Returns with the direction of the type hierarchy attached to the root node. `undefined` if the root is not set.
|
|
47
|
-
*/
|
|
48
|
-
get direction() {
|
|
49
|
-
if (TypeHierarchyTree_1.RootNode.is(this.root)) {
|
|
50
|
-
return this.root.direction;
|
|
51
|
-
}
|
|
52
|
-
return undefined;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Makes sure, the node and its children are resolved. Resolves it on demand.
|
|
56
|
-
*/
|
|
57
|
-
async ensureResolved(node) {
|
|
58
|
-
if (!node.resolved) {
|
|
59
|
-
const { provider, direction } = this;
|
|
60
|
-
if (provider && direction !== undefined) {
|
|
61
|
-
const { item } = node;
|
|
62
|
-
const param = {
|
|
63
|
-
item,
|
|
64
|
-
direction,
|
|
65
|
-
resolve: 1
|
|
66
|
-
};
|
|
67
|
-
const resolvedItem = await provider.resolve(param);
|
|
68
|
-
if (resolvedItem) {
|
|
69
|
-
node.resolved = true;
|
|
70
|
-
const items = 0 /* Children */ === direction ? resolvedItem.children : resolvedItem.parents;
|
|
71
|
-
if (items) {
|
|
72
|
-
node.children = items.map(child => TypeHierarchyTree_1.Node.create(child, direction, false));
|
|
73
|
-
}
|
|
74
|
-
else {
|
|
75
|
-
node.children = [];
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
TypeHierarchyTree = TypeHierarchyTree_1 = __decorate([
|
|
83
|
-
(0, inversify_1.injectable)()
|
|
84
|
-
], TypeHierarchyTree);
|
|
85
|
-
exports.TypeHierarchyTree = TypeHierarchyTree;
|
|
86
|
-
(function (TypeHierarchyTree) {
|
|
87
|
-
let RootNode;
|
|
88
|
-
(function (RootNode) {
|
|
89
|
-
function is(node) {
|
|
90
|
-
if (Node.is(node) && 'direction' in node) {
|
|
91
|
-
const { direction } = node;
|
|
92
|
-
return direction === 0 /* Children */ || direction === 1 /* Parents */;
|
|
93
|
-
}
|
|
94
|
-
return false;
|
|
95
|
-
}
|
|
96
|
-
RootNode.is = is;
|
|
97
|
-
function create(item, direction) {
|
|
98
|
-
return {
|
|
99
|
-
...Node.create(item, direction, true),
|
|
100
|
-
direction
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
RootNode.create = create;
|
|
104
|
-
})(RootNode = TypeHierarchyTree.RootNode || (TypeHierarchyTree.RootNode = {}));
|
|
105
|
-
let Node;
|
|
106
|
-
(function (Node) {
|
|
107
|
-
function is(node) {
|
|
108
|
-
if (!!node && 'resolved' in node && 'item' in node) {
|
|
109
|
-
const { resolved, item } = node;
|
|
110
|
-
return typeof resolved === 'boolean' && !!item;
|
|
111
|
-
}
|
|
112
|
-
return false;
|
|
113
|
-
}
|
|
114
|
-
Node.is = is;
|
|
115
|
-
function create(item, direction, resolved = true) {
|
|
116
|
-
const items = 0 /* Children */ === direction ? item.children : item.parents;
|
|
117
|
-
if (items && items.length > 0) {
|
|
118
|
-
// If the server sent more levels than requested, use them.
|
|
119
|
-
resolved = true;
|
|
120
|
-
}
|
|
121
|
-
const node = {
|
|
122
|
-
id: (0, uuid_1.
|
|
123
|
-
name: item.name,
|
|
124
|
-
description: item.detail,
|
|
125
|
-
parent: undefined,
|
|
126
|
-
location: editor_1.Location.create(item.uri, item.selectionRange),
|
|
127
|
-
resolved,
|
|
128
|
-
children: items ? items.map(child => create(child, direction, false)) : [],
|
|
129
|
-
expanded: false,
|
|
130
|
-
visible: true,
|
|
131
|
-
selected: false,
|
|
132
|
-
kind: item.kind,
|
|
133
|
-
decorationData: decorationData(item, direction),
|
|
134
|
-
item
|
|
135
|
-
};
|
|
136
|
-
// Trick: if the node is `resolved` and have zero `children`, make the node non-expandable.
|
|
137
|
-
if (resolved && node.children.length === 0) {
|
|
138
|
-
delete node.expanded;
|
|
139
|
-
}
|
|
140
|
-
return node;
|
|
141
|
-
}
|
|
142
|
-
Node.create = create;
|
|
143
|
-
function decorationData(item, direction) {
|
|
144
|
-
const captionSuffixes = [{
|
|
145
|
-
data: new uri_1.default(item.uri).displayName,
|
|
146
|
-
fontData: {
|
|
147
|
-
color: 'var(--theia-descriptionForeground)',
|
|
148
|
-
}
|
|
149
|
-
}];
|
|
150
|
-
if (item.detail) {
|
|
151
|
-
captionSuffixes.unshift({
|
|
152
|
-
data: item.detail,
|
|
153
|
-
fontData: {
|
|
154
|
-
color: 'var(--theia-list-highlightForeground)',
|
|
155
|
-
style: 'italic'
|
|
156
|
-
}
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
const data = `${0 /* Children */ === direction ? '▼' : '▲'}`;
|
|
160
|
-
const color = `var(${0 /* Children */ === direction ? '--theia-errorForeground' : '--theia-successBackground'})`;
|
|
161
|
-
return {
|
|
162
|
-
captionSuffixes,
|
|
163
|
-
captionPrefixes: [{
|
|
164
|
-
data,
|
|
165
|
-
fontData: {
|
|
166
|
-
color,
|
|
167
|
-
style: 'bold'
|
|
168
|
-
}
|
|
169
|
-
}]
|
|
170
|
-
};
|
|
171
|
-
}
|
|
172
|
-
})(Node = TypeHierarchyTree.Node || (TypeHierarchyTree.Node = {}));
|
|
173
|
-
})(TypeHierarchyTree = exports.TypeHierarchyTree || (exports.TypeHierarchyTree = {}));
|
|
174
|
-
exports.TypeHierarchyTree = TypeHierarchyTree;
|
|
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 TypeHierarchyTree_1;
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.TypeHierarchyTree = void 0;
|
|
26
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
27
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
28
|
+
const uuid_1 = require("@theia/core/lib/common/uuid");
|
|
29
|
+
const uri_1 = require("@theia/core/lib/common/uri");
|
|
30
|
+
const editor_1 = require("@theia/editor/lib/browser/editor");
|
|
31
|
+
const tree_1 = require("@theia/core/lib/browser/tree");
|
|
32
|
+
let TypeHierarchyTree = TypeHierarchyTree_1 = class TypeHierarchyTree extends tree_1.TreeImpl {
|
|
33
|
+
async resolveChildren(parent) {
|
|
34
|
+
if (TypeHierarchyTree_1.Node.is(parent)) {
|
|
35
|
+
await this.ensureResolved(parent);
|
|
36
|
+
if (parent.children.length === 0) {
|
|
37
|
+
delete parent.children;
|
|
38
|
+
delete parent.expanded;
|
|
39
|
+
return [];
|
|
40
|
+
}
|
|
41
|
+
return parent.children.slice();
|
|
42
|
+
}
|
|
43
|
+
return [];
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Returns with the direction of the type hierarchy attached to the root node. `undefined` if the root is not set.
|
|
47
|
+
*/
|
|
48
|
+
get direction() {
|
|
49
|
+
if (TypeHierarchyTree_1.RootNode.is(this.root)) {
|
|
50
|
+
return this.root.direction;
|
|
51
|
+
}
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Makes sure, the node and its children are resolved. Resolves it on demand.
|
|
56
|
+
*/
|
|
57
|
+
async ensureResolved(node) {
|
|
58
|
+
if (!node.resolved) {
|
|
59
|
+
const { provider, direction } = this;
|
|
60
|
+
if (provider && direction !== undefined) {
|
|
61
|
+
const { item } = node;
|
|
62
|
+
const param = {
|
|
63
|
+
item,
|
|
64
|
+
direction,
|
|
65
|
+
resolve: 1
|
|
66
|
+
};
|
|
67
|
+
const resolvedItem = await provider.resolve(param);
|
|
68
|
+
if (resolvedItem) {
|
|
69
|
+
node.resolved = true;
|
|
70
|
+
const items = 0 /* Children */ === direction ? resolvedItem.children : resolvedItem.parents;
|
|
71
|
+
if (items) {
|
|
72
|
+
node.children = items.map(child => TypeHierarchyTree_1.Node.create(child, direction, false));
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
node.children = [];
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
TypeHierarchyTree = TypeHierarchyTree_1 = __decorate([
|
|
83
|
+
(0, inversify_1.injectable)()
|
|
84
|
+
], TypeHierarchyTree);
|
|
85
|
+
exports.TypeHierarchyTree = TypeHierarchyTree;
|
|
86
|
+
(function (TypeHierarchyTree) {
|
|
87
|
+
let RootNode;
|
|
88
|
+
(function (RootNode) {
|
|
89
|
+
function is(node) {
|
|
90
|
+
if (Node.is(node) && 'direction' in node) {
|
|
91
|
+
const { direction } = node;
|
|
92
|
+
return direction === 0 /* Children */ || direction === 1 /* Parents */;
|
|
93
|
+
}
|
|
94
|
+
return false;
|
|
95
|
+
}
|
|
96
|
+
RootNode.is = is;
|
|
97
|
+
function create(item, direction) {
|
|
98
|
+
return {
|
|
99
|
+
...Node.create(item, direction, true),
|
|
100
|
+
direction
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
RootNode.create = create;
|
|
104
|
+
})(RootNode = TypeHierarchyTree.RootNode || (TypeHierarchyTree.RootNode = {}));
|
|
105
|
+
let Node;
|
|
106
|
+
(function (Node) {
|
|
107
|
+
function is(node) {
|
|
108
|
+
if (!!node && 'resolved' in node && 'item' in node) {
|
|
109
|
+
const { resolved, item } = node;
|
|
110
|
+
return typeof resolved === 'boolean' && !!item;
|
|
111
|
+
}
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
114
|
+
Node.is = is;
|
|
115
|
+
function create(item, direction, resolved = true) {
|
|
116
|
+
const items = 0 /* Children */ === direction ? item.children : item.parents;
|
|
117
|
+
if (items && items.length > 0) {
|
|
118
|
+
// If the server sent more levels than requested, use them.
|
|
119
|
+
resolved = true;
|
|
120
|
+
}
|
|
121
|
+
const node = {
|
|
122
|
+
id: (0, uuid_1.generateUuid)(),
|
|
123
|
+
name: item.name,
|
|
124
|
+
description: item.detail,
|
|
125
|
+
parent: undefined,
|
|
126
|
+
location: editor_1.Location.create(item.uri, item.selectionRange),
|
|
127
|
+
resolved,
|
|
128
|
+
children: items ? items.map(child => create(child, direction, false)) : [],
|
|
129
|
+
expanded: false,
|
|
130
|
+
visible: true,
|
|
131
|
+
selected: false,
|
|
132
|
+
kind: item.kind,
|
|
133
|
+
decorationData: decorationData(item, direction),
|
|
134
|
+
item
|
|
135
|
+
};
|
|
136
|
+
// Trick: if the node is `resolved` and have zero `children`, make the node non-expandable.
|
|
137
|
+
if (resolved && node.children.length === 0) {
|
|
138
|
+
delete node.expanded;
|
|
139
|
+
}
|
|
140
|
+
return node;
|
|
141
|
+
}
|
|
142
|
+
Node.create = create;
|
|
143
|
+
function decorationData(item, direction) {
|
|
144
|
+
const captionSuffixes = [{
|
|
145
|
+
data: new uri_1.default(item.uri).displayName,
|
|
146
|
+
fontData: {
|
|
147
|
+
color: 'var(--theia-descriptionForeground)',
|
|
148
|
+
}
|
|
149
|
+
}];
|
|
150
|
+
if (item.detail) {
|
|
151
|
+
captionSuffixes.unshift({
|
|
152
|
+
data: item.detail,
|
|
153
|
+
fontData: {
|
|
154
|
+
color: 'var(--theia-list-highlightForeground)',
|
|
155
|
+
style: 'italic'
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
const data = `${0 /* Children */ === direction ? '▼' : '▲'}`;
|
|
160
|
+
const color = `var(${0 /* Children */ === direction ? '--theia-errorForeground' : '--theia-successBackground'})`;
|
|
161
|
+
return {
|
|
162
|
+
captionSuffixes,
|
|
163
|
+
captionPrefixes: [{
|
|
164
|
+
data,
|
|
165
|
+
fontData: {
|
|
166
|
+
color,
|
|
167
|
+
style: 'bold'
|
|
168
|
+
}
|
|
169
|
+
}]
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
})(Node = TypeHierarchyTree.Node || (TypeHierarchyTree.Node = {}));
|
|
173
|
+
})(TypeHierarchyTree = exports.TypeHierarchyTree || (exports.TypeHierarchyTree = {}));
|
|
174
|
+
exports.TypeHierarchyTree = TypeHierarchyTree;
|
|
175
175
|
//# sourceMappingURL=typehierarchy-tree.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typehierarchy-tree.js","sourceRoot":"","sources":["../../../src/browser/tree/typehierarchy-tree.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;;;;;;;AAEhF,uDAAuD;AAEvD,4DAA0D;AAC1D
|
|
1
|
+
{"version":3,"file":"typehierarchy-tree.js","sourceRoot":"","sources":["../../../src/browser/tree/typehierarchy-tree.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;;;;;;;AAEhF,uDAAuD;AAEvD,4DAA0D;AAC1D,sDAA2D;AAC3D,oDAA6C;AAC7C,6DAA4D;AAE5D,uDAA6H;AAI7H,IAAa,iBAAiB,yBAA9B,MAAa,iBAAkB,SAAQ,eAAQ;IAIlC,KAAK,CAAC,eAAe,CAAC,MAAyB;QACpD,IAAI,mBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACnC,MAAM,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;YAClC,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;gBAC9B,OAAQ,MAAc,CAAC,QAAQ,CAAC;gBAChC,OAAQ,MAAc,CAAC,QAAQ,CAAC;gBAChC,OAAO,EAAE,CAAC;aACb;YACD,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;SAClC;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C9C,KAAK,EAAE,QAAQ;qBAClB;iBACJ,CAAC,CAAC;aACN;YACD,MAAM,IAAI,GAAG,GAAG,qBAAoC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;YAC5E,MAAM,KAAK,GAAG,OAAO,qBAAoC,SAAS,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,2BAA2B,GAAG,CAAC;YAChI,OAAO;gBACH,eAAe;gBACf,eAAe,EAAE,CAAC;wBACd,IAAI;wBACJ,QAAQ,EAAE;4BACN,KAAK;4BACL,KAAK,EAAE,MAAM;yBAChB;qBACJ,CAAC;aACL,CAAC;QACN,CAAC;IAEL,CAAC,EApEgB,IAAI,GAAJ,sBAAI,KAAJ,sBAAI,QAoEpB;AAEL,CAAC,EA1GgB,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QA0GjC;AAlKY,8CAAiB"}
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import { MenuModelRegistry } from '@theia/core/lib/common/menu';
|
|
2
|
-
import { ApplicationShell } from '@theia/core/lib/browser/shell';
|
|
3
|
-
import { KeybindingRegistry } from '@theia/core/lib/browser/keybinding';
|
|
4
|
-
import { Command, CommandRegistry } from '@theia/core/lib/common/command';
|
|
5
|
-
import { EditorAccess, EditorManager } from '@theia/editor/lib/browser/editor-manager';
|
|
6
|
-
import { AbstractViewContribution, OpenViewArguments } from '@theia/core/lib/browser/shell/view-contribution';
|
|
7
|
-
import { TypeHierarchyTreeWidget } from './tree/typehierarchy-tree-widget';
|
|
8
|
-
import { TypeHierarchyDirection } from './typehierarchy-provider';
|
|
9
|
-
import { TypeHierarchyServiceProvider } from './typehierarchy-service';
|
|
10
|
-
import { ContextKey, ContextKeyService } from '@theia/core/lib/browser/context-key-service';
|
|
11
|
-
export declare class TypeHierarchyContribution extends AbstractViewContribution<TypeHierarchyTreeWidget> {
|
|
12
|
-
protected readonly shell: ApplicationShell;
|
|
13
|
-
protected readonly editorAccess: EditorAccess;
|
|
14
|
-
protected readonly editorManager: EditorManager;
|
|
15
|
-
protected readonly contextKeyService: ContextKeyService;
|
|
16
|
-
protected editorHasTypeHierarchyProvider: ContextKey<boolean>;
|
|
17
|
-
protected readonly typeHierarchyServiceProvider: TypeHierarchyServiceProvider;
|
|
18
|
-
constructor();
|
|
19
|
-
protected init(): void;
|
|
20
|
-
protected isTypeHierarchyAvailable(): boolean;
|
|
21
|
-
openView(args?: Partial<TypeHierarchyOpenViewArguments>): Promise<TypeHierarchyTreeWidget>;
|
|
22
|
-
registerCommands(commands: CommandRegistry): void;
|
|
23
|
-
registerMenus(menus: MenuModelRegistry): void;
|
|
24
|
-
registerKeybindings(keybindings: KeybindingRegistry): void;
|
|
25
|
-
/**
|
|
26
|
-
* Flips the hierarchy direction in the `Type Hierarchy` view, if it is active and has a valid root.
|
|
27
|
-
* Otherwise, calculates the type hierarchy based on the selection of the current editor.
|
|
28
|
-
*/
|
|
29
|
-
protected openViewOrFlipHierarchyDirection(direction: TypeHierarchyDirection): Promise<void>;
|
|
30
|
-
/**
|
|
31
|
-
* Enabled if the `current` editor has the `languageId` or the `Type Hierarchy` widget is the active one.
|
|
32
|
-
*/
|
|
33
|
-
protected isEnabled(languageId?: string | undefined): boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Extracts the type hierarchy direction from the argument. If the direction cannot be extracted, returns with the `Children` as the default type.
|
|
36
|
-
*/
|
|
37
|
-
protected getDirection(args?: Partial<TypeHierarchyOpenViewArguments>): TypeHierarchyDirection;
|
|
38
|
-
}
|
|
39
|
-
export interface TypeHierarchyOpenViewArguments extends OpenViewArguments {
|
|
40
|
-
/**
|
|
41
|
-
* The type hierarchy direction for the view argument.
|
|
42
|
-
*/
|
|
43
|
-
readonly direction: TypeHierarchyDirection;
|
|
44
|
-
}
|
|
45
|
-
export declare namespace TypeHierarchyCommands {
|
|
46
|
-
const TOGGLE_VIEW: Command;
|
|
47
|
-
const OPEN_SUBTYPE: Command;
|
|
48
|
-
const OPEN_SUPERTYPE: Command;
|
|
49
|
-
}
|
|
1
|
+
import { MenuModelRegistry } from '@theia/core/lib/common/menu';
|
|
2
|
+
import { ApplicationShell } from '@theia/core/lib/browser/shell';
|
|
3
|
+
import { KeybindingRegistry } from '@theia/core/lib/browser/keybinding';
|
|
4
|
+
import { Command, CommandRegistry } from '@theia/core/lib/common/command';
|
|
5
|
+
import { EditorAccess, EditorManager } from '@theia/editor/lib/browser/editor-manager';
|
|
6
|
+
import { AbstractViewContribution, OpenViewArguments } from '@theia/core/lib/browser/shell/view-contribution';
|
|
7
|
+
import { TypeHierarchyTreeWidget } from './tree/typehierarchy-tree-widget';
|
|
8
|
+
import { TypeHierarchyDirection } from './typehierarchy-provider';
|
|
9
|
+
import { TypeHierarchyServiceProvider } from './typehierarchy-service';
|
|
10
|
+
import { ContextKey, ContextKeyService } from '@theia/core/lib/browser/context-key-service';
|
|
11
|
+
export declare class TypeHierarchyContribution extends AbstractViewContribution<TypeHierarchyTreeWidget> {
|
|
12
|
+
protected readonly shell: ApplicationShell;
|
|
13
|
+
protected readonly editorAccess: EditorAccess;
|
|
14
|
+
protected readonly editorManager: EditorManager;
|
|
15
|
+
protected readonly contextKeyService: ContextKeyService;
|
|
16
|
+
protected editorHasTypeHierarchyProvider: ContextKey<boolean>;
|
|
17
|
+
protected readonly typeHierarchyServiceProvider: TypeHierarchyServiceProvider;
|
|
18
|
+
constructor();
|
|
19
|
+
protected init(): void;
|
|
20
|
+
protected isTypeHierarchyAvailable(): boolean;
|
|
21
|
+
openView(args?: Partial<TypeHierarchyOpenViewArguments>): Promise<TypeHierarchyTreeWidget>;
|
|
22
|
+
registerCommands(commands: CommandRegistry): void;
|
|
23
|
+
registerMenus(menus: MenuModelRegistry): void;
|
|
24
|
+
registerKeybindings(keybindings: KeybindingRegistry): void;
|
|
25
|
+
/**
|
|
26
|
+
* Flips the hierarchy direction in the `Type Hierarchy` view, if it is active and has a valid root.
|
|
27
|
+
* Otherwise, calculates the type hierarchy based on the selection of the current editor.
|
|
28
|
+
*/
|
|
29
|
+
protected openViewOrFlipHierarchyDirection(direction: TypeHierarchyDirection): Promise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* Enabled if the `current` editor has the `languageId` or the `Type Hierarchy` widget is the active one.
|
|
32
|
+
*/
|
|
33
|
+
protected isEnabled(languageId?: string | undefined): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Extracts the type hierarchy direction from the argument. If the direction cannot be extracted, returns with the `Children` as the default type.
|
|
36
|
+
*/
|
|
37
|
+
protected getDirection(args?: Partial<TypeHierarchyOpenViewArguments>): TypeHierarchyDirection;
|
|
38
|
+
}
|
|
39
|
+
export interface TypeHierarchyOpenViewArguments extends OpenViewArguments {
|
|
40
|
+
/**
|
|
41
|
+
* The type hierarchy direction for the view argument.
|
|
42
|
+
*/
|
|
43
|
+
readonly direction: TypeHierarchyDirection;
|
|
44
|
+
}
|
|
45
|
+
export declare namespace TypeHierarchyCommands {
|
|
46
|
+
const TOGGLE_VIEW: Command;
|
|
47
|
+
const OPEN_SUBTYPE: Command;
|
|
48
|
+
const OPEN_SUPERTYPE: Command;
|
|
49
|
+
}
|
|
50
50
|
//# sourceMappingURL=typehierarchy-contribution.d.ts.map
|