Revert "improve revert logic for untitled"

This reverts commit 0256f00d8d.
This commit is contained in:
Benjamin Pasero
2016-06-06 11:39:27 +02:00
parent 8a9ddea7f9
commit 2d33d752cd
11 changed files with 31 additions and 50 deletions

View File

@@ -36,11 +36,6 @@ export interface IUntitledEditorService {
*/
isDirty(resource: URI): boolean;
/**
* Reverts the untitled resources if found.
*/
revertAll(resources?: URI[]): URI[];
/**
* Creates a new untitled input with the optional resource URI or returns an existing one
* if the provided resource exists already as untitled input.
@@ -77,21 +72,6 @@ export class UntitledEditorService implements IUntitledEditorService {
return Object.keys(UntitledEditorService.CACHE).map((key) => UntitledEditorService.CACHE[key]);
}
public revertAll(resources?: URI[], force?: boolean): URI[] {
const reverted: URI[] = [];
const untitledInputs = this.getAll(resources);
untitledInputs.forEach(input => {
if (input) {
input.revert();
reverted.push(input.getResource());
}
});
return reverted;
}
public isDirty(resource: URI): boolean {
let input = this.get(resource);