MCPcopy Index your code
hub / github.com/microsoft/vscode-languageserver-node / handleRegistrationRequest

Function handleRegistrationRequest

client/src/client.ts:2920–2938  ·  view source on GitHub ↗
(params: RegistrationParams)

Source from the content-addressed store, hash-verified

2918 }
2919
2920 private handleRegistrationRequest(params: RegistrationParams): Thenable<void> {
2921 return new Promise<void>((resolve, reject) => {
2922 for (let registration of params.registrations) {
2923 const feature = this._dynamicFeatures.get(registration.method);
2924 if (!feature) {
2925 reject(new Error(`No feature implementation for ${registration.method} found. Registration failed.`));
2926 return;
2927 }
2928 const options = registration.registerOptions || {};
2929 options.documentSelector = options.documentSelector || this._clientOptions.documentSelector;
2930 const data: RegistrationData<any> = {
2931 id: registration.id,
2932 registerOptions: options
2933 }
2934 feature.register(this._method2Message.get(registration.method)!, data);
2935 }
2936 resolve();
2937 });
2938 }
2939
2940 private handleUnregistrationRequest(params: UnregistrationParams): Thenable<void> {
2941 return new Promise<void>((resolve, reject) => {

Callers

nothing calls this directly

Calls 4

rejectFunction · 0.85
registerMethod · 0.65
resolveFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected