saveCustomDocumentAs

abstract fun saveCustomDocumentAs(document: T, destination: Uri, cancellation: CancellationToken): PromiseLike<Void?>(source)

Save a custom document to a different location.

This method is invoked by the editor when the user triggers 'save as' on a custom editor. The implementer must persist the custom editor to destination.

When the user accepts save as, the current editor is be replaced by an non-dirty editor for the newly saved file.

Parameters

document

Document to save.

destination

Location to save to.

cancellation

Token that signals the save is no longer required.