Merge from vscode 073a24de05773f2261f89172987002dc0ae2f1cd (#9711)

This commit is contained in:
Anthony Dresser
2020-03-24 00:24:15 -07:00
committed by GitHub
parent 29741d684e
commit 89ef1b0c2e
226 changed files with 6161 additions and 3288 deletions

View File

@@ -30,6 +30,13 @@ export interface IWorkspaceUndoRedoElement {
split(): IResourceUndoRedoElement[];
}
export type IUndoRedoElement = IResourceUndoRedoElement | IWorkspaceUndoRedoElement;
export interface IPastFutureElements {
past: IUndoRedoElement[];
future: IUndoRedoElement[];
}
export interface IUndoRedoService {
_serviceBrand: undefined;
@@ -37,12 +44,18 @@ export interface IUndoRedoService {
* Add a new element to the `undo` stack.
* This will destroy the `redo` stack.
*/
pushElement(element: IResourceUndoRedoElement | IWorkspaceUndoRedoElement): void;
pushElement(element: IUndoRedoElement): void;
/**
* Get the last pushed element. If the last pushed element has been undone, returns null.
*/
getLastElement(resource: URI): IResourceUndoRedoElement | IWorkspaceUndoRedoElement | null;
getLastElement(resource: URI): IUndoRedoElement | null;
getElements(resource: URI): IPastFutureElements;
hasElements(resource: URI): boolean;
setElementsIsValid(resource: URI, isValid: boolean): void;
/**
* Remove elements that target `resource`.