mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 18:49:00 +01:00
Introduce GlobPattern and adopt in DocumentFilter/FileWatcher/FileSearch (#34695)
* introduce IRelativePattern and use in extension API * 💄 * docs * introduce RelativePattern * support RelativePattern also for file watcher * also make findFiles support RelativePattern * less type conversion * add GlobPattern type and remove readonly * make base a string * fix setter access to RelativePattern * fix npe when exclude is undefined * fix findFiles: pattern seems to be matched against workspace always * 💄 * clarify glob pattern matching
This commit is contained in:
@@ -14,6 +14,7 @@ import { IWorkspaceData, ExtHostWorkspaceShape, MainContext, MainThreadWorkspace
|
||||
import * as vscode from 'vscode';
|
||||
import { compare } from 'vs/base/common/strings';
|
||||
import { TrieMap } from 'vs/base/common/map';
|
||||
import { IRelativePattern } from 'vs/base/common/glob';
|
||||
|
||||
class Workspace2 extends Workspace {
|
||||
|
||||
@@ -156,7 +157,7 @@ export class ExtHostWorkspace implements ExtHostWorkspaceShape {
|
||||
|
||||
// --- search ---
|
||||
|
||||
findFiles(include: string, exclude: string, maxResults?: number, token?: vscode.CancellationToken): Thenable<vscode.Uri[]> {
|
||||
findFiles(include: string | IRelativePattern, exclude: string | IRelativePattern, maxResults?: number, token?: vscode.CancellationToken): Thenable<vscode.Uri[]> {
|
||||
const requestId = ExtHostWorkspace._requestIdPool++;
|
||||
const result = this._proxy.$startSearch(include, exclude, maxResults, requestId);
|
||||
if (token) {
|
||||
|
||||
Reference in New Issue
Block a user