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:
Benjamin Pasero
2017-09-22 13:52:23 +02:00
committed by GitHub
parent 9e05d4b635
commit 3e9fa59616
11 changed files with 169 additions and 38 deletions

View File

@@ -47,6 +47,7 @@ import { ITreeItem } from 'vs/workbench/common/views';
import { ThemeColor } from 'vs/platform/theme/common/themeService';
import { IDisposable } from 'vs/base/common/lifecycle';
import { SerializedError } from 'vs/base/common/errors';
import { IRelativePattern } from 'vs/base/common/glob';
import { IWorkspaceFolderData } from 'vs/platform/workspace/common/workspace';
import { IStat, IFileChange } from 'vs/platform/files/common/files';
@@ -311,7 +312,7 @@ export interface MainThreadTelemetryShape extends IDisposable {
}
export interface MainThreadWorkspaceShape extends IDisposable {
$startSearch(include: string, exclude: string, maxResults: number, requestId: number): Thenable<URI[]>;
$startSearch(include: string | IRelativePattern, exclude: string | IRelativePattern, maxResults: number, requestId: number): Thenable<URI[]>;
$cancelSearch(requestId: number): Thenable<boolean>;
$saveAll(includeUntitled?: boolean): Thenable<boolean>;
}