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

Function hookFileEvents

client/src/client.ts:2824–2839  ·  view source on GitHub ↗
(_connection: IConnection)

Source from the content-addressed store, hash-verified

2822
2823
2824 private hookFileEvents(_connection: IConnection): void {
2825 let fileEvents = this._clientOptions.synchronize.fileEvents;
2826 if (!fileEvents) {
2827 return;
2828 }
2829 let watchers: VFileSystemWatcher[];
2830 if (Is.array(fileEvents)) {
2831 watchers = <VFileSystemWatcher[]>fileEvents;
2832 } else {
2833 watchers = [<VFileSystemWatcher>fileEvents];
2834 }
2835 if (!watchers) {
2836 return;
2837 }
2838 (this._dynamicFeatures.get(DidChangeWatchedFilesNotification.type.method)! as FileSystemWatcherFeature).registerRaw(UUID.generateUuid(), watchers);
2839 }
2840
2841 private readonly _features: (StaticFeature | DynamicFeature<any>)[] = [];
2842 private readonly _method2Message: Map<string, RPCMessageType> = new Map<string, RPCMessageType>();

Callers

nothing calls this directly

Calls 2

registerRawMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected