MCPcopy
hub / github.com/microsoft/vscode-languageserver-node / registerFeature

Function registerFeature

client/src/client.ts:2852–2866  ·  view source on GitHub ↗
(feature: StaticFeature | DynamicFeature<any>)

Source from the content-addressed store, hash-verified

2850 }
2851
2852 public registerFeature(feature: StaticFeature | DynamicFeature<any>): void {
2853 this._features.push(feature);
2854 if (DynamicFeature.is(feature)) {
2855 let messages = feature.messages;
2856 if (Array.isArray(messages)) {
2857 for (let message of messages) {
2858 this._method2Message.set(message.method, message);
2859 this._dynamicFeatures.set(message.method, feature);
2860 }
2861 } else {
2862 this._method2Message.set(messages.method, messages);
2863 this._dynamicFeatures.set(messages.method, feature);
2864 }
2865 }
2866 }
2867
2868 protected registerBuiltinFeatures() {
2869 this.registerFeature(new ConfigurationFeature(this));

Callers

nothing calls this directly

Calls 1

setMethod · 0.80

Tested by

no test coverage detected