Theia API Documentation v1.65.0
    Preparing search index...
    interface ContextKeyService {
        onDidChange: Event<ContextKeyChangeEvent>;
        createKey<T extends ContextKeyValue>(
            key: string,
            defaultValue: undefined | T,
        ): ContextKey<T>;
        createOverlay(overlay: Iterable<[string, unknown]>): ContextMatcher;
        createScoped(target: HTMLElement): ScopedValueStore;
        match(expression: string, context?: HTMLElement): boolean;
        parseKeys(expression: string): undefined | Set<string>;
        setContext(key: string, value: unknown): void;
        with<T>(values: Record<string, unknown>, callback: () => T): T;
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    Methods

    • Whether the expression is satisfied. If context provided, the service will attempt to retrieve a context object associated with that element.

      Parameters

      • expression: string
      • Optionalcontext: HTMLElement

      Returns boolean

    • Parameters

      • expression: string

      Returns undefined | Set<string>

      a Set of the keys used by the given expression or undefined if none are used or the expression cannot be parsed.