dialog - extract confirmSave to file dialog servie

This commit is contained in:
Benjamin Pasero
2019-11-14 08:37:12 +01:00
parent 9134f9fddd
commit 929fab1876
14 changed files with 131 additions and 136 deletions

View File

@@ -415,13 +415,6 @@ export abstract class EditorInput extends Disposable implements IEditorInput {
return false;
}
/**
* Subclasses should bring up a proper dialog for the user if the editor is dirty and return the result.
*/
confirmSave(): Promise<ConfirmResult> {
return Promise.resolve(ConfirmResult.DONT_SAVE);
}
/**
* Saves the editor if it is dirty. Subclasses return a promise with a boolean indicating the success of the operation.
*/
@@ -476,12 +469,6 @@ export abstract class EditorInput extends Disposable implements IEditorInput {
}
}
export const enum ConfirmResult {
SAVE,
DONT_SAVE,
CANCEL
}
export const enum EncodingMode {
/**
@@ -573,10 +560,6 @@ export class SideBySideEditorInput extends EditorInput {
return this.master.isDirty();
}
confirmSave(): Promise<ConfirmResult> {
return this.master.confirmSave();
}
save(): Promise<boolean> {
return this.master.save();
}