Merge from vscode 071a5cf16fc999727acc31c790d78f750fa4b166 (#5261)

This commit is contained in:
Anthony Dresser
2019-04-30 07:54:56 -07:00
committed by GitHub
parent 02916aeffa
commit aacc0eca67
24 changed files with 564 additions and 238 deletions

View File

@@ -899,6 +899,7 @@ export class TestFileService implements IFileService {
readonly onError: Event<Error> = Event.None;
private content = 'Hello Html';
private lastReadFileUri: URI;
constructor() {
this._onFileChanges = new Emitter<FileChangesEvent>();
@@ -913,6 +914,10 @@ export class TestFileService implements IFileService {
return this.content;
}
public getLastReadFileUri(): URI {
return this.lastReadFileUri;
}
public get onFileChanges(): Event<FileChangesEvent> {
return this._onFileChanges.event;
}
@@ -952,6 +957,8 @@ export class TestFileService implements IFileService {
}
readFile(resource: URI, options?: IReadFileOptions | undefined): Promise<IFileContent> {
this.lastReadFileUri = resource;
return Promise.resolve({
resource: resource,
value: VSBuffer.fromString(this.content),
@@ -964,6 +971,8 @@ export class TestFileService implements IFileService {
}
readFileStream(resource: URI, options?: IReadFileOptions | undefined): Promise<IFileStreamContent> {
this.lastReadFileUri = resource;
return Promise.resolve({
resource: resource,
value: {