Interface LangiumDocuments

Shared service for managing Langium documents.

interface LangiumDocuments {
    all: Stream<LangiumDocument<AstNode>>;
    addDocument(document: LangiumDocument<AstNode>): void;
    createDocument(uri: URI, text: string): LangiumDocument<AstNode>;
    createDocument(uri: URI, text: string, cancellationToken: CancellationToken): Promise<LangiumDocument<AstNode>>;
    deleteDocument(uri: URI): undefined | LangiumDocument<AstNode>;
    getDocument(uri: URI): undefined | LangiumDocument<AstNode>;
    getOrCreateDocument(uri: URI, cancellationToken?: CancellationToken): Promise<LangiumDocument<AstNode>>;
    hasDocument(uri: URI): boolean;
    invalidateDocument(uri: URI): undefined | LangiumDocument<AstNode>;
}

Implemented by

Properties

A stream of all documents managed under this service.

Methods