fileSearchManager.ts ×5

Frontier kind: Code frontier

unlabeled · c_7dc11adb31d3

16 tests · 79406 LOC · 282 files · introduces 0 tests · 42 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
8 ranges42 lines · 3 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
5582 ranges79406 lines · 282 files · Browse complete extent
All tests (intent)
16 testsBrowse 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.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

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

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

src/vs/workbench/services/search/common/fileSearchManager.ts 29 introduced LOC · 5 ranges

Open complete file

129
130 const getFolderQueryInfo = (fq: IFolderQuery) => {
131 > const queryTester = new QueryGlobTester(this.config, fq); fileSearchManager.ts
132 > const noSiblingsClauses = !queryTester.hasSiblingExcludeClauses();
133 > return { queryTester, noSiblingsClauses, folder: fq.folder, tree: this.initDirectoryTree() };
134 > };
135
136 const folderMappings: FolderQuerySearchTree<FolderQueryInfo> = new FolderQuerySearchTree<FolderQueryInfo>(fqs, getFolderQueryInfo);
190
191 private getSearchOptionsForFolder(fq: IFolderQuery<URI>): FileSearchProviderFolderOptions {
192 > const includes = resolvePatternsForProvider(this.config.includePattern, fq.includePattern); fileSearchManager.ts
193 > let excludePattern = fq.excludePattern?.map(e => ({
194 folder: e.folder,
195 patterns: resolvePatternsForProvider(this.config.excludePattern, e.pattern)
197 > if (!excludePattern?.length) {
198 excludePattern = [{
199 folder: undefined,
201 }];
202 }
203 > const excludes = excludeToGlobPattern(excludePattern); fileSearchManager.ts
204 >
205 > return {
206 > folder: fq.folder,
207 > excludes,
208 > includes,
209 > useIgnoreFiles: {
210 > local: !fq.disregardIgnoreFiles,
211 > parent: !fq.disregardParentIgnoreFiles,
212 > global: !fq.disregardGlobalIgnoreFiles
213 > },
214 > followSymlinks: !fq.ignoreSymlinks,
215 > };
216 > }
217
218 private initDirectoryTree(): IDirectoryTree {
219 > const tree: IDirectoryTree = { fileSearchManager.ts
220 > rootEntries: [],
221 > pathToEntries: Object.create(null)
222 > };
223 > tree.pathToEntries['.'] = tree.rootEntries;
224 > return tree;
225 > }
226
227 private addDirectoryEntries({ pathToEntries }: IDirectoryTree, base: URI, relativeFile: string, onResult: (result: IInternalFileMatch) => void) {
src/vs/workbench/services/search/common/searchExtConversionTypes.ts 9 introduced LOC · 1 range

Open complete file

439 function newToOldFileProviderOptions(options: FileSearchProviderOptions): FileSearchOptions[] {
440 return options.folderOptions.map(folderOption => ({
441 > folder: folderOption.folder, searchExtConversionTypes.ts
442 > excludes: folderOption.excludes.map(e => typeof (e) === 'string' ? e : e.pattern),
443 > includes: folderOption.includes,
444 > useGlobalIgnoreFiles: folderOption.useIgnoreFiles.global,
445 > useIgnoreFiles: folderOption.useIgnoreFiles.local,
446 > useParentIgnoreFiles: folderOption.useIgnoreFiles.parent,
447 > followSymlinks: folderOption.followSymlinks,
448 > maxResults: options.maxResults,
449 > session: <CancellationToken | undefined>options.session // TODO: make sure that we actually use a cancellation token here.
450 } satisfies FileSearchOptions));
451 }
src/vs/workbench/services/search/common/search.ts 4 introduced LOC · 2 ranges

Open complete file

813
814 hasSiblingExcludeClauses(): boolean {
815 > return this._excludeExpression.reduce((prev, curr) => hasSiblingClauses(curr) || prev, false); search.ts
816 > }
817 }
818
819 > function hasSiblingClauses(pattern: glob.IExpression): boolean { search.ts
820 > for (const key in pattern) {
821 if (typeof pattern[key] !== 'boolean') {
822 return true;