Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DocumentsExtImpl

Hierarchy

  • DocumentsExtImpl

Implements

Index

Constructors

constructor

Properties

Private _onDidAddDocument

_onDidAddDocument: Emitter<TextDocument> = ...

Private _onDidChangeDocument

_onDidChangeDocument: Emitter<TextDocumentChangeEvent> = ...

Private _onDidRemoveDocument

_onDidRemoveDocument: Emitter<TextDocument> = ...

Private _onDidSaveTextDocument

_onDidSaveTextDocument: Emitter<TextDocument> = ...

Private _onWillSaveTextDocument

_onWillSaveTextDocument: Emitter<TextDocumentWillSaveEvent> = ...

Private loadingDocuments

loadingDocuments: Map<string, Promise<undefined | DocumentDataExt>> = ...

Readonly onDidAddDocument

onDidAddDocument: Event<TextDocument> = ...

Readonly onDidChangeDocument

onDidChangeDocument: Event<TextDocumentChangeEvent> = ...

Readonly onDidRemoveDocument

onDidRemoveDocument: Event<TextDocument> = ...

Readonly onDidSaveTextDocument

onDidSaveTextDocument: Event<TextDocument> = ...

Readonly onWillSaveTextDocument

onWillSaveTextDocument: Event<TextDocumentWillSaveEvent> = ...

Private proxy

Private toDispose

toDispose: DisposableCollection = ...

Methods

$acceptDirtyStateChanged

  • $acceptDirtyStateChanged(strUrl: UriComponents, isDirty: boolean): void

$acceptModelChanged

$acceptModelModeChanged

  • $acceptModelModeChanged(startUrl: UriComponents, oldModeId: string, newModeId: string): void

$acceptModelSaved

$acceptModelWillSave

createDocumentData

  • createDocumentData(options?: { content?: string; language?: string }): Promise<URI>

Protected fireTextDocumentWillSaveEvent

  • fireTextDocumentWillSaveEvent(__namedParameters: { accept: (operation: SingleEditOperation) => void; document: TextDocument; fireEvent: (e: TextDocumentWillSaveEvent) => any; reason: TextDocumentSaveReason }): Promise<void>

getAllDocumentData

getDocument

  • getDocument(resource: Uri): TextDocument

getDocumentData

Private loadDocument

  • loadDocument(uri: URI, options?: TextDocumentShowOptions): Promise<undefined | DocumentDataExt>

openDocument

setWordDefinitionFor

  • setWordDefinitionFor(modeId: string, wordDefinition: null | RegExp): void

showDocument

  • showDocument(uri: URI, options?: TextDocumentShowOptions): Promise<undefined | DocumentDataExt>
  • Retrieve document and open it in the editor if need.

    Parameters

    • uri: URI

      path to the resource

    • Optional options: TextDocumentShowOptions

      if options exists, resource will be opened in editor, otherwise only document object is returned

    Returns Promise<undefined | DocumentDataExt>