Merge from vscode 777931080477e28b7c27e8f7d4b0d69897945946 (#9220)

This commit is contained in:
Anthony Dresser
2020-02-19 22:27:53 -08:00
committed by GitHub
parent ab6fb810f8
commit 0cec223301
115 changed files with 1431 additions and 1133 deletions

View File

@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import { AbstractTextFileService } from 'vs/workbench/services/textfile/browser/textFileService';
import { ITextFileService, IResourceEncodings, IResourceEncoding, ModelState } from 'vs/workbench/services/textfile/common/textfiles';
import { ITextFileService, IResourceEncodings, IResourceEncoding, TextFileEditorModelState } from 'vs/workbench/services/textfile/common/textfiles';
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
import { ShutdownReason } from 'vs/platform/lifecycle/common/lifecycle';
@@ -24,7 +24,7 @@ export class BrowserTextFileService extends AbstractTextFileService {
}
protected onBeforeShutdown(reason: ShutdownReason): boolean {
if (this.files.getAll().some(model => model.hasState(ModelState.PENDING_SAVE))) {
if (this.files.models.some(model => model.hasState(TextFileEditorModelState.PENDING_SAVE))) {
console.warn('Unload prevented: pending file saves');
return true; // files are pending to be saved: veto