From 9b3308e1ed1a92cff0eb4815ab7c84cc08fc452a Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 28 Dec 2015 10:37:07 +0100 Subject: [PATCH] rename auto save options to shorter words --- src/vs/platform/files/common/files.ts | 4 ++-- .../parts/files/browser/editors/textFileEditorModel.ts | 4 ++-- .../workbench/parts/files/browser/files.contribution.ts | 8 ++++---- src/vs/workbench/parts/files/browser/textFileServices.ts | 8 ++++---- src/vs/workbench/parts/files/common/files.ts | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/vs/platform/files/common/files.ts b/src/vs/platform/files/common/files.ts index 1ff68f90cf8..01609c631f6 100644 --- a/src/vs/platform/files/common/files.ts +++ b/src/vs/platform/files/common/files.ts @@ -417,7 +417,7 @@ export interface IFilesConfiguration { exclude: glob.IExpression; encoding: string; trimTrailingWhitespace: boolean; - autoSaveAfterDelay: number; - autoSaveAfterFocusChange: boolean; + autoSaveDelay: number; + autoSaveFocusChange: boolean; }; } \ No newline at end of file diff --git a/src/vs/workbench/parts/files/browser/editors/textFileEditorModel.ts b/src/vs/workbench/parts/files/browser/editors/textFileEditorModel.ts index 23908d482b4..d8a4641d93e 100644 --- a/src/vs/workbench/parts/files/browser/editors/textFileEditorModel.ts +++ b/src/vs/workbench/parts/files/browser/editors/textFileEditorModel.ts @@ -136,8 +136,8 @@ export class TextFileEditorModel extends BaseTextEditorModel implements IEncodin } public updateAutoSaveConfiguration(config: IAutoSaveConfiguration): void { - if (typeof config.autoSaveAfterDelay === 'number' && config.autoSaveAfterDelay > 0) { - this.autoSaveAfterMillies = config.autoSaveAfterDelay * 1000; + if (typeof config.autoSaveDelay === 'number' && config.autoSaveDelay > 0) { + this.autoSaveAfterMillies = config.autoSaveDelay * 1000; this.autoSaveAfterMilliesEnabled = true; } else { this.autoSaveAfterMillies = void 0; diff --git a/src/vs/workbench/parts/files/browser/files.contribution.ts b/src/vs/workbench/parts/files/browser/files.contribution.ts index ef4898eddec..8513db99670 100644 --- a/src/vs/workbench/parts/files/browser/files.contribution.ts +++ b/src/vs/workbench/parts/files/browser/files.contribution.ts @@ -219,15 +219,15 @@ configurationRegistry.registerConfiguration({ 'default': false, 'description': nls.localize('trimTrailingWhitespace', "When enabled, will trim trailing whitespace when you save a file.") }, - 'files.autoSaveAfterDelay': { + 'files.autoSaveDelay': { 'type': 'number', 'default': 0, - 'description': nls.localize('autoSaveAfterDelay', "When set to a positive number, will automatically save dirty editors after configured seconds.") + 'description': nls.localize('autoSaveDelay', "When set to a positive number, will automatically save dirty editors after configured seconds.") }, - 'files.autoSaveAfterFocusChange': { + 'files.autoSaveFocusChange': { 'type': 'boolean', 'default': false, - 'description': nls.localize('autoSaveAfterFocusChange', "When enabled, will automatically save dirty editors when they lose focus or are closed.") + 'description': nls.localize('autoSaveFocusChange', "When enabled, will automatically save dirty editors when they lose focus or are closed.") } } }); diff --git a/src/vs/workbench/parts/files/browser/textFileServices.ts b/src/vs/workbench/parts/files/browser/textFileServices.ts index 20b8a56ec9c..3276d283405 100644 --- a/src/vs/workbench/parts/files/browser/textFileServices.ts +++ b/src/vs/workbench/parts/files/browser/textFileServices.ts @@ -90,8 +90,8 @@ export abstract class TextFileService implements ITextFileService { private onConfigurationChange(configuration: IFilesConfiguration): void { const wasAutoSaveEnabled = this.isAutoSaveEnabled(); - this.configuredAutoSaveDelay = configuration && configuration.files && configuration.files.autoSaveAfterDelay; - this.configuredAutoSaveOnFocusChange = configuration && configuration.files && configuration.files.autoSaveAfterFocusChange; + this.configuredAutoSaveDelay = configuration && configuration.files && configuration.files.autoSaveDelay; + this.configuredAutoSaveOnFocusChange = configuration && configuration.files && configuration.files.autoSaveFocusChange; const autoSaveConfig = this.getAutoSaveConfiguration(); CACHE.getAll().forEach((model) => model.updateAutoSaveConfiguration(autoSaveConfig)); @@ -228,8 +228,8 @@ export abstract class TextFileService implements ITextFileService { public getAutoSaveConfiguration(): IAutoSaveConfiguration { return { - autoSaveAfterDelay: this.configuredAutoSaveDelay && this.configuredAutoSaveDelay > 0 ? this.configuredAutoSaveDelay : void 0, - autoSaveAfterFocusChange: this.configuredAutoSaveOnFocusChange + autoSaveDelay: this.configuredAutoSaveDelay && this.configuredAutoSaveDelay > 0 ? this.configuredAutoSaveDelay : void 0, + autoSaveFocusChange: this.configuredAutoSaveOnFocusChange } } diff --git a/src/vs/workbench/parts/files/common/files.ts b/src/vs/workbench/parts/files/common/files.ts index c61665b8cba..88d304ba37a 100644 --- a/src/vs/workbench/parts/files/common/files.ts +++ b/src/vs/workbench/parts/files/common/files.ts @@ -289,8 +289,8 @@ export interface IResult { } export interface IAutoSaveConfiguration { - autoSaveAfterDelay: number; - autoSaveAfterFocusChange: boolean; + autoSaveDelay: number; + autoSaveFocusChange: boolean; } export var ITextFileService = createDecorator(TEXT_FILE_SERVICE_ID); -- GitLab