mirror of
https://github.com/Microsoft/vscode
synced 2024-11-05 18:29:38 +00:00
fix tests
This commit is contained in:
parent
b24844ce9d
commit
0fc92f222f
3 changed files with 12 additions and 12 deletions
4
src/vs/vscode.proposed.d.ts
vendored
4
src/vs/vscode.proposed.d.ts
vendored
|
@ -61,13 +61,13 @@ declare module 'vscode' {
|
|||
export class CallHierarchyIncomingCall {
|
||||
from: CallHierarchyItem;
|
||||
fromRanges: Range[];
|
||||
constructor(item: CallHierarchyItem, sourceRanges: Range[]);
|
||||
constructor(item: CallHierarchyItem, fromRanges: Range[]);
|
||||
}
|
||||
|
||||
export class CallHierarchyOutgoingCall {
|
||||
fromRanges: Range[];
|
||||
to: CallHierarchyItem;
|
||||
constructor(item: CallHierarchyItem, sourceRanges: Range[]);
|
||||
constructor(item: CallHierarchyItem, fromRanges: Range[]);
|
||||
}
|
||||
|
||||
export interface CallHierarchyItemProvider {
|
||||
|
|
|
@ -499,10 +499,10 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha
|
|||
if (!outgoing) {
|
||||
return outgoing;
|
||||
}
|
||||
return outgoing.map(([item, sourceRanges]): callh.OutgoingCall => {
|
||||
return outgoing.map(([item, fromRanges]): callh.OutgoingCall => {
|
||||
return {
|
||||
to: MainThreadLanguageFeatures._reviveCallHierarchyItemDto(item),
|
||||
fromRanges: sourceRanges
|
||||
fromRanges
|
||||
};
|
||||
});
|
||||
},
|
||||
|
@ -511,10 +511,10 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha
|
|||
if (!incoming) {
|
||||
return incoming;
|
||||
}
|
||||
return incoming.map(([item, sourceRanges]): callh.IncomingCall => {
|
||||
return incoming.map(([item, fromRanges]): callh.IncomingCall => {
|
||||
return {
|
||||
from: MainThreadLanguageFeatures._reviveCallHierarchyItemDto(item),
|
||||
fromRanges: sourceRanges
|
||||
fromRanges
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
|
@ -576,30 +576,30 @@ export class ExtHostApiCommands {
|
|||
|
||||
private async _executeCallHierarchyIncomingCallsProvider(resource: URI, position: types.Position): Promise<vscode.CallHierarchyIncomingCall[]> {
|
||||
type IncomingCallDto = {
|
||||
source: ICallHierarchyItemDto;
|
||||
sourceRanges: IRange[];
|
||||
from: ICallHierarchyItemDto;
|
||||
fromRanges: IRange[];
|
||||
};
|
||||
const args = { resource, position: typeConverters.Position.from(position) };
|
||||
const calls = await this._commands.executeCommand<IncomingCallDto[]>('_executeCallHierarchyIncomingCalls', args);
|
||||
|
||||
const result: vscode.CallHierarchyIncomingCall[] = [];
|
||||
for (const call of calls) {
|
||||
result.push(new types.CallHierarchyIncomingCall(typeConverters.CallHierarchyItem.to(call.source), <vscode.Range[]>call.sourceRanges.map(typeConverters.Range.to)));
|
||||
result.push(new types.CallHierarchyIncomingCall(typeConverters.CallHierarchyItem.to(call.from), <vscode.Range[]>call.fromRanges.map(typeConverters.Range.to)));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private async _executeCallHierarchyOutgoingCallsProvider(resource: URI, position: types.Position): Promise<vscode.CallHierarchyOutgoingCall[]> {
|
||||
type OutgoingCallDto = {
|
||||
sourceRanges: IRange[];
|
||||
target: ICallHierarchyItemDto;
|
||||
fromRanges: IRange[];
|
||||
to: ICallHierarchyItemDto;
|
||||
};
|
||||
const args = { resource, position: typeConverters.Position.from(position) };
|
||||
const calls = await this._commands.executeCommand<OutgoingCallDto[]>('_executeCallHierarchyOutgoingCalls', args);
|
||||
|
||||
const result: vscode.CallHierarchyOutgoingCall[] = [];
|
||||
for (const call of calls) {
|
||||
result.push(new types.CallHierarchyOutgoingCall(typeConverters.CallHierarchyItem.to(call.target), <vscode.Range[]>call.sourceRanges.map(typeConverters.Range.to)));
|
||||
result.push(new types.CallHierarchyOutgoingCall(typeConverters.CallHierarchyItem.to(call.to), <vscode.Range[]>call.fromRanges.map(typeConverters.Range.to)));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue