massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-json / node_modules / vscode-languageserver / lib / common / callHierarchy.js
1 /* --------------------------------------------------------------------------------------------
2  * Copyright (c) Microsoft Corporation. All rights reserved.
3  * Licensed under the MIT License. See License.txt in the project root for license information.
4  * ------------------------------------------------------------------------------------------ */
5 'use strict';
6 Object.defineProperty(exports, "__esModule", { value: true });
7 exports.CallHierarchyFeature = void 0;
8 const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol");
9 const CallHierarchyFeature = (Base) => {
10     return class extends Base {
11         get callHierarchy() {
12             return {
13                 onPrepare: (handler) => {
14                     this.connection.onRequest(vscode_languageserver_protocol_1.CallHierarchyPrepareRequest.type, (params, cancel) => {
15                         return handler(params, cancel, this.attachWorkDoneProgress(params), undefined);
16                     });
17                 },
18                 onIncomingCalls: (handler) => {
19                     const type = vscode_languageserver_protocol_1.CallHierarchyIncomingCallsRequest.type;
20                     this.connection.onRequest(type, (params, cancel) => {
21                         return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
22                     });
23                 },
24                 onOutgoingCalls: (handler) => {
25                     const type = vscode_languageserver_protocol_1.CallHierarchyOutgoingCallsRequest.type;
26                     this.connection.onRequest(type, (params, cancel) => {
27                         return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
28                     });
29                 }
30             };
31         }
32     };
33 };
34 exports.CallHierarchyFeature = CallHierarchyFeature;
35 //# sourceMappingURL=callHierarchy.js.map