Theia API Documentation v1.65.0
    Preparing search index...

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    _dirty: boolean = false
    _languageId: undefined | string
    _valid: boolean = false

    Use valid to access it. Use setValid to mutate it.

    bufferSavedVersionId: number
    contentChanges: MonacoTextDocumentContentChange[] = []
    editorPreferences?: EditorPreferences
    ignoreContentChanges: boolean = false
    ignoreDirtyEdits: boolean = false
    lineNumbersMinChars: number = 3
    logger?: ILogger
    model: ITextModel
    onDidChangeContent: Event<MonacoModelContentChangedEvent> = ...
    onDidChangeContentEmitter: Emitter<MonacoModelContentChangedEvent> = ...
    onDidChangeEncoding: Event<string> = ...
    onDidChangeEncodingEmitter: Emitter<string> = ...
    onDidChangeReadOnly: Event<boolean | MarkdownString> = ...
    onDidChangeValid: Event<void> = ...
    onDidChangeValidEmitter: Emitter<void> = ...
    onDidSaveModel: Event<ITextModel> = ...
    onDidSaveModelEmitter: Emitter<ITextModel> = ...
    onDirtyChangedEmitter: Emitter<void> = ...
    onModelWillSaveModel: Registration<WillSaveMonacoModelEvent, Promise<void>> = ...
    onWillSaveLoopTimeOut: 1500

    there is no general save timeout, each participant should introduce a sensible timeout

    onWillSaveModelListeners: ListenerList<WillSaveMonacoModelEvent, Promise<void>> = ...
    pendingOperation: Promise<void> = ...
    resolveModel: Promise<void>
    resource: Resource
    resourceVersion: undefined | ResourceVersion
    saveCancellationTokenSource: CancellationTokenSource = ...
    suppressOpenEditorWhenDirty: boolean = false
    syncCancellationTokenSource: CancellationTokenSource = ...
    toDispose: DisposableCollection = ...
    toDisposeOnAutoSave: DisposableCollection = ...

    Accessors

    • get textEditorModel(): ITextModel & ITextModel

      We have a TypeScript problem here. There is a const enum DefaultEndOfLine used for ITextModel and a non-const redeclaration of that enum in the public API in Monaco.editor. The values will be the same, but TS won't accept that the two enums are equivalent, so it says these types are irreconcilable.

      Returns ITextModel & ITextModel

    Methods

    • Optionally return file filters for the "Save As" dialog. The keys of the returned object are the names of the filters and the values are arrays of file extensions. For example: { 'Text Files': ['txt', 'text'], 'All Files': ['*'] } If no filters are provided, a default filter of All Files (*.*) will be used.

      Returns { [name: string]: string[] }

    • Only this method can create an instance of monaco.editor.IModel, there should not be other calls to monaco.editor.createModel.

      Parameters

      • value: string | ITextBufferFactory

      Returns void

    • Creates a valid range. If the range argument is outside of the document, this method will return with a new range that does not exceed the boundaries of the document. For example, if the argument is { start: { line: 1, character: 0 }, end: { line: 1, character: 0 } } and the document is empty, the return value is { start: { line: 0, character: 0 }, end: { line: 0, character: 0 } }.

      Parameters

      Returns Range