search.ts ×9

Frontier kind: Code frontier

unlabeled · c_d39773084867

33 tests · 10556 LOC · 48 files · introduces 0 tests · 28 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
9 ranges28 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1483 ranges10556 lines · 48 files · Browse complete extent
All tests (intent)
33 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.

1 file ranked by introduced lines: 28 introduced LOC across 9 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/workbench/services/search/common/search.ts 28 introduced LOC · 9 ranges

Open complete file

685 */
686 export function resolvePatternsForProvider(globalPattern: glob.IExpression | undefined, folderPattern: glob.IExpression | undefined): string[] {
687 > const merged = { search.ts
688 > ...(globalPattern || {}),
689 > ...(folderPattern || {})
690 > };
691 >
692 > return Object.keys(merged)
693 > .filter(key => {
694 const value = merged[key];
695 return typeof value === 'boolean' && value;
696 > }); search.ts
697 > }
698
699 export class QueryGlobTester {
705
706 constructor(config: ISearchQuery, folderQuery: IFolderQuery) {
707 > const globOptions = config.ignoreGlobCase || folderQuery.ignoreGlobCase ? { ignoreCase: true } : undefined; search.ts
708 >
709 > // todo: try to incorporate folderQuery.excludePattern.folder if available
710 > this._excludeExpression = folderQuery.excludePattern?.map(excludePattern => {
711 return {
712 ...(config.excludePattern || {}),
713 ...(excludePattern.pattern || {})
714 } satisfies glob.IExpression;
715 > }) ?? []; search.ts
716 >
717 > if (this._excludeExpression.length === 0) {
718 // even if there are no folderQueries, we want to observe the global excludes
719 this._excludeExpression = [config.excludePattern || {}];
720 }
721 > search.ts
722 > this._parsedExcludeExpression = this._excludeExpression.map(e => glob.parse(e, globOptions));
723 >
724 > // Empty includeExpression means include nothing, so no {} shortcuts
725 > let includeExpression: glob.IExpression | undefined = config.includePattern;
726 > if (folderQuery.includePattern) {
727 if (includeExpression) {
728 includeExpression = {
734 }
735 }
736 > search.ts
737 > if (includeExpression) {
738 this._parsedIncludeExpression = glob.parse(includeExpression, globOptions);
739 }
740 > } search.ts
741
742 private _evalParsedExcludeExpression(testPath: string, basename: string | undefined, hasSibling?: (name: string) => boolean): string | null {
866
867 export function excludeToGlobPattern(excludesForFolder: { baseUri?: URI | undefined; patterns: string[] }[]): GlobPattern[] {
868 > return excludesForFolder.flatMap(exclude => exclude.patterns.map(pattern => { search.ts
869 return exclude.baseUri ?
870 {
872 pattern: pattern
873 } : pattern;
874 > })); search.ts
875 > }
876
877 export const DEFAULT_TEXT_SEARCH_PREVIEW_OPTIONS = {