openCustomDocument
abstract fun openCustomDocument(uri: Uri, openContext: CustomDocumentOpenContext, token: CancellationToken): PromiseResult<T>(source)
Create a new document for a given resource.
openCustomDocument
is called when the first time an editor for a given resource is opened. The opened document is then passed to resolveCustomEditor
so that the editor can be shown to the user.
Already opened CustomDocument
are re-used if the user opened additional editors. When all editors for a given resource are closed, the CustomDocument
is disposed of. Opening an editor at this point will trigger another call to openCustomDocument
.
Parameters
uri
Uri of the document to open.
openContext
Additional information about the opening custom document.
token
A cancellation token that indicates the result is no longer needed.