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

    Navigatable provides an access to an URI of an underlying instance of Resource.

    interface TextEditor {
        cursor: Position;
        document: TextEditorDocument;
        isReadonly: boolean | MarkdownString;
        node: HTMLElement;
        onCursorPositionChanged: Event<Position>;
        onDidChangeReadOnly: Event<boolean | MarkdownString>;
        onDocumentContentChanged: Event<TextDocumentChangeEvent>;
        onEncodingChanged: Event<string>;
        onFocusChanged: Event<boolean>;
        onLanguageChanged: Event<string>;
        onMouseDown: Event<EditorMouseEvent>;
        onScrollChanged: Event<void>;
        onSelectionChanged: Event<Selection>;
        onShouldDisplayDirtyDiffChanged?: Event<boolean>;
        selection: Selection;
        uri: URI;
        blur(): void;
        createMoveToUri(resourceUri: URI): undefined | URI;
        deltaDecorations(params: DeltaDecorationParams): string[];
        detectLanguage(): void;
        dispose(): void;
        executeEdits(edits: TextEdit[]): boolean;
        focus(): void;
        getEncoding(): string;
        getLinesDecorations(
            startLineNumber: number,
            endLineNumber: number,
        ): EditorDecoration[];
        getResourceUri(): undefined | URI;
        getVisibleColumn(position: Position): number;
        getVisibleRanges(): Range[];
        handleVisibilityChanged(nowVisible: boolean): void;
        isFocused(): boolean;
        refresh(): void;
        replaceText(params: ReplaceTextParams): Promise<boolean>;
        resizeToFit(): void;
        restoreViewState(state: object): void;
        revealPosition(position: Position, options?: RevealPositionOptions): void;
        revealRange(range: Range, options?: RevealRangeOptions): void;
        setEncoding(encoding: string, mode: EncodingMode): void;
        setLanguage(languageId: string): void;
        setSize(size: Dimension): void;
        shouldDisplayDirtyDiff(): boolean;
        storeViewState(): object;
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    cursor: Position
    isReadonly: boolean | MarkdownString
    node: HTMLElement
    onCursorPositionChanged: Event<Position>
    onDidChangeReadOnly: Event<boolean | MarkdownString>
    onDocumentContentChanged: Event<TextDocumentChangeEvent>
    onEncodingChanged: Event<string>
    onFocusChanged: Event<boolean>
    onLanguageChanged: Event<string>
    onMouseDown: Event<EditorMouseEvent>
    onScrollChanged: Event<void>
    onSelectionChanged: Event<Selection>
    onShouldDisplayDirtyDiffChanged?: Event<boolean>

    This event is optional iff shouldDisplayDirtyDiff always returns the same result for this editor instance.

    selection: Selection
    uri: URI

    Methods

    • Creates a new URI to which this navigatable should moved based on the given target resource URI.

      Parameters

      • resourceUri: URI

      Returns undefined | URI

    • Dispose this object.

      Returns void

    • Gets all the decorations for the lines between startLineNumber and endLineNumber as an array.

      Parameters

      • startLineNumber: number

        The start line number.

      • endLineNumber: number

        The end line number.

      Returns EditorDecoration[]

      An array with the decorations.

    • Return an underlying resource URI.

      Returns undefined | URI