revertCustomDocument
abstract fun revertCustomDocument(document: T, cancellation: CancellationToken): PromiseLike<Void?>(source)
Revert a custom document to its last saved state.
This method is invoked by the editor when the user triggers File: Revert File
in a custom editor. (Note that this is only used using the editor's File: Revert File
command and not on a git revert
of the file).
To implement revert
, the implementer must make sure all editor instances (webviews) for document
are displaying the document in the same state is saved in. This usually means reloading the file from the workspace.
Parameters
document
Document to revert.
cancellation
Token that signals the revert is no longer required.