Theia API Documentation v1.65.0
    Preparing search index...
    interface Saveable {
        autosaveable?: boolean;
        dirty: boolean;
        onContentChanged: Event<void>;
        onDirtyChanged: Event<void>;
        applySnapshot?(snapshot: object): void;
        createSnapshot?(): Saveable.Snapshot;
        filters?(): { [name: string]: string[] };
        revert?(options?: RevertOptions): Promise<void>;
        save(options?: SaveOptions): MaybePromise<void>;
        saveAs?(options: SaveAsOptions): MaybePromise<void>;
        serialize?(): Promise<BinaryBuffer>;
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    autosaveable?: boolean

    If false, the saveable will not participate in autosaving.

    dirty: boolean
    onContentChanged: Event<void>

    This event is fired when the content of the saveable changes. While onDirtyChanged is fired to notify the UI that the widget is dirty, onContentChanged is used for the auto save throttling.

    onDirtyChanged: Event<void>

    This event is fired when the content of the dirty variable changes.

    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[] }