File operation events support multiple resources (#98988)

* refactor: use array of resources

* refactor: use an array of uricomponentspair

* feat: move many resources

* refactor: rename data to files

* feat: use array of files for copy

* refactor: use move with multiple resources

* refactor: use move method with array of files

* refactor: rename data to files

* feat: moveOrCopy array of resources on paste

* refactor: use concise loop syntax

* test: assert number of events

* refactor: rename uricomponentspair

* support multiple files on WorkingCopyFileEvent

* feat: support multiple resources
onWillRunWorkingCopyFIleOperation onDidRunWorkingCopyFileOperation

* refactor: make source optional for consistency

* refactor: support resources for delete

* test: isolate tests

* fix: iterate over resources

* feat: support operations on delete

* feat: adopt deleting multiple resources

* fix: typing and sequential flow of copyservice

* fix: typing and naming

* fix: typing and naming

* fix: use different message for multiple overwrites

* refactor: naming consistency

* fix: use array resources

* fix: message for multiple overwrites

* fix format

* clean up working copy file service

* refactor multiple overwrites message helper

* use openeditors to bulk open

* split drop copy and move

* add returns

Co-authored-by: Benjamin Pasero <benjpas@microsoft.com>
This commit is contained in:
Pascal Fong Kye
2020-06-24 10:32:55 +02:00
committed by GitHub
parent ac314ec9d1
commit e3033faeee
15 changed files with 557 additions and 315 deletions

View File

@@ -1068,10 +1068,15 @@ export interface FileSystemEvents {
deleted: UriComponents[];
}
export interface SourceTargetPair {
source?: UriComponents;
target: UriComponents;
}
export interface ExtHostFileSystemEventServiceShape {
$onFileEvent(events: FileSystemEvents): void;
$onWillRunFileOperation(operation: files.FileOperation, target: UriComponents, source: UriComponents | undefined, timeout: number, token: CancellationToken): Promise<any>;
$onDidRunFileOperation(operation: files.FileOperation, target: UriComponents, source: UriComponents | undefined): void;
$onWillRunFileOperation(operation: files.FileOperation, files: SourceTargetPair[], timeout: number, token: CancellationToken): Promise<any>;
$onDidRunFileOperation(operation: files.FileOperation, files: SourceTargetPair[]): void;
}
export interface ObjectIdentifier {