mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-02 06:21:50 +01:00
dialog - extract confirmSave to file dialog servie
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user