@theia/plugin-ext 1.18.0-next.121 → 1.18.0-next.122
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/lib/common/plugin-api-rpc-model.d.ts +2 -0
- package/lib/common/plugin-api-rpc-model.d.ts.map +1 -1
- package/lib/common/plugin-api-rpc-model.js.map +1 -1
- package/lib/common/plugin-api-rpc.d.ts +1 -1
- package/lib/common/plugin-api-rpc.d.ts.map +1 -1
- package/lib/main/browser/callhierarchy/callhierarchy-type-converters.d.ts.map +1 -1
- package/lib/main/browser/callhierarchy/callhierarchy-type-converters.js +5 -2
- package/lib/main/browser/callhierarchy/callhierarchy-type-converters.js.map +1 -1
- package/lib/main/browser/languages-main.js +1 -1
- package/lib/main/browser/languages-main.js.map +1 -1
- package/lib/plugin/languages/call-hierarchy.d.ts +1 -1
- package/lib/plugin/languages/call-hierarchy.d.ts.map +1 -1
- package/lib/plugin/languages/call-hierarchy.js +7 -3
- package/lib/plugin/languages/call-hierarchy.js.map +1 -1
- package/lib/plugin/languages.d.ts +1 -1
- package/lib/plugin/languages.d.ts.map +1 -1
- package/lib/plugin/languages.js.map +1 -1
- package/lib/plugin/type-converters.d.ts.map +1 -1
- package/lib/plugin/type-converters.js +6 -2
- package/lib/plugin/type-converters.js.map +1 -1
- package/lib/plugin/types-impl.d.ts +1 -0
- package/lib/plugin/types-impl.d.ts.map +1 -1
- package/lib/plugin/types-impl.js.map +1 -1
- package/package.json +23 -23
- package/src/common/plugin-api-rpc-model.ts +2 -0
- package/src/common/plugin-api-rpc.ts +1 -1
- package/src/main/browser/callhierarchy/callhierarchy-type-converters.ts +5 -2
- package/src/main/browser/languages-main.ts +1 -1
- package/src/plugin/languages/call-hierarchy.ts +13 -5
- package/src/plugin/languages.ts +3 -1
- package/src/plugin/type-converters.ts +8 -3
- package/src/plugin/types-impl.ts +1 -0
package/package.json
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/plugin-ext",
|
|
3
|
-
"version": "1.18.0-next.
|
|
3
|
+
"version": "1.18.0-next.122+49055bf84e9",
|
|
4
4
|
"description": "Theia - Plugin Extension",
|
|
5
5
|
"main": "lib/common/index.js",
|
|
6
6
|
"typings": "lib/common/index.d.ts",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@theia/bulk-edit": "1.18.0-next.
|
|
9
|
-
"@theia/callhierarchy": "1.18.0-next.
|
|
10
|
-
"@theia/console": "1.18.0-next.
|
|
11
|
-
"@theia/core": "1.18.0-next.
|
|
12
|
-
"@theia/debug": "1.18.0-next.
|
|
13
|
-
"@theia/editor": "1.18.0-next.
|
|
14
|
-
"@theia/file-search": "1.18.0-next.
|
|
15
|
-
"@theia/filesystem": "1.18.0-next.
|
|
16
|
-
"@theia/markers": "1.18.0-next.
|
|
17
|
-
"@theia/messages": "1.18.0-next.
|
|
18
|
-
"@theia/monaco": "1.18.0-next.
|
|
19
|
-
"@theia/navigator": "1.18.0-next.
|
|
20
|
-
"@theia/output": "1.18.0-next.
|
|
21
|
-
"@theia/plugin": "1.18.0-next.
|
|
22
|
-
"@theia/preferences": "1.18.0-next.
|
|
23
|
-
"@theia/scm": "1.18.0-next.
|
|
24
|
-
"@theia/search-in-workspace": "1.18.0-next.
|
|
25
|
-
"@theia/task": "1.18.0-next.
|
|
26
|
-
"@theia/terminal": "1.18.0-next.
|
|
27
|
-
"@theia/timeline": "1.18.0-next.
|
|
28
|
-
"@theia/workspace": "1.18.0-next.
|
|
8
|
+
"@theia/bulk-edit": "1.18.0-next.122+49055bf84e9",
|
|
9
|
+
"@theia/callhierarchy": "1.18.0-next.122+49055bf84e9",
|
|
10
|
+
"@theia/console": "1.18.0-next.122+49055bf84e9",
|
|
11
|
+
"@theia/core": "1.18.0-next.122+49055bf84e9",
|
|
12
|
+
"@theia/debug": "1.18.0-next.122+49055bf84e9",
|
|
13
|
+
"@theia/editor": "1.18.0-next.122+49055bf84e9",
|
|
14
|
+
"@theia/file-search": "1.18.0-next.122+49055bf84e9",
|
|
15
|
+
"@theia/filesystem": "1.18.0-next.122+49055bf84e9",
|
|
16
|
+
"@theia/markers": "1.18.0-next.122+49055bf84e9",
|
|
17
|
+
"@theia/messages": "1.18.0-next.122+49055bf84e9",
|
|
18
|
+
"@theia/monaco": "1.18.0-next.122+49055bf84e9",
|
|
19
|
+
"@theia/navigator": "1.18.0-next.122+49055bf84e9",
|
|
20
|
+
"@theia/output": "1.18.0-next.122+49055bf84e9",
|
|
21
|
+
"@theia/plugin": "1.18.0-next.122+49055bf84e9",
|
|
22
|
+
"@theia/preferences": "1.18.0-next.122+49055bf84e9",
|
|
23
|
+
"@theia/scm": "1.18.0-next.122+49055bf84e9",
|
|
24
|
+
"@theia/search-in-workspace": "1.18.0-next.122+49055bf84e9",
|
|
25
|
+
"@theia/task": "1.18.0-next.122+49055bf84e9",
|
|
26
|
+
"@theia/terminal": "1.18.0-next.122+49055bf84e9",
|
|
27
|
+
"@theia/timeline": "1.18.0-next.122+49055bf84e9",
|
|
28
|
+
"@theia/workspace": "1.18.0-next.122+49055bf84e9",
|
|
29
29
|
"@types/markdown-it": "*",
|
|
30
30
|
"@types/mime": "^2.0.1",
|
|
31
31
|
"decompress": "^4.2.1",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"nyc": {
|
|
93
93
|
"extends": "../../configs/nyc.json"
|
|
94
94
|
},
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "49055bf84e9f707422090815f162dc2879c50090"
|
|
96
96
|
}
|
|
@@ -524,6 +524,7 @@ export interface CallHierarchyDefinition {
|
|
|
524
524
|
range: Range;
|
|
525
525
|
selectionRange: Range;
|
|
526
526
|
tags?: readonly SymbolTag[];
|
|
527
|
+
data: unknown;
|
|
527
528
|
}
|
|
528
529
|
|
|
529
530
|
export interface CallHierarchyReference {
|
|
@@ -542,6 +543,7 @@ export interface CallHierarchyItem {
|
|
|
542
543
|
range: Range;
|
|
543
544
|
selectionRange: Range;
|
|
544
545
|
tags?: readonly SymbolTag[];
|
|
546
|
+
data: unknown;
|
|
545
547
|
}
|
|
546
548
|
|
|
547
549
|
export interface CallHierarchyIncomingCall {
|
|
@@ -1459,7 +1459,7 @@ export interface LanguagesExt {
|
|
|
1459
1459
|
$provideDocumentSemanticTokens(handle: number, resource: UriComponents, previousResultId: number, token: CancellationToken): Promise<BinaryBuffer | null>;
|
|
1460
1460
|
$releaseDocumentSemanticTokens(handle: number, semanticColoringResultId: number): void;
|
|
1461
1461
|
$provideDocumentRangeSemanticTokens(handle: number, resource: UriComponents, range: Range, token: CancellationToken): Promise<BinaryBuffer | null>;
|
|
1462
|
-
$provideRootDefinition(handle: number, resource: UriComponents, location: Position, token: CancellationToken): Promise<CallHierarchyDefinition | undefined>;
|
|
1462
|
+
$provideRootDefinition(handle: number, resource: UriComponents, location: Position, token: CancellationToken): Promise<CallHierarchyDefinition | CallHierarchyDefinition[] | undefined>;
|
|
1463
1463
|
$provideCallers(handle: number, definition: CallHierarchyDefinition, token: CancellationToken): Promise<CallHierarchyReference[] | undefined>;
|
|
1464
1464
|
$provideCallees(handle: number, definition: CallHierarchyDefinition, token: CancellationToken): Promise<CallHierarchyReference[] | undefined>;
|
|
1465
1465
|
}
|
|
@@ -152,7 +152,8 @@ export function toDefinition(definition: model.CallHierarchyDefinition | undefin
|
|
|
152
152
|
symbolName: definition.name,
|
|
153
153
|
symbolKind: SymbolKindConverter.toSymbolKind(definition.kind),
|
|
154
154
|
containerName: undefined,
|
|
155
|
-
tags: definition.tags
|
|
155
|
+
tags: definition.tags,
|
|
156
|
+
data: definition.data,
|
|
156
157
|
};
|
|
157
158
|
}
|
|
158
159
|
|
|
@@ -162,7 +163,9 @@ export function fromDefinition(definition: CallHierarchyDefinition): model.CallH
|
|
|
162
163
|
range: fromRange(definition.location.range),
|
|
163
164
|
selectionRange: fromRange(definition.selectionRange),
|
|
164
165
|
name: definition.symbolName,
|
|
165
|
-
kind: SymbolKindConverter.fromSymbolKind(definition.symbolKind)
|
|
166
|
+
kind: SymbolKindConverter.fromSymbolKind(definition.symbolKind),
|
|
167
|
+
tags: definition.tags,
|
|
168
|
+
data: definition.data,
|
|
166
169
|
};
|
|
167
170
|
}
|
|
168
171
|
|
|
@@ -774,7 +774,7 @@ export class LanguagesMainImpl implements LanguagesMain, Disposable {
|
|
|
774
774
|
selector: language,
|
|
775
775
|
getRootDefinition: (uri: DocumentUri, position: Position, cancellationToken: CancellationToken) =>
|
|
776
776
|
this.proxy.$provideRootDefinition(handle, toUriComponents(uri), fromPosition(position), cancellationToken)
|
|
777
|
-
.then(def => toDefinition(def)),
|
|
777
|
+
.then(def => Array.isArray(def) ? def.map(item => toDefinition(item)) : toDefinition(def)),
|
|
778
778
|
getCallers: (definition: Definition, cancellationToken: CancellationToken) => this.proxy.$provideCallers(handle, fromDefinition(definition), cancellationToken)
|
|
779
779
|
.then(result => {
|
|
780
780
|
if (!result) {
|
|
@@ -29,7 +29,9 @@ export class CallHierarchyAdapter {
|
|
|
29
29
|
private readonly documents: DocumentsExtImpl
|
|
30
30
|
) { }
|
|
31
31
|
|
|
32
|
-
async provideRootDefinition(
|
|
32
|
+
async provideRootDefinition(
|
|
33
|
+
resource: URI, position: rpc.Position, token: theia.CancellationToken
|
|
34
|
+
): Promise<model.CallHierarchyDefinition | model.CallHierarchyDefinition[] | undefined> {
|
|
33
35
|
const documentData = this.documents.getDocumentData(resource);
|
|
34
36
|
if (!documentData) {
|
|
35
37
|
return Promise.reject(new Error(`There is no document for ${resource}`));
|
|
@@ -40,12 +42,14 @@ export class CallHierarchyAdapter {
|
|
|
40
42
|
position.lineNumber,
|
|
41
43
|
position.column
|
|
42
44
|
),
|
|
43
|
-
token
|
|
45
|
+
token
|
|
46
|
+
);
|
|
47
|
+
|
|
44
48
|
if (!definition) {
|
|
45
49
|
return undefined;
|
|
46
50
|
}
|
|
47
51
|
|
|
48
|
-
return this.fromCallHierarchyItem(definition);
|
|
52
|
+
return Array.isArray(definition) ? definition.map(item => this.fromCallHierarchyItem(item)) : this.fromCallHierarchyItem(definition);
|
|
49
53
|
}
|
|
50
54
|
|
|
51
55
|
async provideCallers(definition: model.CallHierarchyDefinition, token: theia.CancellationToken): Promise<model.CallHierarchyReference[] | undefined> {
|
|
@@ -73,7 +77,8 @@ export class CallHierarchyAdapter {
|
|
|
73
77
|
selectionRange: this.fromRange(item.selectionRange),
|
|
74
78
|
name: item.name,
|
|
75
79
|
kind: item.kind,
|
|
76
|
-
tags: item.tags
|
|
80
|
+
tags: item.tags,
|
|
81
|
+
data: item.data,
|
|
77
82
|
};
|
|
78
83
|
}
|
|
79
84
|
|
|
@@ -96,7 +101,7 @@ export class CallHierarchyAdapter {
|
|
|
96
101
|
}
|
|
97
102
|
|
|
98
103
|
private toCallHierarchyItem(definition: model.CallHierarchyDefinition): theia.CallHierarchyItem {
|
|
99
|
-
|
|
104
|
+
const item = new types.CallHierarchyItem(
|
|
100
105
|
Converter.SymbolKind.toSymbolKind(definition.kind),
|
|
101
106
|
definition.name,
|
|
102
107
|
definition.detail ? definition.detail : '',
|
|
@@ -104,6 +109,9 @@ export class CallHierarchyAdapter {
|
|
|
104
109
|
this.toRange(definition.range),
|
|
105
110
|
this.toRange(definition.selectionRange),
|
|
106
111
|
);
|
|
112
|
+
item.tags = definition.tags;
|
|
113
|
+
item.data = definition.data;
|
|
114
|
+
return item;
|
|
107
115
|
}
|
|
108
116
|
|
|
109
117
|
private fromCallHierarchyIncomingCall(caller: theia.CallHierarchyIncomingCall): model.CallHierarchyReference {
|
package/src/plugin/languages.ts
CHANGED
|
@@ -583,7 +583,9 @@ export class LanguagesExtImpl implements LanguagesExt {
|
|
|
583
583
|
return this.createDisposable(callId);
|
|
584
584
|
}
|
|
585
585
|
|
|
586
|
-
$provideRootDefinition(
|
|
586
|
+
$provideRootDefinition(
|
|
587
|
+
handle: number, resource: UriComponents, location: Position, token: theia.CancellationToken
|
|
588
|
+
): Promise<CallHierarchyDefinition | CallHierarchyDefinition[] | undefined> {
|
|
587
589
|
return this.withAdapter(handle, CallHierarchyAdapter, adapter => adapter.provideRootDefinition(URI.revive(resource), location, token), undefined);
|
|
588
590
|
}
|
|
589
591
|
|
|
@@ -683,18 +683,23 @@ export function fromCallHierarchyItem(item: theia.CallHierarchyItem): model.Call
|
|
|
683
683
|
uri: item.uri,
|
|
684
684
|
range: fromRange(item.range),
|
|
685
685
|
selectionRange: fromRange(item.selectionRange),
|
|
686
|
-
tags: item.tags
|
|
686
|
+
tags: item.tags,
|
|
687
|
+
data: item.data,
|
|
687
688
|
};
|
|
688
689
|
}
|
|
689
690
|
|
|
690
691
|
export function toCallHierarchyItem(value: model.CallHierarchyItem): types.CallHierarchyItem {
|
|
691
|
-
|
|
692
|
+
const item = new types.CallHierarchyItem(
|
|
692
693
|
SymbolKind.toSymbolKind(value.kind),
|
|
693
694
|
value.name,
|
|
694
695
|
value.detail ? value.detail : '',
|
|
695
696
|
URI.revive(value.uri),
|
|
696
697
|
toRange(value.range),
|
|
697
|
-
toRange(value.selectionRange)
|
|
698
|
+
toRange(value.selectionRange),
|
|
699
|
+
);
|
|
700
|
+
item.tags = value.tags;
|
|
701
|
+
item.data = value.data;
|
|
702
|
+
return item;
|
|
698
703
|
}
|
|
699
704
|
|
|
700
705
|
export function toCallHierarchyIncomingCall(value: model.CallHierarchyIncomingCall): types.CallHierarchyIncomingCall {
|
package/src/plugin/types-impl.ts
CHANGED
|
@@ -2419,6 +2419,7 @@ export class CallHierarchyItem {
|
|
|
2419
2419
|
range: Range;
|
|
2420
2420
|
selectionRange: Range;
|
|
2421
2421
|
tags?: readonly SymbolTag[];
|
|
2422
|
+
data?: unknown;
|
|
2422
2423
|
|
|
2423
2424
|
constructor(kind: SymbolKind, name: string, detail: string, uri: URI, range: Range, selectionRange: Range) {
|
|
2424
2425
|
this.kind = kind;
|