1 | import { Disposable, TextDocument, ProviderResult, Position as VPosition, CallHierarchyItem as VCallHierarchyItem, CallHierarchyIncomingCall as VCallHierarchyIncomingCall, CallHierarchyOutgoingCall as VCallHierarchyOutgoingCall, CancellationToken, CallHierarchyProvider as VCallHierarchyProvider } from 'vscode';
|
2 | import { ClientCapabilities, ServerCapabilities, DocumentSelector, CallHierarchyOptions, CallHierarchyRegistrationOptions } from 'vscode-languageserver-protocol';
|
3 | import { TextDocumentLanguageFeature, FeatureClient } from './features';
|
4 | export interface PrepareCallHierarchySignature {
|
5 | (this: void, document: TextDocument, position: VPosition, token: CancellationToken): ProviderResult<VCallHierarchyItem | VCallHierarchyItem[]>;
|
6 | }
|
7 | export interface CallHierarchyIncomingCallsSignature {
|
8 | (this: void, item: VCallHierarchyItem, token: CancellationToken): ProviderResult<VCallHierarchyIncomingCall[]>;
|
9 | }
|
10 | export interface CallHierarchyOutgoingCallsSignature {
|
11 | (this: void, item: VCallHierarchyItem, token: CancellationToken): ProviderResult<VCallHierarchyOutgoingCall[]>;
|
12 | }
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 | export interface CallHierarchyMiddleware {
|
19 | prepareCallHierarchy?: (this: void, document: TextDocument, positions: VPosition, token: CancellationToken, next: PrepareCallHierarchySignature) => ProviderResult<VCallHierarchyItem | VCallHierarchyItem[]>;
|
20 | provideCallHierarchyIncomingCalls?: (this: void, item: VCallHierarchyItem, token: CancellationToken, next: CallHierarchyIncomingCallsSignature) => ProviderResult<VCallHierarchyIncomingCall[]>;
|
21 | provideCallHierarchyOutgoingCalls?: (this: void, item: VCallHierarchyItem, token: CancellationToken, next: CallHierarchyOutgoingCallsSignature) => ProviderResult<VCallHierarchyOutgoingCall[]>;
|
22 | }
|
23 | declare class CallHierarchyProvider implements VCallHierarchyProvider {
|
24 | private client;
|
25 | private middleware;
|
26 | constructor(client: FeatureClient<CallHierarchyMiddleware>);
|
27 | prepareCallHierarchy(document: TextDocument, position: VPosition, token: CancellationToken): ProviderResult<VCallHierarchyItem | VCallHierarchyItem[]>;
|
28 | provideCallHierarchyIncomingCalls(item: VCallHierarchyItem, token: CancellationToken): ProviderResult<VCallHierarchyIncomingCall[]>;
|
29 | provideCallHierarchyOutgoingCalls(item: VCallHierarchyItem, token: CancellationToken): ProviderResult<VCallHierarchyOutgoingCall[]>;
|
30 | }
|
31 | export declare class CallHierarchyFeature extends TextDocumentLanguageFeature<boolean | CallHierarchyOptions, CallHierarchyRegistrationOptions, CallHierarchyProvider, CallHierarchyMiddleware> {
|
32 | constructor(client: FeatureClient<CallHierarchyMiddleware>);
|
33 | fillClientCapabilities(cap: ClientCapabilities): void;
|
34 | initialize(capabilities: ServerCapabilities, documentSelector: DocumentSelector): void;
|
35 | protected registerLanguageProvider(options: CallHierarchyRegistrationOptions): [Disposable, CallHierarchyProvider];
|
36 | }
|
37 | export {};
|