@codingame/monaco-languageclient-wrapper 4.4.1 → 5.0.0-next.1
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/dist/_virtual/_commonjsHelpers.js +32 -0
- package/dist/_virtual/_rollupPluginBabelHelpers.js +50 -0
- package/dist/_virtual/_vscode.js +4 -0
- package/dist/_virtual/api.js +2 -0
- package/dist/_virtual/api2.js +2 -0
- package/dist/_virtual/api3.js +2 -0
- package/dist/_virtual/async.js +2 -0
- package/dist/_virtual/callHierarchy.js +2 -0
- package/dist/_virtual/cancellation.js +2 -0
- package/dist/_virtual/client.js +2 -0
- package/dist/_virtual/codeAction.js +2 -0
- package/dist/_virtual/codeConverter.js +2 -0
- package/dist/_virtual/codeLens.js +2 -0
- package/dist/_virtual/colorProvider.js +2 -0
- package/dist/_virtual/completion.js +2 -0
- package/dist/_virtual/configuration.js +2 -0
- package/dist/_virtual/connection.js +2 -0
- package/dist/_virtual/connection2.js +2 -0
- package/dist/_virtual/declaration.js +2 -0
- package/dist/_virtual/definition.js +2 -0
- package/dist/_virtual/diagnostic.js +2 -0
- package/dist/_virtual/disposable.js +2 -0
- package/dist/_virtual/documentHighlight.js +2 -0
- package/dist/_virtual/documentLink.js +2 -0
- package/dist/_virtual/documentSymbol.js +2 -0
- package/dist/_virtual/events.js +2 -0
- package/dist/_virtual/executeCommand.js +2 -0
- package/dist/_virtual/features.js +2 -0
- package/dist/_virtual/fileOperations.js +2 -0
- package/dist/_virtual/fileSystemWatcher.js +2 -0
- package/dist/_virtual/foldingRange.js +2 -0
- package/dist/_virtual/formatting.js +2 -0
- package/dist/_virtual/hover.js +2 -0
- package/dist/_virtual/implementation.js +2 -0
- package/dist/_virtual/inlayHint.js +2 -0
- package/dist/_virtual/inlineValue.js +2 -0
- package/dist/_virtual/is.js +2 -0
- package/dist/_virtual/is2.js +2 -0
- package/dist/_virtual/is3.js +2 -0
- package/dist/_virtual/linkedEditingRange.js +2 -0
- package/dist/_virtual/linkedMap.js +2 -0
- package/dist/_virtual/main.js +2 -0
- package/dist/_virtual/main2.js +2 -0
- package/dist/_virtual/main3.js +2 -0
- package/dist/_virtual/main4.js +4 -0
- package/dist/_virtual/messageBuffer.js +2 -0
- package/dist/_virtual/messageReader.js +2 -0
- package/dist/_virtual/messageWriter.js +2 -0
- package/dist/_virtual/messages.js +2 -0
- package/dist/_virtual/messages2.js +2 -0
- package/dist/_virtual/notebook.js +2 -0
- package/dist/_virtual/once.js +2 -0
- package/dist/_virtual/path.js +4 -0
- package/dist/_virtual/progress.js +2 -0
- package/dist/_virtual/progressPart.js +2 -0
- package/dist/_virtual/protocol.callHierarchy.js +2 -0
- package/dist/_virtual/protocol.colorProvider.js +2 -0
- package/dist/_virtual/protocol.configuration.js +2 -0
- package/dist/_virtual/protocol.declaration.js +2 -0
- package/dist/_virtual/protocol.diagnostic.js +2 -0
- package/dist/_virtual/protocol.fileOperations.js +2 -0
- package/dist/_virtual/protocol.foldingRange.js +2 -0
- package/dist/_virtual/protocol.implementation.js +2 -0
- package/dist/_virtual/protocol.inlayHint.js +2 -0
- package/dist/_virtual/protocol.inlineValue.js +2 -0
- package/dist/_virtual/protocol.js +2 -0
- package/dist/_virtual/protocol.linkedEditingRange.js +2 -0
- package/dist/_virtual/protocol.moniker.js +2 -0
- package/dist/_virtual/protocol.notebook.js +2 -0
- package/dist/_virtual/protocol.progress.js +2 -0
- package/dist/_virtual/protocol.selectionRange.js +2 -0
- package/dist/_virtual/protocol.semanticTokens.js +2 -0
- package/dist/_virtual/protocol.showDocument.js +2 -0
- package/dist/_virtual/protocol.typeDefinition.js +2 -0
- package/dist/_virtual/protocol.typeHierarchy.js +2 -0
- package/dist/_virtual/protocol.workspaceFolder.js +2 -0
- package/dist/_virtual/protocolCallHierarchyItem.js +2 -0
- package/dist/_virtual/protocolCodeAction.js +2 -0
- package/dist/_virtual/protocolCodeLens.js +2 -0
- package/dist/_virtual/protocolCompletionItem.js +2 -0
- package/dist/_virtual/protocolConverter.js +2 -0
- package/dist/_virtual/protocolDiagnostic.js +2 -0
- package/dist/_virtual/protocolDocumentLink.js +2 -0
- package/dist/_virtual/protocolInlayHint.js +2 -0
- package/dist/_virtual/protocolTypeHierarchyItem.js +2 -0
- package/dist/_virtual/protocolWorkspaceSymbol.js +2 -0
- package/dist/_virtual/ral.js +2 -0
- package/dist/_virtual/reference.js +2 -0
- package/dist/_virtual/rename.js +2 -0
- package/dist/_virtual/ril.js +2 -0
- package/dist/_virtual/selectionRange.js +2 -0
- package/dist/_virtual/semanticTokens.js +2 -0
- package/dist/_virtual/semaphore.js +2 -0
- package/dist/_virtual/sharedArrayCancellation.js +2 -0
- package/dist/_virtual/signatureHelp.js +2 -0
- package/dist/_virtual/textSynchronization.js +2 -0
- package/dist/_virtual/typeDefinition.js +2 -0
- package/dist/_virtual/typeHierarchy.js +2 -0
- package/dist/_virtual/uuid.js +2 -0
- package/dist/_virtual/workspaceFolder.js +2 -0
- package/dist/_virtual/workspaceSymbol.js +2 -0
- package/dist/extensions/java/commands.js +74 -0
- package/dist/extensions/java/extension.js +13 -0
- package/dist/extensions/java/inlayHintsProvider.js +59 -0
- package/dist/extensions/java/protocol.js +69 -0
- package/dist/{java.js → extensions/java/sourceAction.js} +6 -246
- package/dist/index.d.ts +2908 -2814
- package/dist/index.js +5 -1
- package/dist/node_modules/balanced-match/index.js +52 -0
- package/dist/node_modules/delay/index.js +46 -0
- package/dist/node_modules/monaco-languageclient/lib/monaco-language-client.js +127 -0
- package/dist/node_modules/once/once.js +44 -0
- package/dist/node_modules/tslib/tslib.es6.js +14 -0
- package/dist/node_modules/vscode-jsonrpc/browser.js +4 -0
- package/dist/node_modules/vscode-jsonrpc/lib/browser/main.js +77 -0
- package/dist/node_modules/vscode-jsonrpc/lib/browser/ril.js +153 -0
- package/dist/node_modules/vscode-jsonrpc/lib/common/api.js +96 -0
- package/dist/node_modules/vscode-jsonrpc/lib/common/cancellation.js +97 -0
- package/dist/node_modules/vscode-jsonrpc/lib/common/connection.js +1180 -0
- package/dist/node_modules/vscode-jsonrpc/lib/common/disposable.js +20 -0
- package/dist/node_modules/vscode-jsonrpc/lib/common/events.js +122 -0
- package/dist/node_modules/vscode-jsonrpc/lib/common/is.js +38 -0
- package/dist/node_modules/vscode-jsonrpc/lib/common/linkedMap.js +388 -0
- package/dist/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js +149 -0
- package/dist/node_modules/vscode-jsonrpc/lib/common/messageReader.js +194 -0
- package/dist/node_modules/vscode-jsonrpc/lib/common/messageWriter.js +123 -0
- package/dist/node_modules/vscode-jsonrpc/lib/common/messages.js +241 -0
- package/dist/node_modules/vscode-jsonrpc/lib/common/ral.js +26 -0
- package/dist/node_modules/vscode-jsonrpc/lib/common/semaphore.js +72 -0
- package/dist/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js +80 -0
- package/dist/node_modules/vscode-languageclient/lib/browser/main.js +49 -0
- package/dist/node_modules/vscode-languageclient/lib/common/api.js +51 -0
- package/dist/node_modules/vscode-languageclient/lib/common/callHierarchy.js +98 -0
- package/dist/node_modules/vscode-languageclient/lib/common/client.js +1527 -0
- package/dist/node_modules/vscode-languageclient/lib/common/codeAction.js +92 -0
- package/dist/node_modules/vscode-languageclient/lib/common/codeConverter.js +881 -0
- package/dist/node_modules/vscode-languageclient/lib/common/codeLens.js +84 -0
- package/dist/node_modules/vscode-languageclient/lib/common/colorProvider.js +77 -0
- package/dist/node_modules/vscode-languageclient/lib/common/completion.js +105 -0
- package/dist/node_modules/vscode-languageclient/lib/common/configuration.js +214 -0
- package/dist/node_modules/vscode-languageclient/lib/common/declaration.js +59 -0
- package/dist/node_modules/vscode-languageclient/lib/common/definition.js +62 -0
- package/dist/node_modules/vscode-languageclient/lib/common/diagnostic.js +839 -0
- package/dist/node_modules/vscode-languageclient/lib/common/documentHighlight.js +57 -0
- package/dist/node_modules/vscode-languageclient/lib/common/documentLink.js +74 -0
- package/dist/node_modules/vscode-languageclient/lib/common/documentSymbol.js +82 -0
- package/dist/node_modules/vscode-languageclient/lib/common/executeCommand.js +83 -0
- package/dist/node_modules/vscode-languageclient/lib/common/features.js +310 -0
- package/dist/node_modules/vscode-languageclient/lib/common/fileOperations.js +319 -0
- package/dist/node_modules/vscode-languageclient/lib/common/fileSystemWatcher.js +104 -0
- package/dist/node_modules/vscode-languageclient/lib/common/foldingRange.js +66 -0
- package/dist/node_modules/vscode-languageclient/lib/common/formatting.js +165 -0
- package/dist/node_modules/vscode-languageclient/lib/common/hover.js +62 -0
- package/dist/node_modules/vscode-languageclient/lib/common/implementation.js +59 -0
- package/dist/node_modules/vscode-languageclient/lib/common/inlayHint.js +94 -0
- package/dist/node_modules/vscode-languageclient/lib/common/inlineValue.js +73 -0
- package/dist/node_modules/vscode-languageclient/lib/common/linkedEditingRange.js +58 -0
- package/dist/node_modules/vscode-languageclient/lib/common/notebook.js +858 -0
- package/dist/node_modules/vscode-languageclient/lib/common/progress.js +51 -0
- package/dist/node_modules/vscode-languageclient/lib/common/progressPart.js +107 -0
- package/dist/node_modules/vscode-languageclient/lib/common/protocolCallHierarchyItem.js +15 -0
- package/dist/node_modules/vscode-languageclient/lib/common/protocolCodeAction.js +13 -0
- package/dist/node_modules/vscode-languageclient/lib/common/protocolCodeLens.js +12 -0
- package/dist/node_modules/vscode-languageclient/lib/common/protocolCompletionItem.js +12 -0
- package/dist/node_modules/vscode-languageclient/lib/common/protocolConverter.js +1129 -0
- package/dist/node_modules/vscode-languageclient/lib/common/protocolDiagnostic.js +27 -0
- package/dist/node_modules/vscode-languageclient/lib/common/protocolDocumentLink.js +12 -0
- package/dist/node_modules/vscode-languageclient/lib/common/protocolInlayHint.js +12 -0
- package/dist/node_modules/vscode-languageclient/lib/common/protocolTypeHierarchyItem.js +15 -0
- package/dist/node_modules/vscode-languageclient/lib/common/protocolWorkspaceSymbol.js +17 -0
- package/dist/node_modules/vscode-languageclient/lib/common/reference.js +60 -0
- package/dist/node_modules/vscode-languageclient/lib/common/rename.js +112 -0
- package/dist/node_modules/vscode-languageclient/lib/common/selectionRange.js +62 -0
- package/dist/node_modules/vscode-languageclient/lib/common/semanticTokens.js +144 -0
- package/dist/node_modules/vscode-languageclient/lib/common/signatureHelp.js +78 -0
- package/dist/node_modules/vscode-languageclient/lib/common/textSynchronization.js +422 -0
- package/dist/node_modules/vscode-languageclient/lib/common/typeDefinition.js +60 -0
- package/dist/node_modules/vscode-languageclient/lib/common/typeHierarchy.js +97 -0
- package/dist/node_modules/vscode-languageclient/lib/common/utils/async.js +269 -0
- package/dist/node_modules/vscode-languageclient/lib/common/utils/is.js +54 -0
- package/dist/node_modules/vscode-languageclient/lib/common/utils/uuid.js +51 -0
- package/dist/node_modules/vscode-languageclient/lib/common/workspaceFolder.js +154 -0
- package/dist/node_modules/vscode-languageclient/lib/common/workspaceSymbol.js +87 -0
- package/dist/node_modules/vscode-languageclient/node_modules/brace-expansion/index.js +160 -0
- package/dist/node_modules/vscode-languageclient/node_modules/minimatch/lib/path.js +2 -0
- package/dist/node_modules/vscode-languageclient/node_modules/minimatch/minimatch.js +567 -0
- package/dist/node_modules/vscode-languageserver-protocol/browser.js +4 -0
- package/dist/node_modules/vscode-languageserver-protocol/lib/browser/main.js +30 -0
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/api.js +43 -0
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/connection.js +14 -0
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/messages.js +43 -0
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js +23 -0
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js +18 -0
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js +13 -0
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js +13 -0
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js +42 -0
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js +42 -0
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js +13 -0
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js +13 -0
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js +23 -0
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js +18 -0
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.js +494 -0
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js +13 -0
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js +25 -0
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js +185 -0
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js +28 -0
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js +13 -0
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js +39 -0
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js +13 -0
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js +13 -0
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js +23 -0
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js +18 -0
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js +40 -0
- package/dist/node_modules/vscode-languageserver-types/lib/esm/main.js +1583 -0
- package/dist/node_modules/wrappy/wrappy.js +25 -0
- package/dist/src/createLanguageClient.js +107 -0
- package/dist/src/customRequests.js +21 -0
- package/dist/src/extensionConfiguration.js +5 -0
- package/dist/{cobol.js → src/extensions/cobol.js} +3 -2
- package/dist/{csharp.js → src/extensions/csharp.js} +3 -2
- package/dist/src/extensions/java.js +36 -0
- package/dist/{tools.js → src/extensions/tools.js} +2 -2
- package/dist/src/extensions.js +170 -0
- package/dist/src/infrastructure.js +68 -0
- package/dist/src/languageClient.js +308 -0
- package/dist/src/languageClientOptions.js +17 -0
- package/dist/src/services.js +8 -0
- package/dist/src/staticOptions.js +441 -0
- package/package.json +50 -50
- package/stats.html +90 -1429
- package/dist/index2.js +0 -17349
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { __exports as messages } from '../../../../_virtual/messages2.js';
|
|
2
|
+
import { __require as requireIs } from './is.js';
|
|
3
|
+
var hasRequiredMessages;
|
|
4
|
+
function requireMessages () {
|
|
5
|
+
if (hasRequiredMessages) return messages;
|
|
6
|
+
hasRequiredMessages = 1;
|
|
7
|
+
(function (exports) {
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.Message = exports.NotificationType9 = exports.NotificationType8 = exports.NotificationType7 = exports.NotificationType6 = exports.NotificationType5 = exports.NotificationType4 = exports.NotificationType3 = exports.NotificationType2 = exports.NotificationType1 = exports.NotificationType0 = exports.NotificationType = exports.RequestType9 = exports.RequestType8 = exports.RequestType7 = exports.RequestType6 = exports.RequestType5 = exports.RequestType4 = exports.RequestType3 = exports.RequestType2 = exports.RequestType1 = exports.RequestType = exports.RequestType0 = exports.AbstractMessageSignature = exports.ParameterStructures = exports.ResponseError = exports.ErrorCodes = void 0;
|
|
10
|
+
const is = requireIs();
|
|
11
|
+
var ErrorCodes;
|
|
12
|
+
(function (ErrorCodes) {
|
|
13
|
+
ErrorCodes.ParseError = -32700;
|
|
14
|
+
ErrorCodes.InvalidRequest = -32600;
|
|
15
|
+
ErrorCodes.MethodNotFound = -32601;
|
|
16
|
+
ErrorCodes.InvalidParams = -32602;
|
|
17
|
+
ErrorCodes.InternalError = -32603;
|
|
18
|
+
ErrorCodes.jsonrpcReservedErrorRangeStart = -32099;
|
|
19
|
+
ErrorCodes.serverErrorStart = -32099;
|
|
20
|
+
ErrorCodes.MessageWriteError = -32099;
|
|
21
|
+
ErrorCodes.MessageReadError = -32098;
|
|
22
|
+
ErrorCodes.PendingResponseRejected = -32097;
|
|
23
|
+
ErrorCodes.ConnectionInactive = -32096;
|
|
24
|
+
ErrorCodes.ServerNotInitialized = -32002;
|
|
25
|
+
ErrorCodes.UnknownErrorCode = -32001;
|
|
26
|
+
ErrorCodes.jsonrpcReservedErrorRangeEnd = -32000;
|
|
27
|
+
ErrorCodes.serverErrorEnd = -32000;
|
|
28
|
+
})(ErrorCodes = exports.ErrorCodes || (exports.ErrorCodes = {}));
|
|
29
|
+
class ResponseError extends Error {
|
|
30
|
+
constructor(code, message, data) {
|
|
31
|
+
super(message);
|
|
32
|
+
this.code = is.number(code) ? code : ErrorCodes.UnknownErrorCode;
|
|
33
|
+
this.data = data;
|
|
34
|
+
Object.setPrototypeOf(this, ResponseError.prototype);
|
|
35
|
+
}
|
|
36
|
+
toJson() {
|
|
37
|
+
const result = {
|
|
38
|
+
code: this.code,
|
|
39
|
+
message: this.message
|
|
40
|
+
};
|
|
41
|
+
if (this.data !== undefined) {
|
|
42
|
+
result.data = this.data;
|
|
43
|
+
}
|
|
44
|
+
return result;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.ResponseError = ResponseError;
|
|
48
|
+
class ParameterStructures {
|
|
49
|
+
constructor(kind) {
|
|
50
|
+
this.kind = kind;
|
|
51
|
+
}
|
|
52
|
+
static is(value) {
|
|
53
|
+
return value === ParameterStructures.auto || value === ParameterStructures.byName || value === ParameterStructures.byPosition;
|
|
54
|
+
}
|
|
55
|
+
toString() {
|
|
56
|
+
return this.kind;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.ParameterStructures = ParameterStructures;
|
|
60
|
+
ParameterStructures.auto = new ParameterStructures('auto');
|
|
61
|
+
ParameterStructures.byPosition = new ParameterStructures('byPosition');
|
|
62
|
+
ParameterStructures.byName = new ParameterStructures('byName');
|
|
63
|
+
class AbstractMessageSignature {
|
|
64
|
+
constructor(method, numberOfParams) {
|
|
65
|
+
this.method = method;
|
|
66
|
+
this.numberOfParams = numberOfParams;
|
|
67
|
+
}
|
|
68
|
+
get parameterStructures() {
|
|
69
|
+
return ParameterStructures.auto;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
exports.AbstractMessageSignature = AbstractMessageSignature;
|
|
73
|
+
class RequestType0 extends AbstractMessageSignature {
|
|
74
|
+
constructor(method) {
|
|
75
|
+
super(method, 0);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
exports.RequestType0 = RequestType0;
|
|
79
|
+
class RequestType extends AbstractMessageSignature {
|
|
80
|
+
constructor(method, _parameterStructures = ParameterStructures.auto) {
|
|
81
|
+
super(method, 1);
|
|
82
|
+
this._parameterStructures = _parameterStructures;
|
|
83
|
+
}
|
|
84
|
+
get parameterStructures() {
|
|
85
|
+
return this._parameterStructures;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
exports.RequestType = RequestType;
|
|
89
|
+
class RequestType1 extends AbstractMessageSignature {
|
|
90
|
+
constructor(method, _parameterStructures = ParameterStructures.auto) {
|
|
91
|
+
super(method, 1);
|
|
92
|
+
this._parameterStructures = _parameterStructures;
|
|
93
|
+
}
|
|
94
|
+
get parameterStructures() {
|
|
95
|
+
return this._parameterStructures;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
exports.RequestType1 = RequestType1;
|
|
99
|
+
class RequestType2 extends AbstractMessageSignature {
|
|
100
|
+
constructor(method) {
|
|
101
|
+
super(method, 2);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
exports.RequestType2 = RequestType2;
|
|
105
|
+
class RequestType3 extends AbstractMessageSignature {
|
|
106
|
+
constructor(method) {
|
|
107
|
+
super(method, 3);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
exports.RequestType3 = RequestType3;
|
|
111
|
+
class RequestType4 extends AbstractMessageSignature {
|
|
112
|
+
constructor(method) {
|
|
113
|
+
super(method, 4);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
exports.RequestType4 = RequestType4;
|
|
117
|
+
class RequestType5 extends AbstractMessageSignature {
|
|
118
|
+
constructor(method) {
|
|
119
|
+
super(method, 5);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
exports.RequestType5 = RequestType5;
|
|
123
|
+
class RequestType6 extends AbstractMessageSignature {
|
|
124
|
+
constructor(method) {
|
|
125
|
+
super(method, 6);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
exports.RequestType6 = RequestType6;
|
|
129
|
+
class RequestType7 extends AbstractMessageSignature {
|
|
130
|
+
constructor(method) {
|
|
131
|
+
super(method, 7);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
exports.RequestType7 = RequestType7;
|
|
135
|
+
class RequestType8 extends AbstractMessageSignature {
|
|
136
|
+
constructor(method) {
|
|
137
|
+
super(method, 8);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
exports.RequestType8 = RequestType8;
|
|
141
|
+
class RequestType9 extends AbstractMessageSignature {
|
|
142
|
+
constructor(method) {
|
|
143
|
+
super(method, 9);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
exports.RequestType9 = RequestType9;
|
|
147
|
+
class NotificationType extends AbstractMessageSignature {
|
|
148
|
+
constructor(method, _parameterStructures = ParameterStructures.auto) {
|
|
149
|
+
super(method, 1);
|
|
150
|
+
this._parameterStructures = _parameterStructures;
|
|
151
|
+
}
|
|
152
|
+
get parameterStructures() {
|
|
153
|
+
return this._parameterStructures;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
exports.NotificationType = NotificationType;
|
|
157
|
+
class NotificationType0 extends AbstractMessageSignature {
|
|
158
|
+
constructor(method) {
|
|
159
|
+
super(method, 0);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
exports.NotificationType0 = NotificationType0;
|
|
163
|
+
class NotificationType1 extends AbstractMessageSignature {
|
|
164
|
+
constructor(method, _parameterStructures = ParameterStructures.auto) {
|
|
165
|
+
super(method, 1);
|
|
166
|
+
this._parameterStructures = _parameterStructures;
|
|
167
|
+
}
|
|
168
|
+
get parameterStructures() {
|
|
169
|
+
return this._parameterStructures;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
exports.NotificationType1 = NotificationType1;
|
|
173
|
+
class NotificationType2 extends AbstractMessageSignature {
|
|
174
|
+
constructor(method) {
|
|
175
|
+
super(method, 2);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
exports.NotificationType2 = NotificationType2;
|
|
179
|
+
class NotificationType3 extends AbstractMessageSignature {
|
|
180
|
+
constructor(method) {
|
|
181
|
+
super(method, 3);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
exports.NotificationType3 = NotificationType3;
|
|
185
|
+
class NotificationType4 extends AbstractMessageSignature {
|
|
186
|
+
constructor(method) {
|
|
187
|
+
super(method, 4);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
exports.NotificationType4 = NotificationType4;
|
|
191
|
+
class NotificationType5 extends AbstractMessageSignature {
|
|
192
|
+
constructor(method) {
|
|
193
|
+
super(method, 5);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
exports.NotificationType5 = NotificationType5;
|
|
197
|
+
class NotificationType6 extends AbstractMessageSignature {
|
|
198
|
+
constructor(method) {
|
|
199
|
+
super(method, 6);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
exports.NotificationType6 = NotificationType6;
|
|
203
|
+
class NotificationType7 extends AbstractMessageSignature {
|
|
204
|
+
constructor(method) {
|
|
205
|
+
super(method, 7);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
exports.NotificationType7 = NotificationType7;
|
|
209
|
+
class NotificationType8 extends AbstractMessageSignature {
|
|
210
|
+
constructor(method) {
|
|
211
|
+
super(method, 8);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
exports.NotificationType8 = NotificationType8;
|
|
215
|
+
class NotificationType9 extends AbstractMessageSignature {
|
|
216
|
+
constructor(method) {
|
|
217
|
+
super(method, 9);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
exports.NotificationType9 = NotificationType9;
|
|
221
|
+
(function (Message) {
|
|
222
|
+
function isRequest(message) {
|
|
223
|
+
const candidate = message;
|
|
224
|
+
return candidate && is.string(candidate.method) && (is.string(candidate.id) || is.number(candidate.id));
|
|
225
|
+
}
|
|
226
|
+
Message.isRequest = isRequest;
|
|
227
|
+
function isNotification(message) {
|
|
228
|
+
const candidate = message;
|
|
229
|
+
return candidate && is.string(candidate.method) && message.id === void 0;
|
|
230
|
+
}
|
|
231
|
+
Message.isNotification = isNotification;
|
|
232
|
+
function isResponse(message) {
|
|
233
|
+
const candidate = message;
|
|
234
|
+
return candidate && (candidate.result !== void 0 || !!candidate.error) && (is.string(candidate.id) || is.number(candidate.id) || candidate.id === null);
|
|
235
|
+
}
|
|
236
|
+
Message.isResponse = isResponse;
|
|
237
|
+
})(exports.Message || (exports.Message = {}));
|
|
238
|
+
} (messages));
|
|
239
|
+
return messages;
|
|
240
|
+
}
|
|
241
|
+
export { requireMessages as __require };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { __exports as ral } from '../../../../_virtual/ral.js';
|
|
2
|
+
var hasRequiredRal;
|
|
3
|
+
function requireRal () {
|
|
4
|
+
if (hasRequiredRal) return ral;
|
|
5
|
+
hasRequiredRal = 1;
|
|
6
|
+
Object.defineProperty(ral, "__esModule", { value: true });
|
|
7
|
+
let _ral;
|
|
8
|
+
function RAL() {
|
|
9
|
+
if (_ral === undefined) {
|
|
10
|
+
throw new Error(`No runtime abstraction layer installed`);
|
|
11
|
+
}
|
|
12
|
+
return _ral;
|
|
13
|
+
}
|
|
14
|
+
(function (RAL) {
|
|
15
|
+
function install(ral) {
|
|
16
|
+
if (ral === undefined) {
|
|
17
|
+
throw new Error(`No runtime abstraction layer provided`);
|
|
18
|
+
}
|
|
19
|
+
_ral = ral;
|
|
20
|
+
}
|
|
21
|
+
RAL.install = install;
|
|
22
|
+
})(RAL || (RAL = {}));
|
|
23
|
+
ral.default = RAL;
|
|
24
|
+
return ral;
|
|
25
|
+
}
|
|
26
|
+
export { requireRal as __require };
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { __exports as semaphore } from '../../../../_virtual/semaphore.js';
|
|
2
|
+
import { __require as requireRal } from './ral.js';
|
|
3
|
+
var hasRequiredSemaphore;
|
|
4
|
+
function requireSemaphore () {
|
|
5
|
+
if (hasRequiredSemaphore) return semaphore;
|
|
6
|
+
hasRequiredSemaphore = 1;
|
|
7
|
+
Object.defineProperty(semaphore, "__esModule", { value: true });
|
|
8
|
+
semaphore.Semaphore = void 0;
|
|
9
|
+
const ral_1 = requireRal();
|
|
10
|
+
class Semaphore {
|
|
11
|
+
constructor(capacity = 1) {
|
|
12
|
+
if (capacity <= 0) {
|
|
13
|
+
throw new Error('Capacity must be greater than 0');
|
|
14
|
+
}
|
|
15
|
+
this._capacity = capacity;
|
|
16
|
+
this._active = 0;
|
|
17
|
+
this._waiting = [];
|
|
18
|
+
}
|
|
19
|
+
lock(thunk) {
|
|
20
|
+
return new Promise((resolve, reject) => {
|
|
21
|
+
this._waiting.push({ thunk, resolve, reject });
|
|
22
|
+
this.runNext();
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
get active() {
|
|
26
|
+
return this._active;
|
|
27
|
+
}
|
|
28
|
+
runNext() {
|
|
29
|
+
if (this._waiting.length === 0 || this._active === this._capacity) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
(0, ral_1.default)().timer.setImmediate(() => this.doRunNext());
|
|
33
|
+
}
|
|
34
|
+
doRunNext() {
|
|
35
|
+
if (this._waiting.length === 0 || this._active === this._capacity) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const next = this._waiting.shift();
|
|
39
|
+
this._active++;
|
|
40
|
+
if (this._active > this._capacity) {
|
|
41
|
+
throw new Error(`To many thunks active`);
|
|
42
|
+
}
|
|
43
|
+
try {
|
|
44
|
+
const result = next.thunk();
|
|
45
|
+
if (result instanceof Promise) {
|
|
46
|
+
result.then((value) => {
|
|
47
|
+
this._active--;
|
|
48
|
+
next.resolve(value);
|
|
49
|
+
this.runNext();
|
|
50
|
+
}, (err) => {
|
|
51
|
+
this._active--;
|
|
52
|
+
next.reject(err);
|
|
53
|
+
this.runNext();
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
this._active--;
|
|
58
|
+
next.resolve(result);
|
|
59
|
+
this.runNext();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
catch (err) {
|
|
63
|
+
this._active--;
|
|
64
|
+
next.reject(err);
|
|
65
|
+
this.runNext();
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
semaphore.Semaphore = Semaphore;
|
|
70
|
+
return semaphore;
|
|
71
|
+
}
|
|
72
|
+
export { requireSemaphore as __require };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { __exports as sharedArrayCancellation } from '../../../../_virtual/sharedArrayCancellation.js';
|
|
2
|
+
import { __require as requireCancellation } from './cancellation.js';
|
|
3
|
+
var hasRequiredSharedArrayCancellation;
|
|
4
|
+
function requireSharedArrayCancellation () {
|
|
5
|
+
if (hasRequiredSharedArrayCancellation) return sharedArrayCancellation;
|
|
6
|
+
hasRequiredSharedArrayCancellation = 1;
|
|
7
|
+
Object.defineProperty(sharedArrayCancellation, "__esModule", { value: true });
|
|
8
|
+
sharedArrayCancellation.SharedArrayReceiverStrategy = sharedArrayCancellation.SharedArraySenderStrategy = void 0;
|
|
9
|
+
const cancellation_1 = requireCancellation();
|
|
10
|
+
var CancellationState;
|
|
11
|
+
(function (CancellationState) {
|
|
12
|
+
CancellationState.Continue = 0;
|
|
13
|
+
CancellationState.Cancelled = 1;
|
|
14
|
+
})(CancellationState || (CancellationState = {}));
|
|
15
|
+
class SharedArraySenderStrategy {
|
|
16
|
+
constructor() {
|
|
17
|
+
this.buffers = new Map();
|
|
18
|
+
}
|
|
19
|
+
enableCancellation(request) {
|
|
20
|
+
if (request.id === null) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const buffer = new SharedArrayBuffer(4);
|
|
24
|
+
const data = new Int32Array(buffer, 0, 1);
|
|
25
|
+
data[0] = CancellationState.Continue;
|
|
26
|
+
this.buffers.set(request.id, buffer);
|
|
27
|
+
request.$cancellationData = buffer;
|
|
28
|
+
}
|
|
29
|
+
async sendCancellation(_conn, id) {
|
|
30
|
+
const buffer = this.buffers.get(id);
|
|
31
|
+
if (buffer === undefined) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const data = new Int32Array(buffer, 0, 1);
|
|
35
|
+
Atomics.store(data, 0, CancellationState.Cancelled);
|
|
36
|
+
}
|
|
37
|
+
cleanup(id) {
|
|
38
|
+
this.buffers.delete(id);
|
|
39
|
+
}
|
|
40
|
+
dispose() {
|
|
41
|
+
this.buffers.clear();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
sharedArrayCancellation.SharedArraySenderStrategy = SharedArraySenderStrategy;
|
|
45
|
+
class SharedArrayBufferCancellationToken {
|
|
46
|
+
constructor(buffer) {
|
|
47
|
+
this.data = new Int32Array(buffer, 0, 1);
|
|
48
|
+
}
|
|
49
|
+
get isCancellationRequested() {
|
|
50
|
+
return Atomics.load(this.data, 0) === CancellationState.Cancelled;
|
|
51
|
+
}
|
|
52
|
+
get onCancellationRequested() {
|
|
53
|
+
throw new Error(`Cancellation over SharedArrayBuffer doesn't support cancellation events`);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
class SharedArrayBufferCancellationTokenSource {
|
|
57
|
+
constructor(buffer) {
|
|
58
|
+
this.token = new SharedArrayBufferCancellationToken(buffer);
|
|
59
|
+
}
|
|
60
|
+
cancel() {
|
|
61
|
+
}
|
|
62
|
+
dispose() {
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
class SharedArrayReceiverStrategy {
|
|
66
|
+
constructor() {
|
|
67
|
+
this.kind = 'request';
|
|
68
|
+
}
|
|
69
|
+
createCancellationTokenSource(request) {
|
|
70
|
+
const buffer = request.$cancellationData;
|
|
71
|
+
if (buffer === undefined) {
|
|
72
|
+
return new cancellation_1.CancellationTokenSource();
|
|
73
|
+
}
|
|
74
|
+
return new SharedArrayBufferCancellationTokenSource(buffer);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
sharedArrayCancellation.SharedArrayReceiverStrategy = SharedArrayReceiverStrategy;
|
|
78
|
+
return sharedArrayCancellation;
|
|
79
|
+
}
|
|
80
|
+
export { requireSharedArrayCancellation as __require };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { commonjsGlobal } from '../../../../_virtual/_commonjsHelpers.js';
|
|
2
|
+
import { __exports as main } from '../../../../_virtual/main2.js';
|
|
3
|
+
import { b as browser } from '../../../vscode-languageserver-protocol/browser.js';
|
|
4
|
+
import { __exports as api } from '../../../../_virtual/api.js';
|
|
5
|
+
import '../common/api.js';
|
|
6
|
+
(function (exports) {
|
|
7
|
+
var __createBinding = commonjsGlobal && commonjsGlobal.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
8
|
+
if (k2 === undefined) k2 = k;
|
|
9
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
10
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
11
|
+
desc = {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () {
|
|
14
|
+
return m[k];
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
Object.defineProperty(o, k2, desc);
|
|
19
|
+
} : function (o, m, k, k2) {
|
|
20
|
+
if (k2 === undefined) k2 = k;
|
|
21
|
+
o[k2] = m[k];
|
|
22
|
+
});
|
|
23
|
+
var __exportStar = commonjsGlobal && commonjsGlobal.__exportStar || function (m, exports) {
|
|
24
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", {
|
|
27
|
+
value: true
|
|
28
|
+
});
|
|
29
|
+
exports.LanguageClient = void 0;
|
|
30
|
+
const api_1 = api;
|
|
31
|
+
const browser_1 = browser;
|
|
32
|
+
__exportStar(browser, exports);
|
|
33
|
+
__exportStar(api, exports);
|
|
34
|
+
class LanguageClient extends api_1.BaseLanguageClient {
|
|
35
|
+
constructor(id, name, clientOptions, worker) {
|
|
36
|
+
super(id, name, clientOptions);
|
|
37
|
+
this.worker = worker;
|
|
38
|
+
}
|
|
39
|
+
createMessageTransports(_encoding) {
|
|
40
|
+
const reader = new browser_1.BrowserMessageReader(this.worker);
|
|
41
|
+
const writer = new browser_1.BrowserMessageWriter(this.worker);
|
|
42
|
+
return Promise.resolve({
|
|
43
|
+
reader,
|
|
44
|
+
writer
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.LanguageClient = LanguageClient;
|
|
49
|
+
})(main);
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { commonjsGlobal } from '../../../../_virtual/_commonjsHelpers.js';
|
|
2
|
+
import { __exports as api } from '../../../../_virtual/api.js';
|
|
3
|
+
import { __exports as main } from '../../../../_virtual/main.js';
|
|
4
|
+
import '../../../vscode-languageserver-protocol/lib/browser/main.js';
|
|
5
|
+
import { __exports as features } from '../../../../_virtual/features.js';
|
|
6
|
+
import './features.js';
|
|
7
|
+
import { __exports as client } from '../../../../_virtual/client.js';
|
|
8
|
+
import './client.js';
|
|
9
|
+
import { __exports as diagnostic } from '../../../../_virtual/diagnostic.js';
|
|
10
|
+
import './diagnostic.js';
|
|
11
|
+
(function (exports) {
|
|
12
|
+
var __createBinding = commonjsGlobal && commonjsGlobal.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
15
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
16
|
+
desc = {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () {
|
|
19
|
+
return m[k];
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
} : function (o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
});
|
|
28
|
+
var __exportStar = commonjsGlobal && commonjsGlobal.__exportStar || function (m, exports) {
|
|
29
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
30
|
+
};
|
|
31
|
+
Object.defineProperty(exports, "__esModule", {
|
|
32
|
+
value: true
|
|
33
|
+
});
|
|
34
|
+
exports.DiagnosticPullMode = exports.vsdiag = void 0;
|
|
35
|
+
__exportStar(main, exports);
|
|
36
|
+
__exportStar(features, exports);
|
|
37
|
+
var diagnostic_1 = diagnostic;
|
|
38
|
+
Object.defineProperty(exports, "vsdiag", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function () {
|
|
41
|
+
return diagnostic_1.vsdiag;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
Object.defineProperty(exports, "DiagnosticPullMode", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function () {
|
|
47
|
+
return diagnostic_1.DiagnosticPullMode;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
__exportStar(client, exports);
|
|
51
|
+
})(api);
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { __exports as callHierarchy } from '../../../../_virtual/callHierarchy.js';
|
|
2
|
+
import require$$0 from '../../../../_virtual/_vscode.js';
|
|
3
|
+
import { __exports as main } from '../../../../_virtual/main.js';
|
|
4
|
+
import '../../../vscode-languageserver-protocol/lib/browser/main.js';
|
|
5
|
+
import { __exports as features } from '../../../../_virtual/features.js';
|
|
6
|
+
import './features.js';
|
|
7
|
+
Object.defineProperty(callHierarchy, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
var CallHierarchyFeature_1 = callHierarchy.CallHierarchyFeature = void 0;
|
|
11
|
+
const vscode_1 = require$$0;
|
|
12
|
+
const vscode_languageserver_protocol_1 = main;
|
|
13
|
+
const features_1 = features;
|
|
14
|
+
class CallHierarchyProvider {
|
|
15
|
+
constructor(client) {
|
|
16
|
+
this.client = client;
|
|
17
|
+
this.middleware = client.middleware;
|
|
18
|
+
}
|
|
19
|
+
prepareCallHierarchy(document, position, token) {
|
|
20
|
+
const client = this.client;
|
|
21
|
+
const middleware = this.middleware;
|
|
22
|
+
const prepareCallHierarchy = (document, position, token) => {
|
|
23
|
+
const params = client.code2ProtocolConverter.asTextDocumentPositionParams(document, position);
|
|
24
|
+
return client.sendRequest(vscode_languageserver_protocol_1.CallHierarchyPrepareRequest.type, params, token).then(result => {
|
|
25
|
+
if (token.isCancellationRequested) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
return client.protocol2CodeConverter.asCallHierarchyItems(result, token);
|
|
29
|
+
}, error => {
|
|
30
|
+
return client.handleFailedRequest(vscode_languageserver_protocol_1.CallHierarchyPrepareRequest.type, token, error, null);
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
return middleware.prepareCallHierarchy ? middleware.prepareCallHierarchy(document, position, token, prepareCallHierarchy) : prepareCallHierarchy(document, position, token);
|
|
34
|
+
}
|
|
35
|
+
provideCallHierarchyIncomingCalls(item, token) {
|
|
36
|
+
const client = this.client;
|
|
37
|
+
const middleware = this.middleware;
|
|
38
|
+
const provideCallHierarchyIncomingCalls = (item, token) => {
|
|
39
|
+
const params = {
|
|
40
|
+
item: client.code2ProtocolConverter.asCallHierarchyItem(item)
|
|
41
|
+
};
|
|
42
|
+
return client.sendRequest(vscode_languageserver_protocol_1.CallHierarchyIncomingCallsRequest.type, params, token).then(result => {
|
|
43
|
+
if (token.isCancellationRequested) {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
return client.protocol2CodeConverter.asCallHierarchyIncomingCalls(result, token);
|
|
47
|
+
}, error => {
|
|
48
|
+
return client.handleFailedRequest(vscode_languageserver_protocol_1.CallHierarchyIncomingCallsRequest.type, token, error, null);
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
return middleware.provideCallHierarchyIncomingCalls ? middleware.provideCallHierarchyIncomingCalls(item, token, provideCallHierarchyIncomingCalls) : provideCallHierarchyIncomingCalls(item, token);
|
|
52
|
+
}
|
|
53
|
+
provideCallHierarchyOutgoingCalls(item, token) {
|
|
54
|
+
const client = this.client;
|
|
55
|
+
const middleware = this.middleware;
|
|
56
|
+
const provideCallHierarchyOutgoingCalls = (item, token) => {
|
|
57
|
+
const params = {
|
|
58
|
+
item: client.code2ProtocolConverter.asCallHierarchyItem(item)
|
|
59
|
+
};
|
|
60
|
+
return client.sendRequest(vscode_languageserver_protocol_1.CallHierarchyOutgoingCallsRequest.type, params, token).then(result => {
|
|
61
|
+
if (token.isCancellationRequested) {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
return client.protocol2CodeConverter.asCallHierarchyOutgoingCalls(result, token);
|
|
65
|
+
}, error => {
|
|
66
|
+
return client.handleFailedRequest(vscode_languageserver_protocol_1.CallHierarchyOutgoingCallsRequest.type, token, error, null);
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
return middleware.provideCallHierarchyOutgoingCalls ? middleware.provideCallHierarchyOutgoingCalls(item, token, provideCallHierarchyOutgoingCalls) : provideCallHierarchyOutgoingCalls(item, token);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
class CallHierarchyFeature extends features_1.TextDocumentLanguageFeature {
|
|
73
|
+
constructor(client) {
|
|
74
|
+
super(client, vscode_languageserver_protocol_1.CallHierarchyPrepareRequest.type);
|
|
75
|
+
}
|
|
76
|
+
fillClientCapabilities(cap) {
|
|
77
|
+
const capabilities = cap;
|
|
78
|
+
const capability = (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'callHierarchy');
|
|
79
|
+
capability.dynamicRegistration = true;
|
|
80
|
+
}
|
|
81
|
+
initialize(capabilities, documentSelector) {
|
|
82
|
+
const [id, options] = this.getRegistration(documentSelector, capabilities.callHierarchyProvider);
|
|
83
|
+
if (!id || !options) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
this.register({
|
|
87
|
+
id: id,
|
|
88
|
+
registerOptions: options
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
registerLanguageProvider(options) {
|
|
92
|
+
const client = this._client;
|
|
93
|
+
const provider = new CallHierarchyProvider(client);
|
|
94
|
+
return [vscode_1.languages.registerCallHierarchyProvider(this._client.protocol2CodeConverter.asDocumentSelector(options.documentSelector), provider), provider];
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
CallHierarchyFeature_1 = callHierarchy.CallHierarchyFeature = CallHierarchyFeature;
|
|
98
|
+
export { CallHierarchyFeature_1 as CallHierarchyFeature, callHierarchy as default };
|