fileSearchManager.ts ×4

Frontier kind: Joint frontier

unlabeled · c_d68b7e921828

1 test · 79625 LOC · 282 files · introduces 1 test · 25 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
6 ranges25 lines · 3 files
Tests
1 test

Contains — complete concept membership

All code (extent)
5652 ranges79625 lines · 282 files · Browse complete extent
All tests (intent)
1 testBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

1 test introduced at this concept.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

3 files ranked by introduced lines: 25 introduced LOC across 6 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/workbench/services/search/common/fileSearchManager.ts 17 introduced LOC · 4 ranges

Open complete file

314
315 constructor() {
316 > this._obj = new Object(); fileSearchManager.ts
317 > this.tokenSource = new CancellationTokenSource();
318 > }
319
320 public get obj() {
327
328 cancel() {
329 > this.tokenSource.cancel(); fileSearchManager.ts
330 > this._obj = undefined; // dereference
331 > }
332 }
333
364
365 clearCache(cacheKey: string): void {
366 > // cancel the token fileSearchManager.ts
367 > this.sessions.get(cacheKey)?.cancel();
368 > // with no reference to this, it will be removed from WeakMaps
369 > this.sessions.delete(cacheKey);
370 > }
371
372 private getSessionTokenSource(cacheKey: string | undefined): SessionLifecycle | undefined {
374 return undefined;
375 }
377 > if (!this.sessions.has(cacheKey)) {
378 > this.sessions.set(cacheKey, new SessionLifecycle());
379 > }
380 >
381 > return this.sessions.get(cacheKey);
382 }
383
src/vs/workbench/api/common/extHostSearch.ts 4 introduced LOC · 1 range

Open complete file

163
164 $clearCache(cacheKey: string): Promise<void> {
165 > this._fileSearchManager.clearCache(cacheKey); extHostSearch.ts
166 >
167 > return Promise.resolve(undefined);
168 > }
169
170 $provideTextSearchResults(handle: number, session: number, rawQuery: IRawTextQuery, token: vscode.CancellationToken): Promise<ISearchCompleteStats> {
src/vs/workbench/api/node/extHostSearch.ts 4 introduced LOC · 1 range

Open complete file

157
158 override $clearCache(cacheKey: string): Promise<void> {
159 > this._internalFileSearchProvider?.clearCache(cacheKey); extHostSearch.ts
160 >
161 > return super.$clearCache(cacheKey);
162 > }
163
164 protected override createTextSearchManager(query: ITextQuery, provider: vscode.TextSearchProvider2): TextSearchManager {